You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We encountered this publish warning in our publishing automation (context):
Package validation found the following potential issue:
* The name of "lib/builder.dart", "builder", should match the name of the package, "shelf_router_generator".
This helps users know what library to import.
This is for a package where we do want to use lib/builder.dart for the entry-point instead of lib/shelf_router_generator.dart as the warning would suggest.
Can we either:
remove this warning from the set we generate (false positives are expensive), or
make warnings configurable per-package, so a package can intentional suppress them?
The configuration might be done in a section of the pubspec file or in some other durable location. Thanks!
The text was updated successfully, but these errors were encountered:
Yeah - publication warnings are not very ergonomic.
I am a bit wary of building a way of ignoring specific warnings, as that would involve quite some formalization of the set of warnings. (not saying it is bad, just a big task).
I wonder if we could push this warning into the analyzer as a hint/lint. The analyzer already has the // ignore: mechanism in place, and we run dart analyze as a publication validation step.
If there is only a single exposed library, we want it to be named the same as the package.
I think this is usually right, and maintains a somewhat nice convention (though personally I would have preferred a fixed name for the main library, but that is too late).
@pq do you think this would work as a hint/lint/warning?
We could also downgrade this warning to an "info", such that it doesn't block the upload, but it might still be seen by enough uploaders that it has some merit.
do you think this would work as a hint/lint/warning?
I think so. We have a file_names lint that enforces lowercase_with_underscores so there's precedent in hanging diagnostics off the first offset in a file.
We encountered this publish warning in our publishing automation (context):
This is for a package where we do want to use
lib/builder.dart
for the entry-point instead oflib/shelf_router_generator.dart
as the warning would suggest.Can we either:
The configuration might be done in a section of the pubspec file or in some other durable location. Thanks!
The text was updated successfully, but these errors were encountered: