-
Notifications
You must be signed in to change notification settings - Fork 113
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
feat: add sovereign.toml manifest file #792
Merged
Merged
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
This commit introduces a manifest file that can be parsed by derive macros and have its contents read at compile-time. It will read recursively the directory of the call site of the macro until it either finds a `sovereign.toml` file, or the path is depleted. The implementation for the source file location of proc macros depends on `procmacro2_semver_exempt`, and it will fallback to the manifest path of the `sov-modules-macros` library. The fallback may contain multiple edge cases as cargo will cache the downloaded crate into a `$HOME/.cargo` dir, making a recursion tree impossible to reach the workspace under normal circumstances. The aforementioned problem will be handled on the issue #786
Codecov Report
|
Merged
bkolad
reviewed
Sep 7, 2023
bkolad
approved these changes
Sep 7, 2023
preston-evans98
pushed a commit
that referenced
this pull request
Sep 14, 2023
* feat: add sovereign.toml manifest file This commit introduces a manifest file that can be parsed by derive macros and have its contents read at compile-time. It will read recursively the directory of the call site of the macro until it either finds a `sovereign.toml` file, or the path is depleted. The implementation for the source file location of proc macros depends on `procmacro2_semver_exempt`, and it will fallback to the manifest path of the `sov-modules-macros` library. The fallback may contain multiple edge cases as cargo will cache the downloaded crate into a `$HOME/.cargo` dir, making a recursion tree impossible to reach the workspace under normal circumstances. The aforementioned problem will be handled on the issue #786 * update manifest fn to return computed path * fix unit tests for manifest path * adjust link check for manifest test
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
This commit introduces a manifest file that can be parsed by derive macros and have its contents read at compile-time.
It will read recursively the directory of the call site of the macro until it either finds a
sovereign.toml
file, or the path is depleted.The implementation for the source file location of proc macros depends on
procmacro2_semver_exempt
, and it will fallback to the manifest path of thesov-modules-macros
library. The fallback may contain multiple edge cases as cargo will cache the downloaded crate into a$HOME/.cargo
dir, making a recursion tree impossible to reach the workspace under normal circumstances.The aforementioned problem will be handled on the issue #786
Linked Issues
sovereign.toml
for SDK config #786Testing
A unit test will read a dummy
sovereign.toml
file and parse it.Docs
N/A