{"action":"created","issue":{"url":"https://api.github.com/repos/typelead/eta/issues/530","repository_url":"https://api.github.com/repos/typelead/eta","labels_url":"https://api.github.com/repos/typelead/eta/issues/530/labels{/name}","comments_url":"https://api.github.com/repos/typelead/eta/issues/530/comments","events_url":"https://api.github.com/repos/typelead/eta/issues/530/events","html_url":"https://github.com/typelead/eta/issues/530","id":262072874,"number":530,"title":"NoSuchMethodError on stg.Closure","user":{"login":"JustusAdam","id":5824532,"avatar_url":"https://avatars0.githubusercontent.com/u/5824532?v=4","gravatar_id":"","url":"https://api.github.com/users/JustusAdam","html_url":"https://github.com/JustusAdam","followers_url":"https://api.github.com/users/JustusAdam/followers","following_url":"https://api.github.com/users/JustusAdam/following{/other_user}","gists_url":"https://api.github.com/users/JustusAdam/gists{/gist_id}","starred_url":"https://api.github.com/users/JustusAdam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustusAdam/subscriptions","organizations_url":"https://api.github.com/users/JustusAdam/orgs","repos_url":"https://api.github.com/users/JustusAdam/repos","events_url":"https://api.github.com/users/JustusAdam/events{/privacy}","received_events_url":"https://api.github.com/users/JustusAdam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-10-02T12:46:04Z","updated_at":"2017-10-02T19:49:23Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I get this error message in the stg when I try to run our test cases.\r\n\r\n```\r\nException in thread \"main\" java.lang.NoSuchMethodError: eta.runtime.stg.Closure.applyI(Leta/runtime/stg/StgContext;I)Leta/runtime/stg/Closure;, compiling:(ohua/compile_test.clj:11:1)\r\n\tat clojure.lang.Compiler.load(Compiler.java:7391)\r\n\tat clojure.lang.RT.loadResourceScript(RT.java:372)\r\n\tat clojure.lang.RT.loadResourceScript(RT.java:363)\r\n\tat clojure.lang.RT.load(RT.java:453)\r\n\tat clojure.lang.RT.load(RT.java:419)\r\n\tat clojure.core$load$fn__5677.invoke(core.clj:5893)\r\n\tat clojure.core$load.invokeStatic(core.clj:5892)\r\n\tat clojure.core$load.doInvoke(core.clj:5876)\r\n\tat clojure.lang.RestFn.invoke(RestFn.java:408)\r\n\tat clojure.core$load_one.invokeStatic(core.clj:5697)\r\n\tat clojure.core$load_one.invoke(core.clj:5692)\r\n\tat clojure.core$load_lib$fn__5626.invoke(core.clj:5737)\r\n\tat clojure.core$load_lib.invokeStatic(core.clj:5736)\r\n\tat clojure.core$load_lib.doInvoke(core.clj:5717)\r\n\tat clojure.lang.RestFn.applyTo(RestFn.java:142)\r\n\tat clojure.core$apply.invokeStatic(core.clj:648)\r\n\tat clojure.core$load_libs.invokeStatic(core.clj:5774)\r\n\tat clojure.core$load_libs.doInvoke(core.clj:5758)\r\n\tat clojure.lang.RestFn.applyTo(RestFn.java:137)\r\n\tat clojure.core$apply.invokeStatic(core.clj:648)\r\n\tat clojure.core$require.invokeStatic(core.clj:5796)\r\n\tat clojure.core$require.doInvoke(core.clj:5796)\r\n\tat clojure.lang.RestFn.applyTo(RestFn.java:137)\r\n\tat clojure.core$apply.invokeStatic(core.clj:648)\r\n\tat clojure.core$apply.invoke(core.clj:641)\r\n\tat user$eval85.invokeStatic(form-init5552938699833332809.clj:1)\r\n\tat user$eval85.invoke(form-init5552938699833332809.clj:1)\r\n\tat clojure.lang.Compiler.eval(Compiler.java:6927)\r\n\tat clojure.lang.Compiler.eval(Compiler.java:6917)\r\n\tat clojure.lang.Compiler.load(Compiler.java:7379)\r\n\tat clojure.lang.Compiler.loadFile(Compiler.java:7317)\r\n\tat clojure.main$load_script.invokeStatic(main.clj:275)\r\n\tat clojure.main$init_opt.invokeStatic(main.clj:277)\r\n\tat clojure.main$init_opt.invoke(main.clj:277)\r\n\tat clojure.main$initialize.invokeStatic(main.clj:308)\r\n\tat clojure.main$null_opt.invokeStatic(main.clj:342)\r\n\tat clojure.main$null_opt.invoke(main.clj:339)\r\n\tat clojure.main$main.invokeStatic(main.clj:421)\r\n\tat clojure.main$main.doInvoke(main.clj:384)\r\n\tat clojure.lang.RestFn.invoke(RestFn.java:421)\r\n\tat clojure.lang.Var.invoke(Var.java:383)\r\n\tat clojure.lang.AFn.applyToHelper(AFn.java:156)\r\n\tat clojure.lang.Var.applyTo(Var.java:700)\r\n\tat clojure.main.main(main.java:37)\r\nCaused by: java.lang.NoSuchMethodError: eta.runtime.stg.Closure.applyI(Leta/runtime/stg/StgContext;I)Leta/runtime/stg/Closure;\r\n\tat ohua_jvm_integration.ohua.compat.jvm.Compiler$$LrY0Tlvl14.enter(Unknown Source)\r\n\tat ohua_jvm_integration.ohua.compat.jvm.Compiler$$fstableZZC0ZZCohuazzmjvmzzmintegrationzzm0zzi7zzi2zzm9gdj4UcZZZZGzzzz6DhxF8uIk20TZZCOhuazziCompatzziJVMzziCompilerZZCnativeCompileWSplice2.enter(Unknown Source)\r\n\tat ohua_jvm_integration.ohua.compat.jvm.Compiler$$fstableZZC0ZZCohuazzmjvmzzmintegrationzzm0zzi7zzi2zzm9gdj4UcZZZZGzzzz6DhxF8uIk20TZZCOhuazziCompatzziJVMzziCompilerZZCnativeCompileWSplice1.enter(Unknown Source)\r\n\tat ohua_jvm_integration.ohua.compat.jvm.Compiler$$fstableZZC0ZZCohuazzmjvmzzmintegrationzzm0zzi7zzi2zzm9gdj4UcZZZZGzzzz6DhxF8uIk20TZZCOhuazziCompatzziJVMzziCompilerZZCnativeCompileWSplice.enter(Unknown Source)\r\n\tat eta.runtime.apply.PAP.apply(PAP.java:31)\r\n\tat eta.runtime.apply.PAP.applyV(PAP.java:41)\r\n\tat eta.runtime.stg.Closures$EvalIO.enter(Closures.java:111)\r\n\tat eta.runtime.stg.Capability.schedule(Capability.java:150)\r\n\tat eta.runtime.stg.Capability.scheduleClosure(Capability.java:97)\r\n\tat eta.runtime.Runtime.evalIO(Runtime.java:193)\r\n\tat ohua.Compiler.compileAndSpliceEnv(Unknown Source)\r\n\tat ohua.lang$ohua.invokeStatic(lang.clj:13)\r\n\tat ohua.lang$ohua.invoke(lang.clj:12)\r\n\tat clojure.lang.Var.invoke(Var.java:394)\r\n\tat clojure.lang.AFn.applyToHelper(AFn.java:165)\r\n\tat clojure.lang.Var.applyTo(Var.java:700)\r\n\tat clojure.lang.Compiler.macroexpand1(Compiler.java:6776)\r\n\tat clojure.lang.Compiler.macroexpand(Compiler.java:6837)\r\n\tat clojure.lang.Compiler.eval(Compiler.java:6911)\r\n\tat clojure.lang.Compiler.load(Compiler.java:7379)\r\n\t... 43 more\r\nTests failed.\r\n```\r\n\r\nI tried to narrow down the issue but kept failing in narrowing the exact place where this error is thrown.\r\n\r\n### Additional Information\r\n\r\nEtlas version\r\n\r\n```\r\netlas version 1.0.2.0\r\ncompiled using version 2.1.0.0 of the etlas-cabal library\r\n```\r\n\r\nEta version\r\n\r\n```\r\nCompiler for the Eta Programming Language, version 0.0.9b1\r\n```\r\n\r\n### Steps to reproduce\r\n\r\n1. Clone the [jvm-integration](https://github.com/ohua-dev/ohua-jvm-integration), [jvm-runtime](https://github.com/ohua-dev/ohua-jvm-runtime) and [jvm-core](https://github.com/ohua-dev/ohua-core) repo.\r\n1. Build the [jvm-runtime](https://github.com/ohua-dev/ohua-jvm-runtime) jar with `lein jar` and place the snapshot jar in the `resources` folder of the `jvm-integration` project.\r\n1. Initialize a sandbox `etlas sandbox init` in the `jvm-runtime` folder.\r\n1. Add the `core` via `add source`\r\n1. Build `etlas build`\r\n1. Generate the `project.clj` file with `stack runhaskell GenProjectClj.hs`\r\n1. Run the test with `lein test :only ohua.compile-test`\r\n\r\nI know this is quite a lot but I haven't been able to narrow down where exactly the issue comes in.\r\n\r\nTo make it easier I have attached the [compiled library as jar](https://github.com/typelead/eta/files/1348905/ohua-jvm-integration.jar.txt) (this is the library jar eta creates, I had to rename it for github to allow me to upload it, just drop the `.txt` and you should be fine). \r\nThis is just the jar for `ohua-jvm-integration` not an uberjar with dependencies. It's in case you want to have a look at the bytecode.\r\nIf you like i can also create an uberjar and attach that."},"comment":{"url":"https://api.github.com/repos/typelead/eta/issues/comments/333644642","html_url":"https://github.com/typelead/eta/issues/530#issuecomment-333644642","issue_url":"https://api.github.com/repos/typelead/eta/issues/530","id":333644642,"user":{"login":"rahulmutt","id":8035100,"avatar_url":"https://avatars3.githubusercontent.com/u/8035100?v=4","gravatar_id":"","url":"https://api.github.com/users/rahulmutt","html_url":"https://github.com/rahulmutt","followers_url":"https://api.github.com/users/rahulmutt/followers","following_url":"https://api.github.com/users/rahulmutt/following{/other_user}","gists_url":"https://api.github.com/users/rahulmutt/gists{/gist_id}","starred_url":"https://api.github.com/users/rahulmutt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahulmutt/subscriptions","organizations_url":"https://api.github.com/users/rahulmutt/orgs","repos_url":"https://api.github.com/users/rahulmutt/repos","events_url":"https://api.github.com/users/rahulmutt/events{/privacy}","received_events_url":"https://api.github.com/users/rahulmutt/received_events","type":"User","site_admin":false},"created_at":"2017-10-02T19:49:23Z","updated_at":"2017-10-02T19:49:23Z","author_association":"OWNER","body":"You actually need to run the script since it sets up the initial package database for you with the compiler-recognized libraries (like `base`). I should probably make this more clear in the docs somewhere."}}
{"actor":{"display_login":"rahulmutt"}}