Skip to content

Revert "Fix project-local build flags being ignored." #8744

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

Merged
merged 2 commits into from
Feb 14, 2023

Conversation

Mikolaj
Copy link
Member

@Mikolaj Mikolaj commented Feb 8, 2023

This reverts commit b547ead
from #8623.
Unexpected side-effect has been found (#8719 and #8721),
so these code improvements have to be done differently.
The other commit in the reverted PR is a test and it's retained
and marked as expected broken.

@Mikolaj Mikolaj added the re: dynamic-linking Concerning dynamic linking (e.g. flags "shared", "*-dynamic") label Feb 8, 2023
@Mikolaj Mikolaj marked this pull request as ready for review February 8, 2023 17:41
@Mikolaj Mikolaj requested review from bairyn and gbaz February 8, 2023 17:41
@gbaz
Copy link
Collaborator

gbaz commented Feb 8, 2023

As per my comment (#8623 (comment)) I think this is the wrong approach. We should instead just make the change in #8723 . Most of the reverted commit is not about the misleading title (i.e. changing cabal install to handle build flags). Changing that single line alone should be enough to fix #8719.

Instead, most of the reverted commit is actually doing the unrelated but important thing of teaching cabal to use the same "way" (i.e. dynamic or static) to build the setup script as it uses to build the package itself. That's perfectly good code and should stay! Its too bad all these changes came bundled together, so we couldn't approach them one-by-one and instead we have such confusion...

@Mikolaj
Copy link
Member Author

Mikolaj commented Feb 8, 2023

@gbaz: thanks. As long as we don't understand why it breaks cabal install --lib according to the author, I'm not particularly comfortable including it. Let me ask Oleg.

@Mikolaj
Copy link
Member Author

Mikolaj commented Feb 8, 2023

BTW, that means you don't agree with the latter part of Oleg's "The proper fix is #8723, but it essentially reverts what this patch did."?

@Mikolaj
Copy link
Member Author

Mikolaj commented Feb 8, 2023

And by "flipping the test" you don't mean the test that I retained and marked as broken, but the test change that has been done in the main commit in order to prevent the test failing with the problematic change that we want to revert?

@gbaz
Copy link
Collaborator

gbaz commented Feb 8, 2023

sorry, "flipping the test" was bad wording. I simply meant "removing the line LocalTarballPackage _ -> Just (packageId pkg)" (i.e. changing the outcome of the isInLocal function on local tarball packages from "Just" to "Nothing").

And yes, I don't agree that "mainly reverts what this patch did" because if you examine the patch being reverted, it actually does two extremely unrelated things, which is the source of all this confusion!

@Mikolaj
Copy link
Member Author

Mikolaj commented Feb 8, 2023

@gbaz: actually the test that was changed in order to accommodate the PR changes may rather be T5782Diamond (or there were many? or am I mixing up PRs?). It's related to another part of this PR that we've got feedback about and that has an aborted fix here #8722. That at least indicates these changes are controversial, but the author did not engage @phadej about the feedback, so I'd rather give the author more time for that, while the PR waits back in the queue. What do you think about this particular item, @gbaz?

@phadej
Copy link
Collaborator

phadej commented Feb 8, 2023

.e. changing the outcome of the isInLocal function o

@gbaz

Not enough. Also change to style2str is third (though coupled thing) which should be undone.

The cleanest way forward is to revert whole commit and only add bits one at the time and have tests for them.

You really shouldn't accept features without tests.

@Mikolaj
Copy link
Member Author

Mikolaj commented Feb 9, 2023

Given that original PR is very valuable, fixing an old-standing bug, but @bairyn seems too busy ATM to revise it, we've agreed on today's dev meeting to revert the PR and, time permitting, recover the most important contribution of the original PR, unless the author (@bairyn) beats us to it. Therefore, please kindly accept the reversion PR. In the interest of time, because cabal 3.10 is night at hand, I will merge with one review, if necessary.

@Mikolaj Mikolaj added the merge me Tell Mergify Bot to merge label Feb 9, 2023
Copy link
Collaborator

@bairyn bairyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Update in issue #8719 .)

@Mikolaj
Copy link
Member Author

Mikolaj commented Feb 14, 2023

@bairyn: thank you

@gbaz: would you mind ticking the box? Edit: never mind.

@Mikolaj Mikolaj added attention: needs-backport 3.12 merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days labels Feb 14, 2023
This reverts commit b547ead
from haskell#8623.
Unexpected side-effect has been found, so these code
improvements have to be done differently.
The other commit in the PR is a test and it's retained.
@Mikolaj Mikolaj removed the request for review from gbaz February 14, 2023 11:58
@Mikolaj
Copy link
Member Author

Mikolaj commented Feb 14, 2023

@mergify backport 3.10

@mergify
Copy link
Contributor

mergify bot commented Feb 14, 2023

backport 3.10

✅ Backports have been created

mergify bot added a commit that referenced this pull request Feb 14, 2023
Revert "Fix project-local build flags being ignored." (backport #8744)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attention: needs-review merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge re: dynamic-linking Concerning dynamic linking (e.g. flags "shared", "*-dynamic")
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants