Skip to content
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

Fix Metadata as Source caching stale generated files #38064

Merged

Conversation

jasonmalinowski
Copy link
Member

We maintain a cache of assembly file names and symbols to the generated file. We failed to ever include a version of some kind, so if the metadata file changed on disk, you would continue to get the old generated file.

Commit-at-a-time is recommended; I first nullable annotated the feature before doing work in it.

We maintain a cache of assembly file names and symbols to the generated
file. We failed to ever include a version of some kind, so if the
metadata file changed on disk, you would continue to get the old
generated file.
@jasonmalinowski jasonmalinowski requested a review from a team as a code owner August 16, 2019 22:50
@@ -9,6 +13,9 @@ internal class SymbolMappingResult

internal SymbolMappingResult(Project project, ISymbol symbol)
{
Contract.ThrowIfNull(project);
Contract.ThrowIfNull(symbol);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 These should be argument validations instead of Contract.ThrowIfNull.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll be converting them all to the new syntax soon enough I suspect...

@jasonmalinowski jasonmalinowski merged commit 5551fad into dotnet:master Aug 19, 2019
@jasonmalinowski jasonmalinowski deleted the fix-metadata-as-source-caching branch August 19, 2019 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants