You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
eval won't work (one can use ~ to eval arbitrary Clojure code anywhere within project.clj)
profiles cannot be freely composed
plugins/middleware, that can always alter or inject extra dependencies, won't be taken into account.
Therefore I'd suggest that the current approach becomes deprecated. Instead a Lein plugin would be offered.
As usual with plugins, they receive a project argument with all evaluation rules already applied. So you don't need to worry about eval, profiles, or plugins - all those are already handled by Lein itself prior to one's plugin invocation.
WDYT?
I could contribute a PR.
The text was updated successfully, but these errors were encountered:
Therefore I'd suggest that the current approach becomes deprecated. Instead a Lein plugin would be offered.
I'm not going to deprecate the current approach because I want to keep a way to run it without Leiningen, but I know it's not accurate as you said.
So I agree with adding the Leiningen plugin as a more accurate way while keep the existing approach.
Checking out https://github.com/liquidz/antq/blob/400215d5e3edf61ac2cb3b993b9477ac7e69a061/src/antq/dep/leiningen.clj, the approach to checking project.clj doesn't quite seem idiomatic. project.clj is not data, but code meant to evaluated in a specific context. Treating it as data results in reduced accuracy and flexibility.
Three specific items can be pointed out:
~
to eval arbitrary Clojure code anywhere within project.clj)Therefore I'd suggest that the current approach becomes deprecated. Instead a Lein plugin would be offered.
As usual with plugins, they receive a
project
argument with all evaluation rules already applied. So you don't need to worry about eval, profiles, or plugins - all those are already handled by Lein itself prior to one's plugin invocation.WDYT?
I could contribute a PR.
The text was updated successfully, but these errors were encountered: