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

Validate absolute path for substitute_type #577

Merged
merged 4 commits into from Jun 22, 2022
Merged

Conversation

lexnv
Copy link
Contributor

@lexnv lexnv commented Jun 21, 2022

This PR validates that substitute types have a global absolute path to ensure
the type is accessible at every level of the module hierarchy.

To ensure that paths are absolute global paths they must be:

  • prefixed by ::
  • or prefixed by crate

For validation purposes, a new ui test is added to capture compile failures.

Closes #539.

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv self-assigned this Jun 21, 2022
Copy link
Member

@ascjones ascjones left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@jsdw jsdw left a comment

Choose a reason for hiding this comment

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

Looks great; nice job!

@jsdw jsdw merged commit a912986 into master Jun 22, 2022
@jsdw jsdw deleted the 539_substitute_type branch June 22, 2022 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate absolute path for substitute_type
3 participants