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

Add support for "opam switch -" (go to previous switch) #4910

Merged
merged 4 commits into from
Feb 17, 2022

Commits on Feb 17, 2022

  1. Add a extra defaults arguments to mksubdoc

    Co-authored-by: Raja Boujbel <raja.boujbel@ocamlpro.com>
    kit-ty-kate and rjbou committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    bc25900 View commit details
    Browse the repository at this point in the history
  2. Add support for "opam switch -" (go to previous switch)

    Use ordering of installed-switches instead of a new field
    
    This avoids bumping the file version.
    
    There are small differences in semantics though, as shown in the tests:
    - after switching twice to the same switch, `opam switch -` now still gets you
      to the one before that
    - it gets you to the 'last-known-good' switch, even if the last one was removed
    
    I would argue that this new behaviour is ok, if not better.
    
    Add a specific error in case the previous switch no longer exists
    
    Co-authored-by: Louis Gesbert <louis.gesbert@ocamlpro.com>
    Co-authored-by: R. Boujbel <rjbou@ocamlpro.com>
    3 people committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    d58dc1e View commit details
    Browse the repository at this point in the history
  3. Add tests for the new "opam switch -" feature

    Check that switches with name "-" do not interfere with the "go to previous switch" feature
    
    reftests: add in switch-set some previous switch log, local switch and removed switch tests
    kit-ty-kate authored and rjbou committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    50eb9fc View commit details
    Browse the repository at this point in the history
  4. Update master_changes.md

    kit-ty-kate authored and rjbou committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    252bd89 View commit details
    Browse the repository at this point in the history