-
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
Profiling build defaults #4032
Comments
I do this all the time, Do you know if it is also required to have a |
Only downside I can see is screwing up gitignore files, but that seems a small price to pay. What about doing it as a subdir of .stack-work? I don't even know if that will work. |
@snoyberg could be a good idea in part because of we always suffix the profiling version of a build then anyone making custom use of workdirs like I was would benefit from this behavior across the board. Not sure if this is the ideal approach or not, though. |
Working on this from the hackathon: haskell-hackathon/#5. |
Hey @gavwhela, just bumping this. Any questions on the codebase? |
I just experienced this pain and agree --profile should, at the very least, be a sticky flag. I agree there needs to be a way to customize stack at some level. Has there been any thought into adding custom synonyms i.e. |
I think using a subdir of However, using a subdir of
A little experimentation makes me suspect the problem is that Stack doesn't do the equivalent
fails with
Should be trivial to fix that. |
I'm a bit worried that choosing a new working directory will duplicate more than the absolute necessary. It's already the case that after |
Any update on this issue? This would be a lovely feature to have, and think that @ntc2 makes some good points regarding the implementation. |
Afaict, this issue is ready for someone to work on now. It seems like no one has volunteered to do it yet |
Ahh, so do you think it's safe to assume @gavwhela has stopped working on it? |
Totally forgot that he'd been working on it and didn't see it when reviewing this issue :) Yeah, I think it's safe to assume that at this point. |
As #4412 and #4582 (with some tests, see #4308 (comment)) were merged I think this one was implemented by resolving #3922 |
It's probably still worthwhile to have a separate .stack-work for profiling builds for all mutable packages. You're right that the implicit snapshots work will drastically improve the situation already. |
Oh, right, that's about |
I have a general question about Stack's ability to reuse work when changing flags like I was reading this blog post about the current state of the cabal/stack divide, and it has this paragraph:
I'm a longtime stack user but this one aspect of cabal seems really nice. I think it would be worth viewing this problem in the more general setting of keeping/reusing build artifacts compiled with different flags. The cabal behavior described above sounds like the ideal. Would it be possible for stack to solve the problem in the same general way? |
I have an SO answer on how to use $ stack path --local-install-root
/tmp/prof-test/.stack-work/install/x86_64-linux/645ca5b89c41f1c9c1d95cd056827eb0ff49366e41dc71baafee7e8750f3202f/8.6.5
$ stack path --profile --local-install-root
/tmp/prof-test/.stack-work/install/x86_64-linux/56dac42cad4cb0f4eed3c37ccc75047b71308bac53fbd2316970727a0981353f/8.6.5 Is this due to "implicit snapshots"? |
@bitemyapp's Makefiles are a treasure trove of build tips. Here's a trick for profiling builds:
This tremendously improves build caching, at the expense of disk space.
Can this be a default behavior, or at least, enabled via a global config flag or similar? It is soul crushing to have to rebuild all of the deps for a large project for profiling, and rebuild them again for normal mode.
The text was updated successfully, but these errors were encountered: