Adds rts/rts.cabal.in file
ClosedPublic

Authored by angerman on Nov 9 2017, 8:15 PM.

Details

Summary

This is in preparation for cabalification of the rts. To be actually able to parse this file, a rather recent Cabal is required. One after commit 357d49d of haskell/cabal. The relevant PR to support the new asm-sources and cmm-sources is haskell/cabal/pull/4857.

Not that this does *not* allow cabal to build the RTS. It does however provide enough information such that cabal can copy and register the package properly in the package database, if all the build artifacts have been build properly.

As such it does not require any custom handling of the rts package. As the rts as well as all the other packages built by the GHC built system are built outside of cabal anyway.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
angerman created this revision.Nov 9 2017, 8:15 PM

Why does Cabal need all of this information just to be able to copy and register the package?

Why does Cabal need all of this information just to be able to copy and register the package?

This is so that cabal can produce the correct package.conf for the package database when registering. And knows enough about the libraries, installed headers, and modules to copy the correct subset when copying.

bgamari edited the summary of this revision. (Show Details)Nov 10 2017, 9:07 PM

Why does Cabal need all of this information just to be able to copy and register the package?

This is so that cabal can produce the correct package.conf for the package database when registering. And knows enough about the libraries, installed headers, and modules to copy the correct subset when copying.

Oh, I guess it needs to know about the standalone object files. Fair enough.

How will we keep this up to date? We should at very least leave a comment somewhere saying what needs to be done to add a source file. Can Hadrian perhaps generate this at some point?

Please fix the long lines, but otherwise I support this direction.

I'd like to get a nice noisy error message if you add a new file to the RTS but don't add it here, or better still as @bgamari says it would be nice to generate (parts of) this.

Please fix the long lines, but otherwise I support this direction.

I'd like to get a nice noisy error message if you add a new file to the RTS but don't add it here, or better still as @bgamari says it would be nice to generate (parts of) this.

I've suggested, we could look into autoconf generating the file globbing. But I'm not yet sure that's the best solution. Cabal does not support globbing :-/

After some discussion with @hvr, there is no easy way to keep this up to date automagically.
However we believe that a build failure would indicate that something is missing.

angerman updated this revision to Diff 14661.Nov 14 2017, 12:40 AM
  • drop logn lines.
  • rebase
bgamari requested changes to this revision.Nov 14 2017, 10:57 AM
bgamari added inline comments.
rts/rts.cabal.in
7

Doesn't the cabal-version need to be higher due to the need to cmm-sources?

This revision now requires changes to proceed.Nov 14 2017, 10:57 AM
angerman updated this revision to Diff 14679.Nov 14 2017, 7:31 PM
  • drop logn lines.
  • proper cabal version.
bgamari accepted this revision.Nov 15 2017, 10:32 AM

Alright, looks good to me.

This revision is now accepted and ready to land.Nov 15 2017, 10:32 AM
This revision was automatically updated to reflect the committed changes.