This repository was archived by the owner on Mar 1, 2019. It is now read-only.
Add a version field in the rls-data Analysis structure #16
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.
Per the discussion at rust-dev-tools/rls-analysis#130 (comment) it is desirable to have the
rls-data
crate version number baked into the serialized data. This should accomplish the job, I think, since it looks like thelibrustc_save_analysis
code just uses the the built-in serializer forrls-data
.Already the
rls-analysis
andlibrustc_save_analysis
code is required to use the samerls-data
version in order to be compatible, but this change will enable us to do a better job of checking compatibility at runtime and instead of silently failing. i.e. in the read_crate_data function we should be able to now report the version ofrls-data
that was used to produce the saved file.