-
Notifications
You must be signed in to change notification settings - Fork 20
Use a standalone opam root, fuse opam package build into make -C opt
#227
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
Conversation
…aramana_standalone_opam
6e605b4 to
f16a54d
Compare
|
Now, with this PR, |
|
Now the remaining next step: what should be the default behavior of @mtzguido, you were advocating the fact that One could argue that, with this PR, Another possibility could be to have I say coarse-grained, because the only configurable bit here is for the user to set Then, do you think we need to adapt |
|
Here's my (opinionated) 2 cents, some of which we discussed today: If everparse has local copies of F*/karamel/pulse (via submodules, hashes, or whatever), then it should just use them, and not look into the user's environment at all (e.g. reading I think the default should be to just use the dependencies in opt, including for CI purposes. This way, there is no leeway in what is being checked: we check that everparse builds and passes the tests with the checked-in snapshots (submodules/hashes) of the projects. This also means that changes in F*/krml/pulse will not break the everparse master branch, as there is no implicit requirement of being up-to-date. Of course, we want to be up-to-date anyway, so a nightly job could try to advance the submodules, test the build, and commit this new state if everything passes. If a user wants to use a local F*/krml/Pulse, this should be a very explicit step to deviate from the norm. Maybe running This is what I do for Kuiper (except for allowing using external dependencies, I haven't seen a need for this yet) and it's been working nicely. |
|
Thanks Guido! I agree with you that having precise submodules in Regarding the environment variables: I agree that one shouldn't automatically rely on PATH for F* or Karamel, because PATH is often silently set up in the user's back, especially if the user installs F* via opam. (For z3, I am less worried, since we look for a specific version in the Z3 executable name anyway.) However, if the user uses specific environment variables, such as I implemented my proposals above in #232 , which subsumes this PR. Thanks again! |
Currently, the user needs to run
make _opam && eval $(opam env) && make -C optto build EverParse dependencies. Moreover,make _opamtouches the user's.opamby registering a switch.This PR fixes all of those issues. Now, the user only needs to run
make -C optto build all EverParse dependencies at once, including opam packages. To perform the latter,make -C optnow creates a standalone opam root inopt/opam.Moreover,
make -C optnow createsopt/opam-env.Makefile, which is automatically included by the mainMakefileto set up the opam environment in addition toFSTAR_EXE, etc. when invoking one of its rules. Thus, the user no longer needs to runeval $(opam env).As before, if the user needs to work beyond the main Makefile rules, a single invocation of
eval $(make -s env)is enough to set up both opam and EverParse environments at once.