-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per-component new-build support (no Custom support yet) #3662
Commits on Aug 21, 2016
-
Add configArgs parameter to ConfigFlags.
Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a06460c - Browse repository at this point
Copy the full SHA a06460cView commit details -
One-component configure, fixes haskell#2802.
Described in: ghc-proposals/ghc-proposals#4 ./Setup configure now takes an argument to specify a specific component name that should solely be configured. Most of the gyrations in Configure are all about making it so that we can feed in internal dependencies via --dependency. I dropped the package name match sanity check to handle convenience library package name munging. Consider an internal library named 'q' in package 'p'. When we install it to the package database, we munged the package name into 'z-p-z-q', so that it doesn't conflict with the actual package named 'q'. Now consider when we feed it in with --dependency q=p-0.1-hash-q. Previously, Cabal checked that the 'q' in --dependency matched the package name in the database... which it doesn't. So I dropped the check. I also had to make register/copy unconditionally install internal libraries; otherwise you can't refer to them from later builds. Also a miscellaneous refactor: convenience libraries are printed with a "header" stanza now (not really a stanza header). Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a090a49 - Browse repository at this point
Copy the full SHA a090a49View commit details -
Fix pretty-printing PackageDescription for good.
Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0589974 - Browse repository at this point
Copy the full SHA 0589974View commit details -
Undo new-build support for convenience libraries.
The previous approach I took, though correct, was quite confusing. If I refactor InstallPlan to operate on a per-component basis, then we'll automatically get support for convenience libraries, which will ultimately cleaner. (While we won't be able to get rid of support for whole package installs, it will be safe to assume packages using convenience libraries also support one-shot configure.) I didn't revert the support in cabal install; I'm not planning on componentizing it. Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e6b6167 - Browse repository at this point
Copy the full SHA e6b6167View commit details -
Per-component new-build support (no Custom support yet).
A bit of a megapatch. Here's what's in it: * First, a few miscellaneous utility functions and reexports in Cabal. I could have split these into a separate commit but I was too lazy to. * Distribution.Client.Install got refactored: instead of using PackageFixedDeps, it uses IsUnit instead. This is because we weren't using ComponentDeps in a nontrivial way; we just need some graph structure and IsNode (with UnitId keys) fulfills that. I also removed the invariant checking and error reporting because it was being annoying (we check the invariants already in SolverInstallPlan). * Look at Distribution.Client.ProjectPlanning.Types. This contains the primary type change: ElaboratedConfiguredPackage is now EITHER a monolithic ElaboratedPackage, or a per-component ElaboratedComponent (it should get renamed but I didn't do that in this patch.) These are what we're going to store in our plans: if a package we're building has a Setup script which supports per-component builds, we'll explode it into a component. Otherwise we'll keep it as a package. We'll see codepaths for both throughout. * OK, so the expansion happens in ProjectPlanning, mostly in 'elaborateAndExpandSolverPackage'. You should review the package hash computation code closely. When we can separate components, we compute a hash for each INDEPENDENTLY. This is good: we get more sharing. * We need to adjust the target resolution and pruning code in ProjectOrchestration and ProjectPlanning. I did a dumb but easy idea: if a user mentions 'packagename' in a target name, I spray the PackageTarget on every possibly relevant IPID in buildTargets', and then pare it down later. * And of course there's code in ProjectBuilding to actual do a configure and then build. * We change the layout of build directories so that we can track each component separately. While I was doing that, I also added compiler and platform information. Custom doesn't work yet because I need to give them their own separate component, and teach Cabal how to build them specially. Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d9bf678 - Browse repository at this point
Copy the full SHA d9bf678View commit details -
showComponentTarget remove dependence on ElaboratedPackage.
Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5c410b3 - Browse repository at this point
Copy the full SHA 5c410b3View commit details -
Refactor showBuildTarget to not require QualLevel, making it total.
Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 36a186a - Browse repository at this point
Copy the full SHA 36a186aView commit details -
Docs and modest safety improvements.
Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 929679c - Browse repository at this point
Copy the full SHA 929679cView commit details -
Fix haskell#1541, by adding internal build-tools to PATH.
Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6764810 - Browse repository at this point
Copy the full SHA 6764810View commit details -
Be more careful about ComponentId versus UnitId.
Two big ideas: * @--dependency@ takes a ComponentId, not UnitId. I used to think it should be a UnitId but it is now clear that you want to finger the indefinite unit id, which can be uniquely identified with a ComponentId * When hashing for an InstalledPackageId in new-build, we should produce a ComponentId, not a UnitId. While cleaning up the results, for any codepaths which we don't plan on implementing Backpack (Distribution.Client.Install, I'm looking at you), just coerce ComponentId into UnitIds as necessary. Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bd7e231 - Browse repository at this point
Copy the full SHA bd7e231View commit details -
Add record selectors for PackageIndex, and use them when not all fiel…
…ds are destructed. Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 56bb80b - Browse repository at this point
Copy the full SHA 56bb80bView commit details -
Prevent nodeNeighbors from returning a node multiple times
This causes strange output when we output the install plan. Thanks @hvr for reporting. Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 15dd845 - Browse repository at this point
Copy the full SHA 15dd845View commit details -
Use per-component install directories.
Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4e782d6 - Browse repository at this point
Copy the full SHA 4e782d6View commit details -
Don't provide --constraints when pkgComponent is Just.
Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bb08006 - Browse repository at this point
Copy the full SHA bb08006View commit details -
Only put library dependencies in elabComponentDependencies.
Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 18cb246 - Browse repository at this point
Copy the full SHA 18cb246View commit details -
Correctly track internal executable dependencies as exe deps.
Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4b4690b - Browse repository at this point
Copy the full SHA 4b4690bView commit details -
Fix build-tools PATH usage with per-component new-build
Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for da15a6f - Browse repository at this point
Copy the full SHA da15a6fView commit details -
Rewrite ElaboratedConfiguredPackage.
As requested by Duncan, the majority of fields that originally lived in ElaboratedPackage now are moved to ElaboratedConfiguredPackage under the prefix 'elab'. Some code has gotten simpler as a result. Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c41ead7 - Browse repository at this point
Copy the full SHA c41ead7View commit details -
Introduce InstallPlan.depends = nodeNeighbors and use it.
Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f63273d - Browse repository at this point
Copy the full SHA f63273dView commit details -
Solve for, build, and add to path build-tools dependencies.
This fixes haskell#220: new-build now builds, installs and adds executables to PATH automatically if they show up in 'build-tools'. However, there is still more that could be done: the new behavior only applies to a specific list of 'build-tools' (alex, happy, etc) which Cabal recognizes out of the box. The plan is to introduce a new 'tool-depends' field to allow dependencies on other executables as well. Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c0a4860 - Browse repository at this point
Copy the full SHA c0a4860View commit details -
Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0e40859 - Browse repository at this point
Copy the full SHA 0e40859View commit details -
Try to not redo building executables if we see the cid in the store.
Actually we could probably do this a bit more properly with UnitId in the Backpack patchset. Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 10a9c4a - Browse repository at this point
Copy the full SHA 10a9c4aView commit details -
- New "exe-depends" field - Dropped "depends" when it's a package; you can use "components" to get the information Signed-off-by: Edward Z. Yang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4a9f11e - Browse repository at this point
Copy the full SHA 4a9f11eView commit details