dart-lang / code_builder

A fluent API for generating valid Dart source code
https://pub.dev/packages/code_builder
BSD 3-Clause "New" or "Revised" License
423 stars 66 forks source link

update to allow for an unnamed library #438

Closed devoncarew closed 6 months ago

devoncarew commented 7 months ago

When trying to add an annotation to a library w/o a name, I get:

Bad state: a library name is required for annotations

However, as of a recent (3.0?) version of Dart, we no longer require library names for library directives.

srawlins commented 7 months ago

I'm happy to make this fix

devoncarew commented 7 months ago

That would be great! I ran into this while working on package:web (generated code from the Web IDLs) and had to work around the issue.

devoncarew commented 6 months ago

fixed by https://github.com/dart-lang/code_builder/pull/440