new with group-id creates incorrect test #638

Closed
jaceklaskowski opened this Issue Jun 13, 2012 · 4 comments

Comments

4 participants
Contributor

jaceklaskowski commented Jun 13, 2012

$ lein2 new project.id/new-with-project-id
Generating a project called project.id/new-with-project-id based on the 'default' template.
jacek:~/sandbox
$ cd new-with-project-id/
jacek:~/sandbox/new-with-project-id
$ lein2 test
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate new_with_project_id/core__init.class or new_with_project_id/core.clj on classpath: 
    at clojure.lang.Util.runtimeException(Util.java:165)
    at clojure.lang.Compiler.eval(Compiler.java:6476)
    at clojure.lang.Compiler.eval(Compiler.java:6455)
    at clojure.lang.Compiler.load(Compiler.java:6902)
    at clojure.lang.RT.loadResourceScript(RT.java:357)
    at clojure.lang.RT.loadResourceScript(RT.java:348)
    at clojure.lang.RT.load(RT.java:427)
    at clojure.lang.RT.load(RT.java:398)
    at clojure.core$load$fn__4610.invoke(core.clj:5386)
    at clojure.core$load.doInvoke(core.clj:5385)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5200)
    at clojure.core$load_lib.doInvoke(core.clj:5237)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:602)
    at clojure.core$load_libs.doInvoke(core.clj:5271)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:602)
    at clojure.core$require.doInvoke(core.clj:5352)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:602)
    at user$eval29.invoke(NO_SOURCE_FILE:1)
    at clojure.lang.Compiler.eval(Compiler.java:6465)
    at clojure.lang.Compiler.eval(Compiler.java:6454)
    at clojure.lang.Compiler.eval(Compiler.java:6455)
    at clojure.lang.Compiler.eval(Compiler.java:6431)
    at clojure.core$eval.invoke(core.clj:2795)
    at clojure.main$eval_opt.invoke(main.clj:296)
    at clojure.main$initialize.invoke(main.clj:315)
    at clojure.main$null_opt.invoke(main.clj:348)
    at clojure.main$main.doInvoke(main.clj:426)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:405)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:518)
    at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate new_with_project_id/core__init.class or new_with_project_id/core.clj on classpath: 
    at clojure.lang.RT.load(RT.java:430)
    at clojure.lang.RT.load(RT.java:398)
    at clojure.core$load$fn__4610.invoke(core.clj:5386)
    at clojure.core$load.doInvoke(core.clj:5385)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5200)
    at clojure.core$load_lib.doInvoke(core.clj:5237)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:602)
    at clojure.core$load_libs.doInvoke(core.clj:5271)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:604)
    at clojure.core$use.doInvoke(core.clj:5363)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at project.id.new_with_project_id.core_test$eval33$loading__4505__auto____34.invoke(core_test.clj:1)
    at project.id.new_with_project_id.core_test$eval33.invoke(core_test.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6465)
    ... 34 more

The generated test doesn't use the main core with the project-id.

jacek:~/sandbox/new-with-project-id
$ cat test/project/id/new_with_project_id/core_test.clj 
(ns project.id.new-with-project-id.core-test
  (:use clojure.test
        new-with-project-id.core))

(deftest a-test
  (testing "FIXME, I fail."
    (is (= 0 1))))
Contributor

bruceadams commented Jun 15, 2012

Is this a bug in leiningen proper? Or is it in https://github.com/Raynes/lein-newnew ?

Owner

technomancy commented Jun 15, 2012

It would have to get fixed in lein-newnew, but it's OK to track it here.

Contributor

bruceadams commented Jul 10, 2012

I believe Raynes/lein-newnew#43 fixes this issue.

Collaborator

Raynes commented Jul 10, 2012

@technomancy No it isn't. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment