[2.5] When doing opam sw create ... --dry-run, avoid creating of the directories#6540
Merged
kit-ty-kate merged 2 commits intoocaml:2.5from Nov 10, 2025
Merged
Conversation
910a7ae to
258e1ee
Compare
kit-ty-kate
approved these changes
Nov 7, 2025
258e1ee to
be85291
Compare
…ories This is fixing ocaml#5918 This is achieved by, in dry run, no longer creating build directory, nor saving switch state cache. It also contains not removing of build dir in dry run mode.
be85291 to
ad42ada
Compare
rjbou
approved these changes
Nov 10, 2025
This was referenced Nov 10, 2025
Closed
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.
This is fixing #5918
@rjbou edit: this is done by no longer creating build directory and switch-state cache storing in dry run mode. It also contains not removing build dir in switch state mode.
There may be other (sub)commands that create/remove directories... I haven't had the patience to go through all of them, but the one reported in #5918 is solved by this PR for me.
Backported to the 2.5 branch in #6785