-
Notifications
You must be signed in to change notification settings - Fork 105
Add support for rts-options #434
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1676,6 +1676,36 @@ spec = around_ (inTempDirectoryNamed "foo") $ do | |
| ghc-options: -main-is Foo | ||
| |] | ||
|
|
||
| describe "rts-options" $ do | ||
| it "maps rts-options to ghc-options" $ do | ||
| [i| | ||
| executable: | ||
| main: Main.hs | ||
| rts-options: -s -N | ||
| |] `shouldRenderTo` executable_ "foo" [i| | ||
| main-is: Main.hs | ||
| ghc-options: "-with-rtsopts -s -N" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do these need to be quoted, like
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From reading the motivation for this PR, this it's what I capture: Giving Regarding quoting, I assume that what this PR currently does works with Cabal. I haven't tried it again just yet, but pretty sure that I tried when I originally wrote this.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just tried a bunch of things. Here are my findings:
TL;DR: I'd recommend
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This Cabal issue is very related: haskell/cabal#4818
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @tfausak for doing all the heavy lifting. I rarely talk about it in public, but I have had issues with RSI for several years now. when it flares up, I have to stay away from the computer. This is the reason why sometimes I'm less responsive than what I would hope to be. The TL;DR of it is that I am away from the computer. We still need the read me update, change log entry and version bump. I can try to take care of it eventually. But if somebody wants to lend a hand, then that's still very much appreciated. Releases are fully automated once the version bump hits main. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd be happy to do the README.md update etc today. |
||
| |] | ||
|
|
||
| context "inside a conditional" $ do | ||
| it "includes rts-options from outer scope" $ do | ||
| [i| | ||
| executable: | ||
| main: Main.hs | ||
| rts-options: -s | ||
| when: | ||
| condition: flag(use-threading) | ||
| rts-options: -N | ||
| |] `shouldRenderTo` executable "foo" [i| | ||
| main-is: Main.hs | ||
| ghc-options: "-with-rtsopts -s" | ||
| other-modules: | ||
| Paths_foo | ||
| default-language: Haskell2010 | ||
| if flag(use-threading) | ||
| ghc-options: "-with-rtsopts -s -N" | ||
| |] | ||
|
|
||
| describe "when" $ do | ||
| it "accepts conditionals" $ do | ||
| [i| | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.