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

Setting to override lein :pedantic?? #957

Closed
cprice404 opened this issue Jul 10, 2015 · 5 comments
Closed

Setting to override lein :pedantic?? #957

cprice404 opened this issue Jul 10, 2015 · 5 comments
Milestone

Comments

@cprice404
Copy link

We use :pedantic? :abort a lot in our projects, to make sure we know what versions of things we're shipping.

I've filed a few other issues in the past about how this setting makes it pretty difficult to load multiple lein projects into the same Cursive project, but they were mostly about trying to just make it work better, and I understand that it may be very difficult to fix because lein just simply doesn't usually have to deal with multiple projects like this and that makes Cursive's jobs really challenging.

Now I'm wondering if, instead, it might be possible to have a setting in Cursive that allows the developer to define an override value for :pedantic? that would be used across all leiningen projects in the single Cursive project. So you'd basically ignore any and all :pedantic? settings that you found in the multiple leiningen projects, and just force things to use the value that the user provided in the setting.

This would effectively allow me to disable :pedantic? inside of Cursive while still making sure we use it for tests and builds.

If this is possible, it would change my entire approach to working with Cursive. :) In today's world, I almost never open more than one lein project at a time, and I never use checkouts, because every time I try, it causes me great pain. :) But it would be exceedingly useful to be able to get over that hurdle.

@cursive-ide
Copy link
Owner

This is actually a really great idea, and like all great ideas I can't believe I didn't think of it earlier :-) Cursive fiddles with the project.clj before passing it to lein, and in particular it will remove dependencies on other modules that exist in the same (IntelliJ) project. This is so that these modules can be synced without having to be installed first. Thinking about it, this means that :pedantic will actually never do the same thing within Cursive as on the command line since the transitive dependencies for lein projects depending on other lein projects within the same IntelliJ project will never be the same.

Given that, I'm wondering whether we need a flag at all, or whether I should just always disable :pedantic for all Cursive-related functionality? It might still be possible to produce a pedantic warning of some kind by invoking pedantic with the unmodified project.cljs, but I'd have to investigate whether that's possible.

@cprice404
Copy link
Author

Disabling it would work fine for my use cases. Not sure if others are relying on it being honored in Cursive, but I'd be somewhat surprised if they were. Otherwise it seems like more people would be running into the issues that we do when we do multi-lein-project stuff.

@shmish111
Copy link

@cursiveclojure I wonder if there's any update on when this could be implemented?

@danielcompton
Copy link
Collaborator

@shmish111 the Lein integration is undergoing a massive overhaul, so probably not before that lands.

@cursive-ide
Copy link
Owner

@danielcompton @shmish111 Yes, this will be part of the lein overhaul. The good news is that's the main thing I'm working on now, so that should be in the next release containing new functionality (i.e. the next non-bugfix release)

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

4 participants