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

Overeager ghc-options -I warning #4255

Closed
lspitzner opened this issue Jan 21, 2017 · 1 comment · Fixed by #8183
Closed

Overeager ghc-options -I warning #4255

lspitzner opened this issue Jan 21, 2017 · 1 comment · Fixed by #8183

Comments

@lspitzner
Copy link
Collaborator

on 1.24.0.0

  ghc-options: {
    -rtsopts
    -with-rtsopts "-I0"
  }

gives

Warning: Instead of 'ghc-options: -I0' use 'include-dirs: 0'

I think some regex needs some tweaking there.

@ezyang
Copy link
Contributor

ezyang commented Jan 22, 2017

Relevant code is in Cabal/Distribution/PackageDescription/Check.hs. Problem is that it just checks arguments one by one for things starting with -I; so it doesn't know -with-rtsopts grabs the next arg. Workaround: use an equals sign.

This might not be too easy to fix without reimplementing GHC's command line parser in Cabal. Maybe some extra heuristics could be employed.

@ezyang ezyang added this to the milestone Jan 22, 2017
ulysses4ever added a commit to ulysses4ever/cabal that referenced this issue May 31, 2022
ulysses4ever added a commit to ulysses4ever/cabal that referenced this issue May 31, 2022
ulysses4ever added a commit to ulysses4ever/cabal that referenced this issue May 31, 2022
ulysses4ever added a commit to ulysses4ever/cabal that referenced this issue May 31, 2022
ulysses4ever added a commit to ulysses4ever/cabal that referenced this issue May 31, 2022
ulysses4ever added a commit to ulysses4ever/cabal that referenced this issue May 31, 2022
ulysses4ever added a commit to ulysses4ever/cabal that referenced this issue May 31, 2022
@ulysses4ever ulysses4ever self-assigned this May 31, 2022
ulysses4ever added a commit to ulysses4ever/cabal that referenced this issue May 31, 2022
@mergify mergify bot closed this as completed in #8183 Jun 1, 2022
mergify bot added a commit that referenced this issue Jun 1, 2022
Avoid spurious warnings from -with-rtsopts (fix #4255)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants