This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Embed runtime version as a custom section #8688
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
217a874
emit a custom section from impl_runtime_apis!
pepyakin 259d06a
Introduce `runtime_version` proc macro
pepyakin 03eea2b
Parse custom wasm section for runtime version
pepyakin d4a3038
Apply suggestions from code review
pepyakin ceced97
Fix sc-executor integration tests
pepyakin 422363a
Merge remote-tracking branch 'origin/master' into ser-embed-runtime-v…
pepyakin 76f6c37
Nits
pepyakin 53ffc97
Refactor apis section deserialization
pepyakin 866b13f
Fix version decoding
pepyakin 0f13caa
Reuse uncompressed value for CallInWasm
pepyakin 93f2036
Log on decompression error
pepyakin 78fb99e
Simplify if
pepyakin 84c63c0
Reexport proc-macro from sp_version
pepyakin d0ec418
Merge ReadRuntimeVersionExt
pepyakin 1621d6c
Export `read_embedded_version`
pepyakin 689116a
Fix test
pepyakin bc41d06
Simplify searching for custom section
pepyakin 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
Maybe
new
should do this? IMHO the name indicates that this is done on an already existing reference, while actually we create an instance with this methodThere 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.
You mean because it's
uncompress
but returnsSelf
? I don't think it is unheard of, even though thatnew_*
,from_*
orwith_*
are the most common. For example, there isTcpStream::connect
which returnsSelf
.I also had an idea about putting it in
new
, but in the end I decided to go withuncompress
to indicate at the call sites , mainly in sc-executor, that the code may be compressed at that point. If compression were hidden innew
, it would be even harder to find out.I do agree that it is a small thing and perhaps is not that useful, so I can tuck this logic under
new
if you wish so.