-
Notifications
You must be signed in to change notification settings - Fork 82
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
Rel/0.7.0 rc.1 #185
Open
rory-ocl
wants to merge
56
commits into
main
Choose a base branch
from
rel/0.7.0-rc.1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rel/0.7.0 rc.1 #185
Conversation
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
These tests are important before upgrading alloy to avoid misuing their API and causing errors.
This alloy version includes generic integer types, so instead of implementing those on our end, we special case the built-in integer sizes so they work with both primitive ints and alloy generics.
This is a rather large refactor of the stylus proc macros with the main goal of improving maintainability, testability, and documentation of these macros. The following changes have been made: - Operate on AST nodes instead of raw tokens. This allows testing of smaller parts of the macros as unit tests. This also allows some composibility within the implementations. - Use the visitor pattern in several places to avoid confusing nesting of for-loops. - Separation of export-abi code using "extention" traits so that it is easy to reason about export-abi when needed, and otherwise ignore it. - Improved error reporting. The main change here is the ability to report multiple errors when compilation fails, allowing the user to see all errors at once. There is also some small changes with regards to consistency between the macros. - Unit tests for utilities and macro generation at the AST level. This includes a `assert_ast_eq()` function which can be used to compare two ASTs of the same type. If an error occurs, the ASTs are pretty printed and a diff is output so that the issue can be easily addressed. - Integration tests in the `stylus-proc/tests` directory. These allow compiled macros to be tested as working correctly. Additionally the `stylus-proc/tests/fail` directory will contain failing integration tests. These all fail to compile and include expected stderr outputs. - Modify code snippets within docstrings so that they are not ignored, and pass as part of the `cargo test` process. - A `README.md` which will contain information about developing and maintaining these proc macros. - Support for `solidity.path.separator` to `rust::path::separator` for custom structs within `sol_interface!` definitions. - Change the folder structure to have all macro implementations in a `macros` module. Easier to find the macro implementation you are looking for. - Docstrings within the macro implementations for developer reference. - Utilities for handing inner attributes including those which contain tokens which need to be parsed. A little more work is going to be done before this is ready for merge, but it will be good to get this out for review since it is such a large set of changes.
This reverts commit 4a019e4.
Previousy it was possible to define storage for ints and uints which whose bit size was not divisible by 8. This was both broken, and is not intended as a supported feature of Stylus. This has been changed into a compile-time error to avoid using these broken types.
Website was recently updated, so need to update URLs to match
rauljordan
approved these changes
Dec 16, 2024
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.
LGTM
This was broken due to a change in the updated alloy version.
gligneul
approved these changes
Dec 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
0.7.0 Release Candidate 1
Includes all code from
develop
branch, ready to merge intomain
.Checklist