-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Use global temp directory for run file outputs #48169
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to think about cleanup routines for when we're not on Windows using temp? Perhaps it could be a specific option to the run command so that every N runs we do a fire & forget process launch of e.g.
dotnet run --clean-run-cache
so that it doesn't run inside the process the user invoked.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we discussed the compiler server itself as a model for this, there is a temp subdirectory for each named pipe or some such, and the server will clean up the unused ones on startup.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaning this automatically would hurt perf because the build artifacts are used for incremental builds (and will be even more when we have caching). But I'd say
dotnet clean
could be updated to clean up this location.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That challenge with using
dotnet clean
is that it's specific project-centric (you run it on a specific project/solution), whereas in this case I think we'd want more of a cache-centric approach where it cleans up all items using an LRU approach.But agreed on the point of not wanting to impact run performance at all. The scenario is quite different to that of starting a long-running server.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's similar to the compiler server in that we likely don't have a point where user will realistically run a general
clean-fbp
tool or pointclean
at particular file-based program(s) whose artifacts should be cleaned up. Cleaning on startup (not necessarily every or most runs of dotnet run app.cs) feels plausible to me, whether it is done by leaving the N most recent builds in place or builds which are less than a week or a month old or some other basis.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're saying similar things, just that I think we'd want to do it in a way that doesn't impact the run time of an individual invocation, hence my original comment about making it a fire and forget launch of the clean operation on every N runs.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, but this is something we want to do in a separate PR, or no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean can come later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's get an issue logged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#48250