-
Notifications
You must be signed in to change notification settings - Fork 841
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
How can I prevent stack install
to run if I just run stack install --enable-library-profiling
?
#1102
Comments
stack install
to run if I just run stack install --enable-library-profiling
stack install
to run if I just run stack install --enable-library-profiling
?
This sounds like a regression to me. Pretty sure it used to work the way you want it to. To be clear: are your 160 dependencies mostly in the Stackage snapshot? |
@borsboom I would say yes; I have roughly 40 which are not being pulled from the stackage snapshots (i.e. they are separate lines in the I'm using stack |
I'm not able to reproduce this so far. I can toggle Do you have an example project that that demonstrates the problem? |
@borsboom Ah, I'm afraid that might be the culprit then. I cannot share the repo as it's a proprietary project, but I can share the stack.yaml file, which looks beefy enough:
Most of the deps are needed for Here is the silly question: I guess in such circumstance I'm out of luck and there is no way of preventing recompiling packages not in the snapshot? |
One workaround may be to use a custom snapshot. |
That sounds promising, I will have a look into that. I guess we can close this. I hope that this issue will be of some use to people tripping up on this such I did ;) Thanks! |
I've run into this as well. I'll try the workaround suggested here. Nonetheless, I think it would be great if Stack avoided unregistering a library being replaced until after the replacement is fully built (or rollback unregistration if the build is interrupted). Some atomicity would make it much less costly to make stupid mistakes with the tool. I say this after about the 10th time accidentally using the wrong set of options to build a big library and frantically hitting Ctrl-C, only to find that the damage is already done... |
Same here unfortunately. I guess a solution might be to have an option (toggable in the stack.yaml) which would refuse to do a |
Why is this closed ? I have the same problem (not doing install, but just |
It would also be helpful if one could specify the profiling options in stack.yaml, so at least they could be defaulted to in a given project / subsequent runs with the same stack.yaml file. |
@charles-cooper Hey! Yes, that's a good idea, which is tracked by #846 |
@mgsloan Cool :) Would I be duplicating work if I started working on this? Or is somebody already working on it |
Hey! Sorry for the delayed response, feel free to implement it! I've added a comment describing what I think would be good #846 (comment) |
Hey guys,
sorry for the not-terribly-informative title, I will try to expand a bit what I mean. I have a big project at work that I would like to profile, for example to chase space leaks. My frustration at the moment is that stack rebuilds my entire project (and ALL its dependencies!) if I accidentally do this:
This makes the entire profiling business too risky and simply not viable for me. What am I doing wrong?
Ideally, I would like stack to act a bit more like cabal here: one I pay the initial price to install the libs with profiling enabled, then all the other subsequent
stack install
install the underlying libs with profiling enabled, so that I have piece of mind of not unregistering everything by accident.Any way I can accomplish the following with ease?
Thank you very much!
Alfredo
The text was updated successfully, but these errors were encountered: