Add test to verify that ffigen-generated code is uptodate#180680
Add test to verify that ffigen-generated code is uptodate#180680goderbauer wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a test to verify that the ffigen-generated file is up-to-date. The test works by re-running ffigen and then checking git status to see if the generated file has changed. I've found a critical issue with how the package root path is determined, which will cause the test to fail. My review includes a suggestion to fix this.
| }); | ||
|
|
||
| test('ffigen-generated file is up-to-date', () async { | ||
| final String packageRoot = File.fromUri(Platform.script).parent.path; |
There was a problem hiding this comment.
The packageRoot is not pointing to the actual package root directory. File.fromUri(Platform.script).parent points to the test directory, but ffigen.yaml is located in the parent directory of test. This will cause the ffigen and git commands to fail because they are being executed from the wrong working directory. To fix this, you should navigate one level up in the directory structure to get the correct package root.
| final String packageRoot = File.fromUri(Platform.script).parent.path; | |
| final String packageRoot = File.fromUri(Platform.script).parent.parent.path; |
|
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
Greetings from stale PR triage! 👋 |
|
I'll close this for now until I have time to get back to it. |
No description provided.