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

Fix issue #2289, apply ghc-options to snapshot pkg #2305

Merged
merged 1 commit into from
Jun 30, 2016

Conversation

AaronFriel
Copy link
Contributor

@AaronFriel AaronFriel commented Jun 25, 2016

Commit c891a24 created a regression, ghc-options were no longer applied to
packages in the snapshot. The "mini build plan" for missing snapshot packages
did not check the configuration's "ghc-options" settings at all, so even
configurations with "apply-ghc-options: everything" would not apply those
options.

This commit, combined with a change to config.yaml, fixes these issues:

DanielG/ghc-mod#762
IHaskell/IHaskell#636

To fix those issues, config.yaml (usually located in ~/.stack) should
contain:

apply-ghc-options: everything
ghc-options:
  "*": -opta-Wa,-mrelax-relocations=no

And for snapshots already installed, the following command will force stack
to rebuild them with those options:

stack exec -- ghc-pkg unregister $PACKAGENAME --force

Not tested: Alternatively, add the line rebuild-ghc-options: true to
config.yaml. This may cause undesirable behavior in forcing all ghc-options
changes to rebuild the snapshot.

Commit c891a24 created a regression, ghc-options were no longer applied to
packages in the snapshot. The "mini build plan" for missing snapshot packages
did not check the configuration's "ghc-options" settings at all, so even
configurations with "apply-ghc-options: everything" would not apply those
options.

This commit, combined with a change to config.yaml, fixes these issues:

DanielG/ghc-mod#762
IHaskell/IHaskell#636

To fix those issues,  (usually located in ) should
contain:

And for snapshots already installed, the following command will force stack
to rebuild them with those options:

*Not tested:* Alternatively, add the line  to
. This may cause undesirable behavior in forcing all ghc-options
changes to rebuild the snapshot.
@AaronFriel
Copy link
Contributor Author

Pinging @mgsloan

@mgsloan
Copy link
Contributor

mgsloan commented Jun 30, 2016

Thanks a bunch for figuring this out and opening a PR!!

@mgsloan mgsloan merged commit 5f06731 into commercialhaskell:master Jun 30, 2016
@CthulhuDen
Copy link
Contributor

CthulhuDen commented Jul 4, 2016

Is there any information on when this fix might land in release?

@sjakobi
Copy link
Member

sjakobi commented Jul 5, 2016

Is there any information on when this fix might land in release?

I agree that this an important bugfix that should be released as soon as possible.

There's another open bug that will have to be fixed before a release is possible though: #2296

@vaibhavsagar
Copy link

New release soon, now that the other issue has been closed?

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

Successfully merging this pull request may close these issues.

5 participants