-
Notifications
You must be signed in to change notification settings - Fork 697
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
parsec for cabal-install #4235
parsec for cabal-install #4235
Conversation
The cabal-install patch doesn't actually work, right? Because the parsec flag doesn't control whether the Cabal parsec flag is toggled, and you really need it to be True. But there's no way to declare that you need a flag toggled on a library. Maybe best to bite the bullet and have Cabal unconditionally build the Parsec bits. |
readPackageDescription = | ||
readAndParseFile withUTF8FileContents parsePackageDescription | ||
readPackageDescription = readGenericPackageDescription | ||
{-# DEPRECATED readPackageDescription "Use readGenericPackageDescription" #-} |
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.
Clients tend to appreciate it when you explain why the new name is "better".
|
c9540e4
to
d037a34
Compare
Can someone advance: haskell/hackage-security#179 |
d037a34
to
8df29c4
Compare
@phadej OK, but we could plan on setting up GHC's build system to build parsec for 8.2. It will require some work but it should be within the realm of what we know how to do. So what's the plan for fixing this then? |
@ezyang To my understanding parsec-parser was planned for Cabal 2.2, which going to be bundled with GHC 8.4. Thus I wasn't in a hurry to push this forward on GHC side, I don't think it's a good idea to introduce new build dependencies at this stage. (GHC 8.2 feature freeze is end of January, i.e. this month). |
So, can I merge this, or does @ezyang object? |
OK to merge IMO. |
@phadej I reread the conversation, and I still don't see why Here's an alternative: export a module which is the same between the Parsec/non-enabled Parsec versions, and have cabal-install just import that. Then we are indifferent to flag selection. |
I think that this means making Cabal always depend on Parsec, which is what we want to avoid for now. |
@23Skidoo The type signature of |
But how will you make sure that |
Simple: you delete the parsec flag from cabal-install, and say "if you want to have cabal-install that parses package descriptions with Parsec, build it against a +parsec Cabal" |
I'm okay with that. |
The problem is that I'd want (soon enough) to use parsec machinery to e.g. parse |
One other thing we can do here is branch 2.0 (given that GHC 8.2 will be out ~next month, I think it's time) and enable Parsec parser unconditionally in |
Maybe we add a feature to require flags in libaries, and use it in post 2.0 cabal-install? [As per rust-lang/rfcs#1787 (comment) only manual flags should be allowed to change the interface.] IIRC cabal-install doesn't need to be built with old versions like Cabal, so this is OK? |
@Ericson2314 See #2821 for previous discussion of that idea. Also, we can't simply set |
@23Skidoo Err i mean squeeze this feature into 2.0, and then use it for 2.2. |
What if we remove Of course you can do stupid things like |
OK, if the motivation is starting work on cabal.project Parsec parsing, I accept that adding another flag to cabal-install is expedient. But we must clearly describe (a) how to use the flag correctly (you must also pass |
a) amended flag description |
AppVeyor Werror fail:
|
Hmm... That's introduced by |
From the discussion above it looks like we all agree that this is good to merge. |
455378e
to
b27aa25
Compare
Travis OS X has a bad day |
No description provided.