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

Add built_value test macro. #144

Merged
merged 2 commits into from
Nov 21, 2024
Merged

Conversation

davidmorgan
Copy link
Contributor

I figured we can use a macro that fully uses phase 1+2 for benchmarking, some approximation to built_value seems a good fit.

I found a few fixes needed before I got to adding fields, so I figured I'd send already.

}

String _removePrefix(String name) {
final index = name.indexOf('.');
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment to this function describing exactly what prefix it is removing? I am confused.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

It's import prefixes, so @prefix0.BuiltValueBuilder() in the macro output was resulting in name prefix0.BuiltValueBuilder here. The prefix is meaningless since we have the URI and what we care about is the name in that URI.

@davidmorgan davidmorgan merged commit e9b480a into dart-lang:main Nov 21, 2024
51 checks passed
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.

2 participants