-
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
Only move code to Simple/GHC/Build* #9409
Only move code to Simple/GHC/Build* #9409
Conversation
4311f91
to
e82462a
Compare
@mpickering would you have started with a move-only module reshuffle like this for the deduplication? |
I'm not sure I would have done because it introduces churn into the code base. I think I would have started by writing some tests/verifying there are some tests which checked the flags produced are correct. However I can appreciate there's more than one way to skin a cat. |
OK thanks for the suggestion @mpickering, I'll do that. These are the local let cabal/Cabal/src/Distribution/Simple/GHC.hs Lines 1581 to 1699 in 15b5b05
|
f7203f4
to
24b0bf0
Compare
Another idea about how to do this refactoring @philderbeast is to keep both the old and new code paths and compile a lot of packages (when running both and comparing the options are exactly the same). |
@philderbeast: does Draft and needs_review mean it's not finished, but you want feedback already? If so, makes sense. |
a24ba9b
to
403bee7
Compare
@Mikolaj I'd left it in draft by mistake, sorry. |
403bee7
to
45b67e3
Compare
Good work! By the time we are able to delete the As @mpickering suggested, the next step should be developing a method of validating/testing the existing behaviour against the new (improved) behaviour of the refactored, even more generic, |
Thanks for your approval @alt-romes. One more time, before attaching the merge labels, I carefully checked that code was only moved. For my final check, I checkout out upstream locally and reordered I'm sorry if not sticking with the definition order of |
Thanks! FWIW I reviewed locally using Good work! |
Thanks for the tip @alt-romes. |
@philderbeast: do you have a good reason for using this particular merge label? If so, we may want to adjust https://github.com/haskell/cabal/pull/9427/files#diff-eca12c0a30e25b4b46522ebf89465a03ba72a03f540796c979137931d8f92055R250 |
Yes @Mikolaj, this label seems to be needed for merging from an organisation, see more on #9377 (comment) |
Oh, I see. So that's more or less "the PR branch cannot or should not be modified", so we are fine? |
I don't know the workings of the label fix for merges from organisations. @ulysses4ever you set this label up for these situations, didn't you? I think it may be that |
I think it's a mix of reasons, primarily: 1) we use a merge bot; 2) Phil uses a GtHub org, not a personal account, to create PRs. Technical matter aside, we simply don't maintain the info of who may have a reason to use the no-rebase label. I think, the easiest would be if every contributor who has to use that particular label would spell out the reason on every PR. This will free Mikolaj from proding every PR with the label. I know this is not ideal but I'm afraid I don't see a better solution here. In this case, perhaps, when setting the label I'd welcome a comment saying "the non-rebase label issused because the PR is opened from a fork owned by a GH organization, as opposed to a GH user, and the merge bot can't update such forks". Or some such... And I'd put it on every PR like that... |
I'm not so insufferable --- I will learn in time and stop prodding innocent people. :) But I worry that newcomers tend to look at old PRs and imitate them, e.g., the non-standard labels or even merging directly via the button, because we are doing such exceptional things without enough ceremony, so a sentence of explanation wouldn't hurt. |
I'm happy to leave a note for the label as a comment on each pull request in future. |
This got stuck due to changes CI mandatory tests rule. Rebasing... |
@mergify rebase |
❌ Pull request can't be updated with latest base branch changesMergify needs the author permission to update the base branch of the pull request. |
@philderbeast if you could rebase manually and force-push, this should unblock the merge |
45b67e3
to
e89bf0b
Compare
The MacOs curl network outage strikes again. Let me restart... |
As a start for #9389, I moved
gbuild
to its own module and did the same forbuildOrReplLib
. I left the exports fromDistribution.Simple.GHC
as-is. The three modules I added asother-modules
. The motivation for doing this was easy file-diff between implementations for the upcoming deduplication.Template Β: This PR does not modify
cabal
behaviour (documentation, tests, refactoring, etc.)Include the following checklist in your PR: