Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load file into the repl (linux calva version 2.0.36) #317

Closed
cfehse opened this issue Sep 13, 2019 · 5 comments
Closed

Unable to load file into the repl (linux calva version 2.0.36) #317

cfehse opened this issue Sep 13, 2019 · 5 comments

Comments

@cfehse
Copy link
Contributor

cfehse commented Sep 13, 2019

I attached a zip file containing a test leiningen project. The project contains a file server.clj. This file cannot be loaded into the repl through the extension for calva version 2.0.36 on linux (on Windows the file loads well). On linux the file will load using the calva version 2.0.34 of the extension.

Error shown:
Evaluating file: .../brainpie-test-api/src/brainpie_test_api/server.clj
Syntax error (NullPointerException) compiling at (src/brainpie_test_api//home/cf/dev/clojure/brainpie-test-api/src/brainpie_test_api/server.clj:14:1).
null

Any clue what I doing wrong?

brainpie-test-api.zip

@PEZ
Copy link
Collaborator

PEZ commented Sep 14, 2019

Thanks! I get the same behaviour on my Mac. Works with 2.0.34 and not with 2.0.36. And I see very strange things in the jack-in command line using 2.0.36, which might cause this. Investigating!

Meanwhile, if you need to work on the project and want the bug fixes in 2.0.36, you can copy the command line that 2.0.34 uses and start the repl with that and then use the Calva connect command to hook up the repl. Here's that command line:

lein update-in :dependencies conj '[nrepl"0.6.0"]' -- update-in :plugins conj '[cider/cider-nrepl"0.21.1"]' -- update-in '[:repl-options :nrepl-middleware]' conj '["cider.nrepl/cider-middleware"]' -- with-profile +dev repl :headless

@PEZ
Copy link
Collaborator

PEZ commented Sep 14, 2019

@cfehse : I found the problem. Can you confirm that it fixes the issue for you? Please install and test this VSIX:

https://268-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.37-fix-figwheel-main-deps-when-no-cljs-317-d5d87e35.vsix

@cfehse
Copy link
Contributor Author

cfehse commented Sep 14, 2019

@PEZ: I can confirm this build opens the file on linux and windows. One thing I noticed though is on Windows if a new repl is connected the namespace of the open file is directly populated to the repl. On linux the namespace is not populated (user=> ns -> #namespace[user]).

@PEZ
Copy link
Collaborator

PEZ commented Sep 14, 2019

Cool. I'll cut a release then. This bug was very good to find!

About that namespace thing. This is a long shot, but there is a Calva setting for making the REPL window follow the namespace of the files. Sync REPL Namespace, or something. That behaviour would occur if you have the setting enabled on Windows and disabled on Linux...

@cfehse
Copy link
Contributor Author

cfehse commented Sep 14, 2019

@PEZ: No I found the settings and they are the same on both systems. Perhaps just to keep in mind that there is something working differently under linux and Windows.

@PEZ PEZ closed this as completed in d5d87e3 Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants