-
Notifications
You must be signed in to change notification settings - Fork 53
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 package lockfile support #2388
Merged
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
paulcadman
force-pushed
the
lockfile-support
branch
3 times, most recently
from
September 29, 2023 17:32
5f932fc
to
8849226
Compare
paulcadman
force-pushed
the
lockfile-support
branch
3 times, most recently
from
October 2, 2023 12:16
14ac1ba
to
2741dfb
Compare
The git dependency object should be wrapped within a "git" key.
We throw an error if a dependency that is specified in the juvix.yaml is not specified in the lockfile
The lockfile is only written if there is at least one Git dependency
jonaprieto
force-pushed
the
lockfile-support
branch
from
October 2, 2023 13:15
51c9b6c
to
9d96786
Compare
jonaprieto
reviewed
Oct 2, 2023
jonaprieto
reviewed
Oct 2, 2023
src/Juvix/Compiler/Concrete/Translation/FromParsed/Analysis/PathResolver/Error.hs
Outdated
Show resolved
Hide resolved
jonaprieto
approved these changes
Oct 2, 2023
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.
LGTM Thanks!
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.
This PR adds lock file support to the compiler pipeline. The lock file is generated whenever a compiler pipeline command (
juvix {compile, typecheck, repl}
) is run.The lock file contains all the information necessary to reproduce the whole dependency source tree. In particular for git dependencies, branch/tag references are resolved to git hash references.
Lock file format
The lock file is a YAML
juvix.lock.yaml
file written by the compiler alongside the package'sjuvix.yaml
file.Example
Consider a project containing the following
juvix.yaml
:After running
juvix compile
the following lockfilejuvix.lock.yaml
is generated.For subsequent runs of the juvix compile pipeline, the lock file dependency information is used.
Behaviour when package file and lock file are out of sync
If a dependency is specified in
juvix.yaml
that is not present in the lock file, an error is raised.Continuing the example above, say we add an additional dependency:
juvix compile
will throw an error:Closes: