This repository was archived by the owner on May 4, 2024. It is now read-only.
[Move analyzer] Changed the max address length limit #260
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.
Motivation
Max length of the address in core Move is 16 bytes but this is not true for other Move applications where this length can be as long as 32 bytes. This PR modifies Move analyzer (and Move analyzer only) to use longer max length to avoid compilation errors for Move uses outside of Move core.
The max length is by default set to 32 bytes, but build-time options (via Cargo features) have been provided to either set it to core Move default (by resetting the default features of the Move analyzer) or by choosing 20 (or 32) bytes via selecting a specific Cargo feature.
EDIT:
It seems like defaulting to 32. bytes is not going to work without a more major restructuring of core Move code (as the feature the propagates to tests etc.), and this does not seem worthwhile at this point. A simpler option is to update the installation instructions after this PR lands.
Have you read the Contributing Guidelines on pull requests?
Yes