-
Notifications
You must be signed in to change notification settings - Fork 206
Add Shakefile as possible build script #991
Conversation
I've noticed there is a downside in requirement to download 8.6.2 to run shake script despite me only wanting to check help and build 8.4.4. Not sure if it's fixable. |
Yeah, having to download the compiler and dependencies to actually install something else is annoying. |
I wonder if it's possible to get "whatever ghc is already available" from stack... |
Or at least the ghc I'm intending to use anyway |
@lorenzo @Anrock It is intended that the same resolver as in the normal |
@power-fungus Can you clarify? Suppose i have clean stack install without any ghc downloaded yet. If i run If i run Where does |
@Anrock |
@fendor i see now! I thought it was just overlooked. |
I implemented the Tested on:
|
I added the |
The pull request should be ready for reviews now. |
Just built hie-8.4.4 on OSX with Shakefile. Looks like it working. |
Also, it builds all the individual hie versions, and installs them as |
I agree it should have a default, the help message seems like a good idea. I have to check that. In my opinion, the last ghc should be 8.6.2, but I might be mistaken. |
The point is that the hie-8.2.1, hie-8.4.3 etc are all copies of the same
file, the last hie exe compiled
…On Fri, 21 Dec 2018, 13:32 fendor ***@***.*** wrote:
I agree it should have a default, the help message seems like a good idea.
I have to check that. In my opinion, the last ghc should be 8.6.2, but I
might be mistaken.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#991 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZAB8bI8a8wkBBSQL6FUEyLDdDqRtQvks5u7MbbgaJpZM4ZN1kb>
.
|
If I understand you correctly, this behaviour should be similar to the Makefile. cp '$(STACKLOCALBINDIR)/hie' '$(STACKLOCALBINDIR)/hie-$*' We could copy it directly from the compile path, just like when executing the EDIT: just realised what you mean |
@alanz The issue about the hie-versions not properly being copied should be resolved. |
LGTM |
One thing though, current master builds for 8.6.3 too. |
I will update the pull request to also include 8.6.3. |
shake.yaml
Outdated
@@ -0,0 +1,7 @@ | |||
# Used to provide a different environment for the shake build script | |||
resolver: nightly-2018-12-01 # GHC 8.6.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.
Is there any way we can do something like "use the system resolver on this machine"?
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.
As far as I can tell, since there is a stack.yaml
in the project, the script will always default to that.
However,one can work around this by compiling the shakefile.
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.
An extra stack.yaml
is required since the other yaml
s contain information about extra dependencies in the submodules
folder, which is not present on a non-recursive clone or if the submodules change. Since the build script should take care of updating the git submodules, they are not allowed to be referenced within the stack-yaml
that is used by Shakefile.hs
.
It is possible, however, to include system-ghc: true
within the shake.yaml
(see option) However, this seems to be incompatible with Docker and nix.
@@ -170,7 +176,7 @@ helpMessage = do | |||
out "" | |||
out "Targets:" | |||
out | |||
" build Builds hie for all supported GHC versions (8.2.1, 8.2.2, 8.4.2, 8.4.3, 8.4.4, 8.6.1 and 8.6.2)" | |||
" build Builds hie for all supported GHC versions (8.2.1, 8.2.2, 8.4.2, 8.4.3, 8.4.4, 8.6.1, 8.6.2 and 8.6.3)" |
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.
We should eventually refactor this (and the next set of targets) to be generated from the list of hieVersions
, so we can set that in one place only.
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.
in the next version of the shakefile i would like to refactor this to obtain the list of hie-versions from present stack.yaml files in the directory. But i felt like this should be in another pull request.
Is this ready for merge yet? |
Technically yes, but the |
I would say we should add it, and keep the existing Makefile and .ps1 file. And add a section saying we now have experimental Shake build support, and to please try it and report. Then we can see what kind of feedback we get. |
Ok, then I will revert the changes to the |
README is updated, but I did not manage to use the option I think, it is ready to merge now. |
Given #1008, I wonder if we should not use an LTS that is not for GHC 8.6.3. Otherwise it looks good. I think the build is failing because hackage was being restarted. |
Makes sense, LTS-12.25 looks fine? |
LTS has been updated |
Closes #650
I implemented the Shakefile to be run directly from
stack
.Features:
stack
is the only build requirementshake
is used instead ofmake
dist
target works on windows out of the box, making it easier to create releases for windowsQuirks:
shake.yaml
is necessary to start thestack Shakefile.hs ...
command before submodules are loaded.Tested on:
Working on NixOS with the following commands:
However, the ghc versions 8.2.1 and 8.4.2 are not easily accessible and must be removed from the list of hieVersions in
Shakefile.hs
in order to make it work.