Skip to content

Conversation

@kit-ty-kate
Copy link
Member

@kit-ty-kate kit-ty-kate commented Sep 29, 2025

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

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should pre-command hooks and the like have build-env? It feels like they should

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build-env: doesn't seem to be honoured

1 participant