-
Notifications
You must be signed in to change notification settings - Fork 844
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
Script command #2805 #2992
Merged
Merged
Script command #2805 #2992
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
snoyberg
force-pushed
the
2805-new-script-command-no-config-change
branch
4 times, most recently
from
February 10, 2017 12:25
65238e2
to
2019a56
Compare
Seems good to me 👍 |
snoyberg
force-pushed
the
2805-new-script-command-no-config-change
branch
4 times, most recently
from
February 15, 2017 16:49
205eac1
to
38473e7
Compare
This adds a basic script command. Most of the work involved has to do with preventing config files from being loaded. Originally we planned on creating an alternative set of config types for with and without a local config. That turned out to be prohibitively invasive. Instead, we now just create a dummy config file instead ~/.stack/script/lts-x.y (or /nightly-...). While this addresses reproducibility, it doesn't help with the speed concerns: script is now about 100ms faster than runghc on my system for the case where --package is provided, but it's still over a second for Hello World. The slowdown is inherent right now in checking if the relevant packages are installed. It would be nice to figure out a way to optimize the package check. Also, this should include some integration tests. It should be a simple matter of a test that includes a bogus stack.yaml and proving that stack script ignores it.
This was originally done to help implementation of #2805, but we ended up going a different route.
snoyberg
force-pushed
the
2805-new-script-command-no-config-change
branch
from
February 16, 2017 06:05
65720ab
to
011e4da
Compare
🍷 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a basic script command. Most of the work involved has to do
with preventing config files from being loaded. Originally we planned on
creating an alternative set of config types for with and without a local
config. That turned out to be prohibitively invasive. Instead, we now
just create a dummy config file instead ~/.stack/script/lts-x.y (or
/nightly-...).
While this addresses reproducibility, it doesn't help with the speed
concerns: script is now about 100ms faster than runghc on my system for
the case where --package is provided, but it's still over a second for
Hello World. The slowdown is inherent right now in checking if the
relevant packages are installed. It would be nice to figure out a way to
optimize the package check.
Also, this should include some integration tests. It should be a simple
matter of a test that includes a bogus stack.yaml and proving that stack
script ignores it.
Note: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the "stable" branch, not master.
Please include the following checklist in your PR:
Please also shortly describe how you tested your change. Bonus points for added tests!
Manual testing so far. We should definitely add some test cases. I used the same example as from the GUIDE.md update: