-
Notifications
You must be signed in to change notification settings - Fork 676
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
Add alex to build-tool-depends remove separate code gen #8980
Conversation
The most annoying part in testing this is that
|
I am afraid this need a fair bit of rework. It's not only I notice that cabal-plan already gives us a good "execution plan":
This does include the components to build in the correct order and also exe-depends like Edit: |
This seems to work now. I was surprised we have no I could pass --latin1 as an in-file annotation but I am not sure if I can do the same with --ghc. The build script now performs a per-component build which works in this case but won't work in full generality (because it doesn't respects qualified goals and flattens |
CI has some hiccups. I'll kick the tire again. |
I'm sorry i need some time to look into it: I'm not terribly familiar with how we use alex and bootstrapping in general. I'd be happy to review, but I'll need to find a chunk of time to first educate myself in these matters a bit. |
@ulysses4ever No worries. Nothing urgent about this |
@andreasabel we're lacking experience here. Could you maybe provide a review for this alex-related PR? |
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.
From afar, LGTM, provided it works. Thanks!
The --ghc
flag to alex
should be supplied automatically by cabal
, so I think we need not worry about that.
There are unnecessary diffs in the linux-*.json
file due to reorderings. Maybe the generator for these files could be fixed so that random reorderings do not happen.
bootstrap/linux-9.0.2.json
Outdated
{ | ||
"package": "binary", | ||
"version": "0.8.8.0" | ||
}, |
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.
Minor comment: Would it make sense to order this list alphabetically by package name so that diffs are more stable.
In this case, the diff is just a reordering, this could/should be avoided.
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.
That's a good idea 👍
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.
Actually, no 😂
The lines you highlight are from the builtin section (aka pre-installed packages). Those don't really need to follow a specific order, and they are used only for validation in bootstrap.py
. But the other list of packages has to be in topological order otherwise we will find missing dependencies. This is why it's a list and not a dictionary.
I can turn the builtin section into a dict, but I'd avoid changing the rest.
2a951e4
to
c48ccb2
Compare
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.
From the alex
side, this LGTM.
(I am not qualified on the bootstrap process here, so I cannot review this part sensibly.)
Do we know who is using this script? Can we get their input? |
Yes, I do. The change seems fine to me, but I only had a quick look. |
I have no clue. Maybe @sternenseemann knows better. |
We don't use |
Alpine Linux definitely uses it, so maybe @nmeum could take a look? |
- Pass latin-1 encoding is passed as input pragma - Cabal hard-codes -g for alex so we don't need to worry about --ghc - Rework bootstrap, adding per-component building - Update bootstrap plans
fb70a93
to
0277d1b
Compare
Can I haz another review? |
That was quick @Kleidukos! <3 |
fix(Cabal-syntax): Remove left-over file after #8980
(Upd.: Whoops, sorry, When evaluating changes related to bootstrapping, it might help to bump Cabal submodule in GHC source tree and estimate the impact. There are |
The `lexer` target was removed in #8980
The `lexer` target was removed in #8980
The `lexer` target was removed in #8980
The `lexer` target was removed in #8980
The `lexer` target was removed in #8980
The `lexer` target was removed in haskell#8980
…9845) (#10041) * Fix #9815: switch quick-jobs CI to XDG Fix #9815: - Cache `~/.local/state/cabal` instead of `~/.cabal/store` - `~/.local/bin` is used instead of `~/.cabal/bin` and is already in the PATH (verify this by calling `alex` after installing it) As I am passing by: - bump cache action to v4 - double-quote `$USER` to keep actionlint happy - move `if` from shell-level to job-level - allow newest `alex` (cherry picked from commit e916cb5) * CI quick-jobs: use preinstalled GHC and Cabal (cherry picked from commit c209a82) * Makefile: remove dead target 'lexer', use '.PHONY' systematically The `lexer` target was removed in #8980 (cherry picked from commit e600087) * CI "Meta checks": correct cache key (cherry picked from commit 56426e4) * CI "Meta checks": print Haskell versions (cherry picked from commit 9a311bd) * CI "Doctest Cabal": daily refresh of cache (cherry picked from commit ba6f6ff) * CI "Check Field Syntax Reference": correct cache key (cherry picked from commit 5949e3f) * Update generated Cabal/src/Distribution/Simple/Build/Macros/Z.hs Not sure why this was not up to date on master and still CI passed. Maybe the content of this file is dependent on the GHC version we are using to build the `get-cabal-macros` tool? (cherry picked from commit 947860a) * CI quick-jobs: entirely wipe ghcup directory rights workaround (cherry picked from commit 5aa8afd) * !fixup --------- Co-authored-by: Andreas Abel <andreas.abel@ifi.lmu.de> Co-authored-by: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
In
Distribution.Fields.Lexer
we have this note.The issue linked in the note mentions that
alex
hasbuild-type: Simple
since Feb 2018. Moreover,bootstrap.sh,
has been replaced by a Python script that seems to be more powerful.I haven't actually tried to bootstrap yet, so opening this as a draft.
Please include the following checklist in your PR:
Bonus points for added automated tests!