-
Notifications
You must be signed in to change notification settings - Fork 83
[ffigen] fix missing exports used in the FfiGenerator
#2766
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
Conversation
FfiGeneratorFfiGenerator
FfiGeneratorFfiGenerator
PR HealthLicense Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
This check can be disabled by tagging the PR with API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with Breaking changes ✔️
This check can be disabled by tagging the PR with Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with |
|
Thanks @josxha! 🙏
It's unlikely that users would already depend on and import package Maybe it would be even better to just make a
I'm assuming that package uses correct semantic versioning (pun intended), so we'd have to bump the major version on breaking changes. And when we do, our dart_apitool integration should flag it as a required breaking change. |
|
Thanks, but I already have a CL out that fixes this: #2768
Why would it be an issue if they did import
The only logic we need is parsing strings to versions, and comparing two versions. It wouldn't be hard to write our own |
Usability: non unique imports. It would be ambiguous which of the two packages to import. And then if you first import package pub_semver, and then later FFIgen, then the pub semver import is not needed because all imports are already in package FFIgen. However, I don't believe this to be a likely scenario. So, it's okay to me to export pub semver's version. |
|
Thanks for the feedback. I'm closing this pr as it gets superseeded by Liams' in #2768.
I think the lints will point in the right direction. Seee for example the failed ci in this pr where it flagged info • The import of 'package:pub_semver/pub_semver.dart' is unnecessary because all of the used elements are also
provided by the import of 'package:ffigen/ffigen.dart' • test/large_integration_tests/large_objc_test.dart:19:8 • unnecessary_import |
This pr exports a missing class and some enums used by the
FfiGenerator.FfiGenerator(ffigen v20.0.0) #2765CommentLength,CommentStyleandEnumStyleVersionCaution: The class
Versioncomes from the pub_semver package. In general I'd say exporting an external class introduces some risk in case the package does not follow semantic versioning. In this case however it is a tools.dart.dev package, so in my opinion the risk is neglectable.Contribution guidelines:
dart format.Many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.
Note: The Dart team is trialing Gemini Code Assist. Don't take its comments as final Dart team feedback. Use the suggestions if they're helpful; otherwise, wait for a human reviewer.