Skip to content
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

Combination of all three remaining PRs for beta3 #23

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bbe345a
Harmonise the warning overriding git-location
dra27 May 4, 2024
ae4281b
Expose OpamEnv.cygwin_non_shadowed_programs
dra27 May 4, 2024
8acd5ac
Abort if --git-location doesn't contain Git
dra27 May 19, 2024
b7d3582
Add a function to enumerate Registry values
dra27 May 29, 2024
41b8f73
Simplify cygbin check in OpamAction
dra27 Jun 4, 2024
21dd668
Change the calculation for installing git
dra27 Jun 4, 2024
9966e16
Add OpamCompat.Seq.find_map
dra27 Jun 4, 2024
70f4e34
Overhaul OpamStd.Sys Cygwin functions
dra27 Jun 4, 2024
0c40ce7
Detect both Cygwin and MSYS2 os-distribution
dra27 Jun 5, 2024
8b58875
Ensure Cygwin setup is downloaded and up-to-date
dra27 Jun 5, 2024
740978c
De-label OpamSysInteract.Cygwin.install
dra27 Jun 5, 2024
cc579bc
Expand Cygwin.check_install to analyse_install
dra27 Jun 5, 2024
ab47e44
Supercalifragilisticexpialidocious
dra27 Jun 2, 2024
c47b295
Make --bypass-checks => --no-cygwin-setup
dra27 Jun 7, 2024
ce50004
fixup "Ensure Cygwin setup is downloaded and up-to-date" - don't crea…
dra27 Jun 8, 2024
696d86b
Tweak OpamSysInteract.Cygwin.check_setup more
dra27 Jun 8, 2024
0ddcf2b
fixup MP commit: Add OpamSysInteract.Cygwin.bindir_for_root
dra27 Jun 8, 2024
0ca3440
fixup MP: improve the message when using an existing Cygwin/MSYS2
dra27 Jun 8, 2024
e1b0bb0
reftest: add init with space in windows test
rjbou Feb 24, 2023
0d9ecba
path: add `redirected` file, used to indicate oam root redirection
rjbou Feb 23, 2023
063fd82
stateConfig: add `original_root_dir` to store non redirected root dir
rjbou Feb 23, 2023
c317e22
Redirect opam on Windows if path contains a space.
rjbou Feb 23, 2023
5e77dfe
Add provenance of opam root, as for current switch
dra27 Jun 9, 2024
f492177
Refactor out the root redirection function (no change)
dra27 Jun 9, 2024
c67fd2e
Empty warning should be on original_root
dra27 Jun 9, 2024
47dc02c
Clean-up original_root_dir on error, etc.
dra27 Jun 9, 2024
a338c32
Convert the root redirection into a menu
dra27 Jun 9, 2024
f3c0b69
WIP: update test
dra27 Jun 9, 2024
67af380
Hack: Displaying extractions in the status bar
dra27 Mar 17, 2024
fe46d0c
reftest: Add a test showing the output of opam update in verbose mode
kit-ty-kate May 28, 2024
eb49b3e
Display a note when reloading a repository so that users are aware it…
kit-ty-kate May 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ users)
* Skip Git-for-Windows menu if the Git binary resolved in PATH is Git-for-Windows [#5963 @dra27 - fix #5835]
* Enhance the Git menu by warning if the user appears to need to restart the shell to pick up PATH changes [#5963 @dra27]
* Include Git for Windows installations in the list of possibilities where the user instructed Git-for-Windows setup not to update PATH [#5963 @dra27]
* [BUG] Fail if `--git-location` points to a directory not containing git [#6000 @dra27]
* Redirect the opam root to C:\opamroot when the opam root contains spaces on Windows [#5457 @rjbou]

## Config report

Expand All @@ -54,6 +56,8 @@ users)

## Update / Upgrade
* [BUG] Stop triggering "Undefined filter variable variable" warning for `?variable` [#5983 @dra27]
* Display extractions in the status bar [#5977 @dra27]
* Display a note when reloading a repository [#5977 @kit-ty-kate]

## Tree
* [BUG] Fix `opam tree --with-*` assigning the `with-*` variables to unrequested packages [#5919 @kit-ty-kate @rjbou - fix #5755]
Expand Down Expand Up @@ -94,6 +98,8 @@ users)
* Pass --no-version-check to Cygwin setup (suppresses a message box if setup needs updating) [#5830 @dra27]
* Pass --quiet-mode noinput to stop the user interrupting the setup GUI [#5830 @dra27]
* Always pass --no-write-registry to the Cygwin installer, not just on first installation [#5995 @dra27]
* os-distribution is now by default calculated from cygpath for Cygwin and MSYS2, instead of needing to be set by opam init [#6000 @dra27]
* Cygwin setup is now always downloaded and updated both for internal and external Cygwin installations [#6000 @dra27]

## Format upgrade
* Handle init OCaml `sys-ocaml-*` eval variables during format upgrade from 2.0 -> 2.1 -> 2.2 [#5829 @dra27]
Expand Down Expand Up @@ -128,6 +134,7 @@ users)

## Client
* Fix rounding error when displaying the timestamp in debug mode [#5912 @kit-ty-kate - fix #5910]
* Overhaul Windows `opam init` to determine Unix and Git configuration simultaneously, and to detect from Cygwin, Git and MSYS2 from all the known package managers and shells [#6000 @dra27]

## Shell

Expand Down Expand Up @@ -170,11 +177,15 @@ users)
* `OpamClient.init` and `OpamClient.reinit`: now can have additional cygwin packages to install [#5930 @moyodiallo]
* Expose `OpamSolution.print_depext_msg` [#5994 @dra27]
* Extracted `OpamSolution.install_sys_packages` from `OpamSolution.install_depexts` [#5994 @dra27]
* `OpamInitDefaults.required_packages_for_cygwin`: no longer includes git; as the need to add that is computed in `OpamClient` [#6000 @dra27]

## opam-repository
* `OpamDownload.download_command`: separate output from stdout and stderr [#5984 @kit-ty-kate]

## opam-state
* `OpamEnv.cygwin_non_shadowed_programs`: exposes the list of executables (not including git) which should always come from Cygwin [#6000 @dra27]
* `opamSysInteract.Cygwin.install`: de-label `packages` argument [#6000 @dra27]
* `OpamSysInteract.Cygwin.check_install` renamed to `analyse_install` which now also returns whether the installation found was MSYS2 or Cygwin [#6000 @dra27]

## opam-solver

Expand All @@ -194,3 +205,6 @@ users)
* `OpamStd.Sys.resolve_command`: extracted the logic from `OpamSystem.resolve_command`, without the default environment handling from OpamProcess. [#5991 @dra27]
* `OpamStd.Sys.resolve_in_path`: split the logic of `OpamStd.Sys.resolve_command` to allow searching for an arbitrary file in the search path [#5991 @dra27]
* `OpamProcess.run_background`: name the stderr output file have the .err extension when cmd_stdout is given [#5984 @kit-ty-kate]
* `OpamStubs.enumRegistry`: on Windows, retrieves all the values of a given type from a registry key, with their names [#6000 @dra27]
* `OpamCompat`: add `Seq.find_map` from OCaml 4.14 [#6000 @dra27]
* `OpamStd.Sys.{get_windows_executable_variant,get_cygwin_variant,is_cygwin_variant}`: renamed `~cygbin` to `?search_in_path` with a change in semantics so that it acts as though the directory was simply the first entry in PATH [#6000 @dra27]
3 changes: 1 addition & 2 deletions src/client/opamAction.ml
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,8 @@ let compilation_env t opam =
(OpamFile.OPAM.build_env opam)
in
let cygwin_env =
match OpamSysInteract.Cygwin.cygbin_opt t.switch_global.config with
match OpamCoreConfig.(!r.cygbin) with
| Some cygbin ->
let cygbin = OpamFilename.Dir.to_string cygbin in
[ OpamTypesBase.env_update_resolved "PATH" Cygwin cygbin
~comment:"Cygwin path"
] @ (match OpamCoreConfig.(!r.git_location) with
Expand Down
1 change: 1 addition & 0 deletions src/client/opamArg.ml
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ let apply_global_options cli o =
(* ?solver_preferences_best_effort_prefix: *)
(* - state options - *)
?root_dir:o.opt_root
?original_root_dir:o.opt_root
?current_switch:(o.opt_switch >>| OpamSwitch.of_string)
?switch_from:(o.opt_switch >>| fun _ -> `Command_line)
(* ?jobs: int *)
Expand Down
4 changes: 2 additions & 2 deletions src/client/opamCliMain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ let check_and_run_external_commands () =
let yes = if yes then Some (Some true) else None in
OpamCoreConfig.init ?yes ?confirm_level ();
OpamFormatConfig.init ();
let root_dir = OpamStateConfig.opamroot () in
let root_from, root_dir = OpamStateConfig.opamroot () in
let has_init, root_upgraded =
match OpamStateConfig.load_defaults ~lock_kind:`Lock_read root_dir with
| None -> (false, false)
Expand Down Expand Up @@ -210,7 +210,7 @@ let check_and_run_external_commands () =
env_update_resolved "PATH" PlusEq
(OpamFilename.Dir.to_string plugins_bin)
] in
OpamStateConfig.init ~root_dir ();
OpamStateConfig.init ~root_from ~root_dir ();
match OpamStateConfig.get_switch_opt () with
| None -> env_array (OpamEnv.get_pure ~updates ())
| Some sw ->
Expand Down
Loading
Loading