Order build-env after setenv - #6713
Draft
kit-ty-kate wants to merge 1 commit into
Draft
Conversation
kit-ty-kate
commented
Sep 29, 2025
| updates_common ~set_opamroot ~set_opamswitch st.switch_global.root st.switch | ||
| in | ||
| common @ compute_updates ?force_path st @ updates_nix st | ||
| compute_updates ?force_path ~build_env st @ common @ updates_nix st |
Member
Author
There was a problem hiding this comment.
common and nix updates should probably be moved in compute_updates to centralise the ordering in one function. I also don't think nix env should be able to take priority over every others
kit-ty-kate
commented
Sep 29, 2025
Comment on lines
1103
to
+1105
| let run_hook_job t name ?(local=[]) ?(allow_stdout=false) w = | ||
| let shell_env = OpamEnv.get_full ~set_opamroot:true ~set_opamswitch:true ~force_path:true t in | ||
| (* TODO: ????? *) | ||
| let shell_env = OpamEnv.get_full ~set_opamroot:true ~set_opamswitch:true ~force_path:true ~build_env:[] t in |
Member
Author
There was a problem hiding this comment.
should pre-command hooks and the like have build-env? It feels like they should
Member
Author
|
Moved to the 2.7 milestone as the PR isn't fully ready yet |
This file contains hidden or 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
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.
Fixes #6574
I'm not too happy with the code but it should work.
The order between build-end and setenv has been that way since at least opam 2.0: be714e9