-
Notifications
You must be signed in to change notification settings - Fork 6k
Add relative directory support to symbols validation script. #35936
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
testing/symbols/verify_exported.dart
Outdated
| if (p.isRelative(outPath)) { | ||
| /// If path is relative then create a full path starting from the engine checkout | ||
| /// repository. | ||
| outPath = p.join(p.dirname(Platform.script.toFilePath()), '..', '..', '..', outPath); |
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.
If the engine/repo root is available in an environment variable, then that would allow this script to move around, or to be compiled as part of the build.
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.
Sounds good, made the change but need to validate it works end to end. I'll confirm once I get that validation.
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.
Confirmed that it works correctly!
zanderso
left a comment
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 w/ error message
| if (p.isRelative(outPath)) { | ||
| /// If path is relative then create a full path starting from the engine checkout | ||
| /// repository. | ||
| final String engineCheckoutPath = Platform.environment['ENGINE_CHECKOUT_PATH']!; |
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.
If the environment variable isn't defined, then it might be good to give a more helpful error message.
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.
Done! added a few lines to print an error if the env variable doesn't exist.
This is to be able to run the validation from the recipes v2.
This is to be able to run the validation from the recipes v2.
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.