Skip to content

Conversation

@goderbauer
Copy link
Member

No description provided.

@goderbauer goderbauer mentioned this pull request Jan 8, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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;
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

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.

Suggested change
final String packageRoot = File.fromUri(Platform.script).parent.path;
final String packageRoot = File.fromUri(Platform.script).parent.parent.path;

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.

1 participant