-
Notifications
You must be signed in to change notification settings - Fork 85
added os-string flag to cabal file #290
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
Closed
BebeSparkelSparkel
wants to merge
2
commits into
haskell-unordered-containers:master
from
BebeSparkelSparkel:master
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,13 @@ flag random-initial-seed | |
manual: True | ||
default: False | ||
|
||
flag os-string | ||
description: | ||
Use the new os-string package and filepath pacakage version >= 1.5.0.0 | ||
|
||
manual: False | ||
default: False | ||
|
||
library | ||
exposed-modules: | ||
Data.Hashable | ||
|
@@ -84,10 +91,17 @@ library | |
, bytestring >=0.10.8.2 && <0.13 | ||
, containers >=0.5.10.2 && <0.7 | ||
, deepseq >=1.4.3.0 && <1.6 | ||
, filepath >=1.4.1.2 && <1.5 | ||
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'd put |
||
, ghc-prim | ||
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.2 | ||
|
||
if flag(os-string) | ||
build-depends: | ||
filepath >=1.5.0.0 && <1.6 | ||
, os-string >=2.0.2 && <2.1 | ||
else | ||
build-depends: | ||
filepath >=1.4.1.2 && <1.5 | ||
|
||
if !impl(ghc >=9.2) | ||
build-depends: base-orphans >=0.8.6 && <0.10 | ||
|
||
|
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.
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.
default: False
here interacts badly with--allow-newer
. Trying to do any builds that use that will result in our flag being false but using a version of filepath that needs it.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.
There's no way around it. It has to be an automatic flag.
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.
I know it has to be automatic, but can't it be default-true automatic?
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.
I find it hard to reason about this. Also note that all the other packages have the default as
False
.This strategy is also suggested by Cabal-syntax, which we derived this from: https://hackage.haskell.org/package/Cabal-syntax-3.6.0.0
Maybe @Bodigrim knows more.
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.
@josephcsible if you are already passing
--allow-newer
you can pass-c 'hashable +os-string'
as well.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.
@Bodigrim I know I can do that, but I don't want to have to do that for every single
cabal install --allow-newer
that I ever run in the future that pulls in hashable.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.
Another idea: if we really want to keep the flag
default: False
, then could we do what QuickCheck does, calling the flag something likeold-filepath
, and havingTrue
be the legacy path andFalse
be the modern path?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.
I don't know any particular reason to stick to
default: False
, but I also find optimizing for--allow-newer
to be a weak justification.Ultimately, I think that
is a better solution, in which case the default value of the flag would be immaterial for
--allow-newer
.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.
The solution that was just merged in #293 doesn't cause this problem, so I'm happy with it.