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.
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
Add more information to wait-for-publish #11713
Add more information to wait-for-publish #11713
Changes from all commits
261249a
5bea4ab
7b19a6e
7e4764a
f60666c
7b317f3
3c295cf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Wait, don't we cache sources generally (and the "wait" logic has to workaround that)? I feel like mutating a cached item like this is pretty brittle (in an already brittle system) and I'd hope we can find a way to avoid making it worse.
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'm not sure I follow. Sources are inherently mutable. I'm not sure I would say they are "cached" so much as they are lazily created as needed and held in the
SourceMap
. But by their nature they are accessed from the map and mutated as needed.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.
As for the caching / lazy loading, I don't remember the details but I do remember running into a lot of problems implementing this because I was getting stale state due to caches that said "everything is loaded, no reason to talk to the server again".
From my quick glance, they are mutated as-needed in that you invalidate their cache and they reload. I didn't see any other real "state" to them that could leak from one operation to another. That is what I'm concerned about. As I said, I ran into a lot of problems with cargo assuming everything was only done once because commands are transient but when a command needed to do things multiple times, they broke. While I am not refreshed on all the details to map out whether its actually safe or not, this feels like one of those things that could easily cause people problems in the future.