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

Restructuring psibase macros #870

Merged
merged 19 commits into from
Nov 12, 2024
Merged

Restructuring psibase macros #870

merged 19 commits into from
Nov 12, 2024

Conversation

cool-ant
Copy link
Member

@cool-ant cool-ant commented Sep 29, 2024

This PR restructures the psibase_macros into a 3-project workspace for easier dev/testing.
In addition to the 3-project structure, it also splits service_macro.rs into separate files for better readability/maintainability.
There are a couple of TODOs but only in the test files and are notes for tests I can add; nothing functionally missing from this PR.

All files in the rust/psibase_macros/psibase-macros-lib/src/service_macro/ dir is unmodified code simply spilt out from the single formerly rust/psibase_macros/psibase-macros-lib/src/service_macro.rs into more bite-sized chunks.

@James-Mart James-Mart changed the title Restructing psibase macros Restructuring psibase macros Sep 30, 2024
@cool-ant cool-ant force-pushed the mm/restructing-psibase-macros branch from e5f4f90 to 260bf16 Compare October 3, 2024 16:04
@cool-ant cool-ant force-pushed the mm/restructing-psibase-macros branch from f60e1b9 to 3c50f06 Compare October 21, 2024 18:49
@cool-ant cool-ant force-pushed the mm/restructing-psibase-macros branch from ce554f8 to 1629e23 Compare October 22, 2024 15:26
@James-Mart James-Mart added the Dev Experience Related to the experience of developers label Oct 23, 2024
@cool-ant cool-ant marked this pull request as ready for review October 25, 2024 16:58
Copy link
Member

@James-Mart James-Mart left a comment

Choose a reason for hiding this comment

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

You can also add your unit tests to CI/CD in rust/CMakeLists.txt if they belong

}
};

service_macro_impl(attr, before);
Copy link
Member

Choose a reason for hiding this comment

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

service macro should expand without requiring a use to provide its deps

Does this actually check that the generated TokenStream compiles though?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, it only tests that the macro doesn't find syntax it doesn't recognize.

rust/test_psibase_macros/src/lib.rs Outdated Show resolved Hide resolved
doc/psidk/src/development/services/rust-service/package.md Outdated Show resolved Hide resolved
doc/psidk/src/development/services/rust-service/package.md Outdated Show resolved Hide resolved
@cool-ant cool-ant force-pushed the mm/restructing-psibase-macros branch from 56a35bb to 4291bab Compare October 29, 2024 15:19
@swatanabe
Copy link
Collaborator

You can also add your unit tests to CI/CD in rust/CMakeLists.txt if they belong

Was this addressed?

@cool-ant
Copy link
Member Author

You can also add your unit tests to CI/CD in rust/CMakeLists.txt if they belong

Was this addressed?

It is now.

@cool-ant cool-ant merged commit 3bffd2e into main Nov 12, 2024
4 checks passed
@cool-ant cool-ant deleted the mm/restructing-psibase-macros branch November 12, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev Experience Related to the experience of developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants