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

Disable :pedantic? :abort when starting lein repl #96

Open
marcomorain opened this issue Feb 9, 2018 · 9 comments
Open

Disable :pedantic? :abort when starting lein repl #96

marcomorain opened this issue Feb 9, 2018 · 9 comments

Comments

@marcomorain
Copy link
Contributor

At CircleCI we use :pedentic? :abort in most of our leiningen projects. This option prevents the leiningen from starting the repl unless there are no conflicting dependencies in the app.

When clojureVSCode starts the repl, it adds additional dependencies to the app, which often causes the :pedantic? :abort checks to fail, and the repl fails to start.

I suggest that we override the penantic flag set it to the default value, :ranges when starting the repl from VSCode.

Thoughts?

@marcomorain
Copy link
Contributor Author

marcomorain commented Feb 9, 2018

My current work around is comment out :penantic? :abort when loading a project in code.

@marcomorain
Copy link
Contributor Author

Another option could to be to start leiningen with a specific profile when starting from vscode.

Then I could add a custom setting in my ~/.lein folder for this:

 {:vscode {:pedantic :ranges}}

@avli
Copy link
Owner

avli commented Feb 9, 2018

Hi @marcomorain and thank you for your recent contributions 👍

Could you point me out where do we set this option? I glanced through the code but haven't found any mentions of it. Is this option set by Leiningen implicitly?

@marcomorain
Copy link
Contributor Author

We set this option on our projects in project.clj

This means that if our projects depend on any versions of nrepl or clj-fmt that are different from the versions that clojureVSCode injects, our projects fail to start.

I think I will make a PR to your README.clj with a description of the issue and how to fix it by editing ~/.lein/profiles.clj

👍

@avli
Copy link
Owner

avli commented Feb 9, 2018

Oh, now I see :-)

This makes me think, that the right approach here is to provide a configuration option for passing arbitrary parameters for nREPL as we do for cljfmt. What do you think?

@marcomorain
Copy link
Contributor Author

If we invoke the repl with lein repl :headless :vscode then users could put any special lein options that they would like into a :vscode profile in ~/.lein/profiles.clj

@marcomorain
Copy link
Contributor Author

As it stands, lein repl uses the :repl profile in ~/.lein/profiles.clj

@avli
Copy link
Owner

avli commented Feb 10, 2018

In this case, let's invoke nREPL with :vscode and add a section with the description of how to get an advantage of it to README.md. What do you think?

@MikaelSmith
Copy link

I'm running into this as well, and it appears the README update about how to work around it by editing ~/.lein/profiles.clj never happened. Would you mind outlining that fix here?

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

3 participants