Skip to content

package * stanza in cabal.project ignored #1149

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

Open
TerrorJack opened this issue Jun 24, 2021 · 6 comments
Open

package * stanza in cabal.project ignored #1149

TerrorJack opened this issue Jun 24, 2021 · 6 comments
Labels
preserved Keep stale bot away

Comments

@TerrorJack
Copy link
Contributor

ghc-options specified via package * stanza in cabal.project seems to be ignored. This can be worked around by using modules, but would be nice to get global ghc options via cabal.project.

@hamishmack
Copy link
Collaborator

This is blocked on haskell/cabal#6343

Typical work around is

packages.test-ghc-options.ghcOptions = ["-DTEST_GHC_OPTION"];
# This should also work here
# ghcOptions = ["-DTEST_GHC_OPTION"];
# or this
# packages.test-ghc-options.components.library.ghcOptions = ["-DTEST_GHC_OPTION"];
# packages.test-ghc-options.components.exes.test-ghc-options-exe.ghcOptions = ["-DTEST_GHC_OPTION"];

@georgefst
Copy link
Contributor

georgefst commented Oct 19, 2021

Similarly, test-options under package * isn't picked up. One needs to manually add any such options to testFlags in modules instead.

(I don't know whether this warrants a separate issue. The title of this one fits, but the fix probably isn't via plan.json since it's about run-time options.)

georgefst added a commit to hackworthltd/primer that referenced this issue Oct 19, 2021
This is unfortunately necessary since it is not picked up from `cabal.project`. See: input-output-hk/haskell.nix#1149 (comment).
ghost pushed a commit to hackworthltd/primer that referenced this issue Oct 19, 2021
178: Specify `--tasty-cutoff` test option via Haskell.Nix explicitly r=georgefst a=georgefst

This is unfortunately necessary since it is not picked up from `cabal.project`. See: input-output-hk/haskell.nix#1149 (comment).

Closes #173.

Co-authored-by: George Thomas <[email protected]>
@stale
Copy link

stale bot commented Sep 28, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 28, 2022
@georgefst
Copy link
Contributor

georgefst commented Sep 28, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Oh, god, no.

Stale bots are really a truly terrible idea

(added in #1604)

@stale stale bot removed the wontfix label Sep 28, 2022
@hamishmack hamishmack added the preserved Keep stale bot away label Sep 29, 2022
@amesgen
Copy link
Member

amesgen commented Oct 24, 2022

Also happens with the new program-options (new in cabal 3.8, applied to all local packages), which would be a nice way to solve #298/#1282.

@andreabedini
Copy link
Member

Just mentioning that since #1775 we have the ability to go past what is written in plan.json, since we have access to cabal's internal install plan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preserved Keep stale bot away
Projects
None yet
Development

No branches or pull requests

5 participants