-
Notifications
You must be signed in to change notification settings - Fork 37
Implement installation and binary/source distribution rules #219
Comments
@KaiHa Thank you for starting to work on this issue. Is it OK if I add you as a collaborator on the project? Otherwise I can't assign this issue to you. |
Yes, thats OK |
@KaiHa Done! Please don't push directly to the repository, keep using pull requests, so that I can keep track of what's going on. |
Thanks, hopefully this will prevent me from pushing into your repository by accident. |
@snowleopard if I need a function like wildCheckCase, can I add a build dependency to MissingH, or do you prefer a different approach? |
@KaiHa MissingH is very much a library from a different era - most of the things it can do are done better by other things. As an example, Shake provides |
@KaiHa I agree with Neil, so far Shake's |
Thanks @snowleopard, @ndmitchell, |
As @thomie suggested some files need to be generated by alex and happy before they can get included into the source distribution. Where should I put these generated files? If I put them into the same place as in the legacy tarball it would be easy to spot differences between tarballs generated by make and hadrian. But hadrian will need extra rules if building from a source distribution. Should we add alex and happy as build dependencies for building from a source distribution and do not add these generated files at all? @snowleopard what do you think? |
@KaiHa - I noticed last night when I wrote a documentation scanner for all my Haskell projects, and fixed it. Interesting how things often seem to be discovered independently and simultaneously! Thanks for pointing it out. |
@KaiHa Hadrian already generates these files and puts them into Have a look at Using Using ...
srcs <- haskellSources context
putBuild "| Build generated source files..."
need srcs -- here Hadrian builds all generated Haskell files for you
putBuild "| Copy source files..."
for_ srcs $ \src -> do
copyFile src ... -- copy to a source distribution
... Does this help? Let me know if you have any other questions. |
@KaiHa: the problem with adding I've learned that even small changes such as placing the user's guide in |
@snowleopard can you have a look at 9495da2? It is a native implementation of Also I am not happy (no pun intended) with putting generated files into the tar-ball. The ghc |
@KaiHa I apologise for the long delay: I'm currently amidst business travel and can't find time for a proper review. In any case I suggest to raise a PR and we'll go from there. I should be able to respond with more substance during the weekend. Thank you! |
Don't worry about the delay @snowleopard. What would be the best way to get the paths to the produced program binaries and libraries for usage in the install rule? |
@KaiHa For binaries, see For libraries, see |
Thanks to @KaiHa we now have working source distribution rules! There are a few minor issues, but I think we can tick this box in the todo list (see the top of the issue). |
What is the status of bindist support? This would be great to have as it would allow us to move the new CI infrastructure over to Hadrian. |
@izgzhen Is |
It is not, but I plan to take over it after summer. But feel free to do it yourself or assign to others :) |
What is the status of bindist support? |
@bgamari I didn't have time to look into this yet. It would be more productive is someone familiar with what |
I am looking at this. As far as I can tell there are two pieces to this (in the unix case at least),
In principle (1) is straightforward, being very similar to the source distribution case. In the case of (2), however, there are a few possible directions to take,
To me it seems like (3) is a bit more complexity than we need and will bloat binary distribution sizes unnecessarily. I suspect (2) is the right choice, but I'm curious to hear what your thoughts are, @snowleopard . |
@bgamari I agree. We can rely on option (1) while Make is still in the tree, and (2) will be a good long-term solution. We don't want to build Hadrian or any other executable just to make a binary installation, a script should be sufficient. |
Ideally we would be able to reuse Hadrian's |
Hi @snowleopard @izgzhen. |
@chitrak7 also, it looks like the |
I don’t think we want to actually have “install” in hadrian. If you ship the binary distribution you want something portable that doesn’t require to build hadrian (or ship a fully static hadrian binary). The linked PR puts everything in |
@angerman I see, sounds good! |
@chitrak7 We can talk (IRC, email?) about what comes after #531 (the binary distribution rule, wrapper generation, etc). What I have is quite simple and doesn't cover all cases, as I take advantage of the relocatability that comes with #531. Maybe I should put together a patch on top of #531 that adds the binary distribution generation logic, and we can see where you can take it from there (in particular, you might want to look into generating wrapper scripts only when they're required, as well as maybe embedding some more content in the bindists -- I currently only pack |
Hi @snowleopard @alpmestan @izgzhen
|
Just a small comment: the implementation is not in #531 but will come in a separate PR. For now it's just in a branch (based on #531): alpmestan/hadrian@bye-ghc-cabal...alpmestan:alp/bindist |
Since #558 we have a binary distribution rule. |
@alpmestan Yes, I think we should close this issue as soon as we fix Hadrian and test the binary distribution rule on all platforms. |
Yes, I didn't mean to comment to say "let's close this", just a status update. I also think it would perhaps make sense to leave it open until the bindist rule and the accompanying |
@alpmestan @snowleopard Can we close this issue now? Or is there still some work required? |
@chitrak7 Do we want to be a little smarter in the bindist code as well, like we're planning to do in the testsuite? And just Maybe @bgamari has an opinion on this, as he's our main user for the bindist rule I think. :-) |
@alpmestan I think binary distributions do not allow this level of customization. Having said that, I just checked with ghc-8.4.2 binary and saw that we need dynamic libraries too, as well as more rts ways. So maybe we build the binary distribution adding all these ways. We can make a bindist flavour and build that, but need not provide customization of flags. |
Yes we need vanilla, profiling and dynamic at the very least I think. |
I think we need to solve #626 before we can address this. |
We now have |
There is no support for this in the build system yet. See
install
,sdist
,binary-dist
rules in makefiles.Here is the todo list:
The text was updated successfully, but these errors were encountered: