-
Notifications
You must be signed in to change notification settings - Fork 37
Use Cabal directly in place of ghc-cabal + make build root configurable #531
Changes from all commits
df9ffa8
8298dad
42f5b6f
0f85e35
e23a3d9
c99df2c
edb7fa9
e8daefc
cab4c6d
6c29fe2
e4204f1
3c5da99
6052655
7764235
9451654
81c736d
a89b21f
7f5753c
6df0c57
65de601
cb4fbc7
7818701
a736fde
75c6aac
894a197
03eda8a
770be1c
c569957
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 |
---|---|---|
|
@@ -30,12 +30,17 @@ install: | |
- appveyor-retry stack exec -- pacman -S autoconf automake-wrapper make patch python tar --noconfirm | ||
|
||
build_script: | ||
# Boot and configure ghc source tree | ||
- cd .. | ||
- python boot && configure --enable-tarballs-autodownload | ||
- cd hadrian | ||
|
||
# Build Hadrian and run internal Hadrian tests | ||
- build -c selftest | ||
- build selftest | ||
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 think if you simply undo all changes to this script it should go all the way to the build. 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. No, unfortunately -c seems a bit broken with these changes but I have not figured out why. If you have any idea why, that'd be great! 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. Yep, happy to help -- let's discuss in the above comment. I'm sure this can be easily fixed. 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 linked to the error we get when we use hadrian's |
||
|
||
# Build GHC | ||
- build -j -c --flavour=quickest --no-progress --progress-colour=never --profile=- | ||
- build -j --flavour=quickest --no-progress --progress-colour=never --profile=- | ||
|
||
# Test GHC binary | ||
- cd .. | ||
- inplace\bin\ghc-stage2 -e 1+2 | ||
- _build/stage1/bin/ghc -e 1+2 |
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 explicit booting and configuration? Doesn't
-c
flag work?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.
For some reason, with my changes
-c
does not seem to run the boot/configure scripts anymore, or not in time for reading some settings apparently. I could not figure out why the boot/configure rules don't fire.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.
Let's try to figure this out. The dependency mechanism is via the
configFile
. It is built byconfigureRules
and isneed
ed vialookupValueOrError configFile
inOracles.Setting
.Which setting is 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.
Sorry for the delay, takes a time to go through all the feedback. I went back to the travis CI run where we boot with 8.2, last commit before I removed
-c
and did the configure phase explicitly, you can see the error right here. So this branch somehow requires data from the cabal files very early on (apparently before we get a chance to fire the configure rules), but those cabal files are supposed to be generated from.cabal.in
files during configure.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.
Ah, I think I know what's going on! We haven't included
compiler/ghc.cabal
into the result ofconfigureRules
. We need to modify this line:https://github.com/snowleopard/hadrian/blob/master/src/Rules/Configure.hs#L15
If you add
compiler/ghc.cabal
into the list of resulting files I bet it will work. Note that this will also add a dependency oncompiler/ghc.cabal.in
, so if this file is edited, the configure script will be automatically rerun to produce an up-to-datecompiler/ghc.cabal
.Right now, Hadrian doesn't know that
compiler/ghc.cabal
is built by us!