Skip to content
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

Add reinstall test to LinkerOptions/NonignoredConfigs #9377

Merged
merged 2 commits into from
Nov 8, 2023

Conversation

philderbeast
Copy link
Collaborator

@philderbeast philderbeast commented Oct 28, 2023

Adds a test of --force-reinstalls.

I found no reinstall tests for #9268 but I did find a LinkerOptions/NonignoredConfigs test where I could add a reinstall test. Unfortunately this doesn't touch the code path of #9268 with its Use --overwrite-policy=always to overwrite message. The message is instead:

Packages requested to install already exist in environment file at ... Overwriting them may break other packages. Use --force-reinstalls to proceed anyway.

@philderbeast
Copy link
Collaborator Author

It is not possible to share a module between *.test.hs tests is it? I had initially had a reinstall.test.hs test but then wondered how I would go about not duplicating this stuff in the module:

data Linking = Static | Dynamic deriving (Eq, Ord, Show)
links :: [Linking]
links = [Static, Dynamic]
linkConfigFlags :: Linking -> [String]
linkConfigFlags Static =
[
]
linkConfigFlags Dynamic =
[
"--enable-shared",
"--enable-executable-dynamic",
"--disable-library-vanilla"
]
lrun :: [Linking]
lrun = [Static, Dynamic, Static, Dynamic]

@Mikolaj
Copy link
Member

Mikolaj commented Nov 6, 2023

It is not possible to share a module between *.test.hs tests is it?

No idea, but I guess it's less risky to duplicate anyway, in case somebody then changes the test case for one of the tests and consequently subtly changes other tests that use it.

Copy link
Member

@Mikolaj Mikolaj left a comment

Choose a reason for hiding this comment

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

Thank you.

@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Nov 8, 2023
@mergify mergify bot merged commit aadcc25 into haskell:master Nov 8, 2023
@Mikolaj
Copy link
Member

Mikolaj commented Nov 8, 2023

OOI, why merge+no_rebase? I see it resulted in a complex git history (observe, e.g., with gitk).

@philderbeast
Copy link
Collaborator Author

philderbeast commented Nov 8, 2023

OOI, why merge+no_rebase? I see it resulted in a complex git history (observe, e.g., with gitk).

The merge+no_rebase label is the one that works for merging pull requests from https://github.com/cabalism/cabal.

See #9264 (comment) and #9264 (comment) for more on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cabal: tests/package-tests merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge+no rebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants