Repository navigation
Conversation
qrilka
left a comment
There was a problem hiding this comment.
In principle I'm OK with this PR. Just see some notes regarding haddocks.
But I'm not sure it makes sense to merge it right into master. If you want to track different steps of component-based builds then one option could be to add a new branch for it and do PRs into it.
And one more note - what about squashing commits like "minor improvements"?
| -- Absent in cabal. | ||
| ,packageDeps :: !(Map PackageName DepValue) | ||
| -- ^ Packages that the package depends on, both as libraries and build tools. | ||
| -- Likely derived from cabal: |
There was a problem hiding this comment.
It looks a bit odd to have "likely" in haddocks for our own definitions...
There was a problem hiding this comment.
Yes, but it's better than nothing. I didn't actually track all the fields down, because there are a number of hacks on pretty much all of them, the idea of this is to understand why everything is needed and how we can better address these needs. I agree it's not the best, maybe we should wait for the actual component changes on Packge to merge this then.
| ,packageBuildType :: !BuildType -- ^ Package build-type. | ||
| Package {packageName :: !PackageName | ||
| -- ^ Name of the package. | ||
| -- This is PackageIdentifier pkgName in cabal. |
There was a problem hiding this comment.
Probably it we should use Cabal as a way to refer to the Cabal library. I.e. start with the capital C
| @@ -0,0 +1,7 @@ | |||
| { | |||
There was a problem hiding this comment.
does this file really belong to this PR?
|
So we can get take 2 different path considering this PR:
I don't have a strong opinion, I believe if other people are going to touch these parts of the codebase, it's better to merge this. On the other hand, some of the haddocks additions are very likely to be removed after I touch them, and they seem pretty fragile as-is. |
15387f0 to
fe2bea6
Compare
|
@theobat what about the option I proposed? The one about a separate branch to collect a number of PRs on the topic? |
|
Yes, I'm ok with your proposition as well, but I don't have the right to create the branch on the repo I believe ? (unless you meant a branch on my fork, which is fine by me as well). Feel free to close this PR (or tell me what to do :) ). By the way, I made a mistake in the rebase hence the error. |
c522e73 to
ad65aa1
Compare
|
Sorry for a late reply, I've created https://github.com/commercialhaskell/stack/tree/component-based-builds - I guess it's a bit better to keep discussions in this repo to make them better discoverable. |
- Rename lpWanted to lpShouldBeBuilt - Move printPlan and displayTask in thee Build.hs file (where Plan and Task are defined) - Isolate the merging of planTasks and planFinals into their own function (and remove mergeWithKeys as it's recommended to not use it in its haddock) defined in Build.hs. - A reorganization of toAction which transforms a task into an action. This was using very redundantly the Task constructor, and the task -> action is likely to change with component builds. - Rename W and M in ConstructPlan to more sensible names. Minor other changes there. - Refactor Execute.hs and split the Precompiled/installed stuff into their own module. - Various haddock additions. - Remove PackageDepsOracle (unused)
ad65aa1 to
2f9e194
Compare
|
@theobat could I ask you about your new plans about this if you have them? |
|
@qrilka I'm reopening it on the branch you created if that's ok ? |
|
Sure, great to hear that |
This is mostly a doc PR, but it also contains the following refactorings (no actual behavior has been touched, these are "pure" refactorings):
Overall, I mostly realized that contrary to my plan in #4745 (comment), it's going to be hard to do anything before actually changing the Setup.hs part, so I'm going to tackle this first, then all the Package/ConstructPlan/Installed can get a sensible rework.
The Execute.hs file is a beast, it's really hard to navigate, so I'm likely to refactor it a bit more.
This can be merged for now though, because I think it eases the reading and the understanding of the codebase on its own.