-
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
Use parsec, drop parsec flag #4654
Conversation
We should be able to also get rid of the |
yeah, I made PR early to see how CIs break. Will try to iron the issues asap. |
11739db
to
73387dc
Compare
appveyor.yml
Outdated
@@ -18,13 +18,14 @@ install: | |||
build_script: | |||
- cd Cabal | |||
- alex Distribution\Parsec\Lexer.x | |||
- ghc --make -threaded -i -i. Setup.hs -Wall -Werror -XRank2Types -XFlexibleContexts | |||
- ghc --make -threaded -i -i. Setup.hs -Wall -XRank2Types -XFlexibleContexts |
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.
Why do you need to remove -Werror
?
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.
it breaks on unused warning in generated Lexer.hs
@@ -13,6 +13,7 @@ | |||
#ifdef CABAL_PARSEC_DEBUG | |||
{-# LANGUAGE PatternGuards #-} | |||
#endif | |||
{-# OPTIONS_GHC -fno-warn-unused-imports #-} |
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.
👍
Makefile
Outdated
lexer : $(LEXER_HS) | ||
|
||
$(LEXER_HS) : boot/Lexer.x | ||
alex -o $@ $^ |
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.
Please use alex --ghc
to generate the parser the way cabal would.
Seems like green build \o/, please review my "let's make travis green hacks", I'll proceed with this on Monday. Have good weekend everyone! |
module Distribution.Parsec.Lexer | ||
(ltest, lexToken, Token(..), LToken(..) | ||
,bol_section, in_section, in_field_layout, in_field_braces | ||
,mkLexState) where | ||
|
||
-- [Note: boostrapping parsec parser] |
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'd really love it if there was a THIS FILE IS AUTOMATICALLY GENERATED warning on checked in bootstrapped copy, ideally done with the tooling. Maybe one way to do this that obviously works is, "If this file's name is FOO, then this is an automatically generated copy."
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.
Won't do. If something, then alex
should add notes for files generated with it. I'm heavily 👎 of doing something manual / only for Cabal at this point.
,bol_section, in_section, in_field_layout, in_field_braces | ||
,mkLexState) where | ||
|
||
-- [Note: boostrapping parsec parser] |
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'm a bit concerned about this. See my comment #4633 (comment)
@@ -1,5 +1,4 @@ | |||
# cabal new-build | |||
Warning: <ROOT>/custom-setup-without-cabal.cabal: This package requires at least Cabal version 99999 |
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 guess this is being tracked in #4681 ?
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.
yes
CI changes look fine. I'm mostly concerned about checking in autogenerated source code, but if you want to go and land this immediately we can figure that out later. |
@ezyang for now it's way simpler to check in |
This is now green. The only issue is that parsec can't handle few files (unicode-transforms in particular: #4687), so I have to work on |
5a3308a
to
b15e73e
Compare
- Manually generate Lexer.hs - Temporarily disable parser-hackage-tests on appveyor (needs 01-index.tar) - Add root Makefile to handle commmon dev tasks (genering Lexer.hs)
This flag name was changed without comment in 6e1ff78. It has caused a few problems: - commercialhaskell/stack#3345 - commercialhaskell/stackage#2755 - commercialhaskell/stackage#2759 - commercialhaskell/stackage#2842 - haskell/cabal#4686 - haskell-hvr#150 Those problems either caused or accelerated some (attempted) changes in Cabal: - haskell/cabal#4654 - haskell/cabal#4687 - haskell/cabal#4696 Those problems also caused a change in Stack: - commercialhaskell/stack#3349 In short: Cabal never had any trouble with this. Stack did. The current master version of Stack can handle flags like this, but no released versions of it can. It's not clear when the next version of Stack will be released. In the meantime, no Stack users can use this package. This commit changes the offending flag to something that Stack can handle. By using a flag that Stack can handle, Stack users can once again use this package, and it can return to Stackage. There are no apparent downsides to using a more compatible flag name.
Please include the following checklist in your PR:
Please also shortly describe how you tested your change. Bonus points for added tests!