Comments (8)
The reason here appears to be that iserv
has no Library
component and ghc-cabal
only produces inplace-pkg-config
for packages with library components.
from hadrian.
I think all of this stems from the fact that Settings.isLibrary
is fragile at best. @snowleopard, shouldn't the nature of a package be declared explicitly?
from hadrian.
@bgamari Agreed. If you look into Package.hs
, you'll see that I planned to add pkgType :: PackageType
field to differentiate packages better. However it was not clear to me at that point which package types we want and whether types are mutually exclusive. Is this just data PackageType = Program | Library
?
Any thoughts on this?
from hadrian.
@snowleopard strictly speaking it's a bit of a false-dichotomy. A Cabal package consists of one or more components. These may either be Library components (of which there is at most one) or (one or more) Executable components.
When we say a package is a library we mean that it has a LIbrary component. Perhaps we want this fact to be emitted in package-data.mk
? This would eliminate the need to manually replicate this information in the build system, but would mean that querying whether or not a package is a library would involve a query to an oracle.
from hadrian.
@bgamari I see. It looks though that in the GHC build system every package can be considered either a Library
(in which case we generate a bunch of object/library files) or a Program
(in which case we generate an executable or several executables in case of iserv
). Is this correct? If yes, we can stick to the current design but, perhaps, make defaultProgramPath
depend on Way
in addition to Stage
and Package
.
We may want to be more ambitious and handle all possible cabal packages eventually, but this could be postponed.
By the way make
didn't build iserv
on my machine. Is it Linux specific?
from hadrian.
We may want to be more ambitious and handle all possible cabal packages eventually, but this could be postponed.
Yes, but I am wondering whether it might be worth doing it the right way from the start. Ultimately it doesn't seem that much harder and it seems ill-advised to have the build system's data model not match that of Cabal. Regardless, I've implemented the explicit approach in #8.
By the way make didn't build iserv on my machine. Is it Linux specific?
Hmm, at one point it was broken on Windows but Simon Marlow said he fixed it before merging it. Perhaps you need to pull or rerun boot
?
from hadrian.
Thanks for implementing PackageType
etc! If you don't mind I'll rename setPkgType
to setType
for consistency with setPath
.
Shall we consider this issue closed now? We'll come back to proper support of cabal packages at some point.
I'll try to get iserv
working on my machine.
from hadrian.
I've opened #12 to track this potential refactoring. This can now be closed.
from hadrian.
Related Issues (20)
- _build/stage0/bin/ghc.exe misses dependency HOT 14
- Rules for rts/rts.cabal are broken HOT 15
- Should Hadrian build ghctags and haddock in Stage1? HOT 3
- Documentation broken HOT 2
- Custom build root does not work on Windows HOT 2
- Symlink traversing logic in build scripts HOT 25
- GHC testsuite rules status HOT 25
- Reduce the number of times a Cabal file is parsed HOT 13
- Improve documentation of predicates
- Build more variants of profiled runtime systems (normal, threaded, debug, threaded debug, ...) ? HOT 8
- Consider using Azure for CI HOT 1
- testsuite: support figuring out the list of tests from $PWD HOT 1
- testsuite: add CLI flag for specifying extra options to pass to ghc HOT 1
- rts: buggy handling of non-trivial dynamic flavours of the library HOT 14
- ctrl + c doesn't cancel build on windows HOT 5
- Building on windows is broken. HOT 23
- --integer-simple is broken HOT 40
- Hadrian has been merged into GHC proper HOT 4
- `happy` is not properly auto built in a fresh install HOT 11
- Issue on Trac: 15908 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hadrian.