-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add :deps/prep-lib support for git dependencies #7
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DerGuteMoritz
commented
Sep 13, 2022
DerGuteMoritz
force-pushed
the
prep-support
branch
from
September 13, 2022 11:17
75e869f
to
4893b5c
Compare
whentze
reviewed
Sep 13, 2022
whentze
reviewed
Sep 13, 2022
DerGuteMoritz
force-pushed
the
prep-support
branch
from
September 13, 2022 12:50
4893b5c
to
cba783c
Compare
whentze
reviewed
Sep 13, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've commented an idea on your babashka
/PATH
question. Other than that, lgtm 👍🏼
I also verified that the example and one of our own projects still builds correctly with this.
DerGuteMoritz
force-pushed
the
prep-support
branch
2 times, most recently
from
September 13, 2022 13:29
dd29bc6
to
c7a089a
Compare
Source dependencies may require a "prep" step e.g. to compile Java source[1]. This patch adds support for this but only for git dependencies since that's the only dependency type which implements this at the moment anyway[2]. This is achieved by extracing the necessary info from `deps.edn` to the lockfile. A second pass over the constructed Clojure home derived from the lockfile then picks out all the git libs which need prepping, runs the respective command for them and finally constructs a new home with the prepped libs. 1: See https://clojure.org/guides/deps_and_cli#prep_libs 2: Technically, :local/root dependencies also implement it but `clojure-nix-locker` doesn't have to handle these.
DerGuteMoritz
force-pushed
the
prep-support
branch
from
September 13, 2022 13:33
c7a089a
to
7d3a7a8
Compare
DerGuteMoritz
commented
Sep 13, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Source dependencies may require a "prep" step e.g. to compile Java source[1]. This patch adds support for this but only for git dependencies since that's the only dependency type which implements this at the moment anyway[2]. This is achieved by extracing the necessary info from
deps.edn
to the lockfile. A second pass over the constructed Clojure home derived from the lockfile then picks out all the git libs which need prepping, runs the respective command for them and finally constructs a new home with the prepped libs.1: See https://clojure.org/guides/deps_and_cli#prep_libs
2: Technically, :local/root dependencies also implement it but
clojure-nix-locker
doesn't have to handle these.