Skip to content

outdated: accept v1/v2 aliases for freeze-file flags #5480

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

Merged
merged 1 commit into from
Jul 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion Cabal/doc/developing-packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1333,10 +1333,12 @@ The following flags are supported by the ``outdated`` command:
``--freeze-file``
Read dependency version bounds from the freeze file (``cabal.config``)
instead of the package description file (``$PACKAGENAME.cabal``).
``--v1-freeze-file`` is an alias for this flag starting in Cabal 2.4.
``--new-freeze-file``
Read dependency version bounds from the new-style freeze file
(by default, ``cabal.project.freeze``) instead of the package
description file.
description file. ``--v2-freeze-file`` is an alias for this flag
starting in Cabal 2.4.
``--project-file`` *PROJECTFILE*
:since: 2.4

Expand Down
4 changes: 2 additions & 2 deletions cabal-install/Distribution/Client/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1166,12 +1166,12 @@ outdatedCommand = CommandUI {
optionVerbosity outdatedVerbosity
(\v flags -> flags { outdatedVerbosity = v })

,option [] ["freeze-file"]
,option [] ["freeze-file", "v1-freeze-file"]
"Act on the freeze file"
outdatedFreezeFile (\v flags -> flags { outdatedFreezeFile = v })
trueArg

,option [] ["new-freeze-file"]
,option [] ["new-freeze-file", "v2-freeze-file"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd rather make freeze files state their format than rely on user to remember it right.

Copy link
Member

Choose a reason for hiding this comment

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

Freeze file format is actually the same for v1 and v2, but the file names are different.

"Act on the new-style freeze file (default: cabal.project.freeze)"
outdatedNewFreezeFile (\v flags -> flags { outdatedNewFreezeFile = v })
trueArg
Expand Down
2 changes: 2 additions & 0 deletions cabal-install/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
* Add 'v1-' prefixes for the commands that will be replaced in the
new-build universe, in preparation for it becoming the default.
(#5358)
* 'outdated' accepts '--v1-freeze-file' and '--v2-freeze-file'
in the same spirit.
* Completed the 'new-clean' command (#5357). The functionality is
equivalent to old-style clean, but for nix-style builds.
* Ensure that each package selected for a build-depends dependency
Expand Down