-
Notifications
You must be signed in to change notification settings - Fork 711
outdated: accept --project-file #5474
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
Changes from 1 commit
ec20272
3d408ff
7c7c547
664f8c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1100,7 +1100,7 @@ instance Semigroup IgnoreMajorVersionBumps where | |
data OutdatedFlags = OutdatedFlags { | ||
outdatedVerbosity :: Flag Verbosity, | ||
outdatedFreezeFile :: Flag Bool, | ||
outdatedNewFreezeFile :: Flag Bool, | ||
outdatedProjectFile :: Flag FilePath, | ||
outdatedSimpleOutput :: Flag Bool, | ||
outdatedExitCode :: Flag Bool, | ||
outdatedQuiet :: Flag Bool, | ||
|
@@ -1112,7 +1112,7 @@ defaultOutdatedFlags :: OutdatedFlags | |
defaultOutdatedFlags = OutdatedFlags { | ||
outdatedVerbosity = toFlag normal, | ||
outdatedFreezeFile = mempty, | ||
outdatedNewFreezeFile = mempty, | ||
outdatedProjectFile = mempty, | ||
outdatedSimpleOutput = mempty, | ||
outdatedExitCode = mempty, | ||
outdatedQuiet = mempty, | ||
|
@@ -1140,9 +1140,14 @@ outdatedCommand = CommandUI { | |
trueArg | ||
|
||
,option [] ["new-freeze-file"] | ||
"Act on the new-style freeze file" | ||
outdatedNewFreezeFile (\v flags -> flags { outdatedNewFreezeFile = v }) | ||
trueArg | ||
"Act on the new-style freeze file named cabal.project.freeze" | ||
outdatedProjectFile (\_ flags -> flags { outdatedProjectFile = pure "cabal.project" }) | ||
(noArg mempty) | ||
|
||
,option [] ["project-file"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something doesn't smell right to me about duplicating the global There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm sorry, I don't understand this question. Where is the global
Bear in mind that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh you're right, I stand corrected. I confused Now this is starting to make more sense. But if we're going to migrate to make the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've gone ahead and implemented that. In the future we'll probably want to remove |
||
"Act on the new-style freeze file named PROJECTFILE.freeze" | ||
outdatedProjectFile (\v flags -> flags { outdatedProjectFile = v }) | ||
(reqArgFlag "PROJECTFILE") | ||
|
||
,option [] ["simple-output"] | ||
"Only print names of outdated dependencies, one per line" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# cabal v1-update | ||
Downloading the latest package list from test-local-repo | ||
# cabal outdated | ||
Outdated dependencies: | ||
base ==3.0.3.2 (latest: 4.0.0.0) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Test.Cabal.Prelude | ||
main = cabalTest $ withRepo "repo" $ do | ||
res <- cabal' "outdated" ["--project-file", "variant.project"] | ||
assertOutputContains "base" res | ||
assertOutputDoesNotContain "template-haskell" res | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
packages: . |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
constraints: base == 3.0.3.2 |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this interact w/ the
--new-freeze-file
flag?and more importantly, what happens if you say
or
?
(i.e. we already have a global
--project-file=
flag... and it appears you've added a 2nd command-local one?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last one wins (or it should be). I'll add a test and make sure it's explicitly mentioned in the docs.