-
Notifications
You must be signed in to change notification settings - Fork 64
Conversation
I'm a little hesitant on this one. Some of our tools allow annotating the first import and treats it as if it was an annotation on the library, but that isn't really the way the grammar works as I understand it. If any tools aren't taking the extra step of reading annotations on the first import this feature will appear misleading. The slightly more correct way to annotate a library is to have a @jakemac53 - WDYT? If we had dart-lang/language#1073 this would be easy - we could always add a We could potentially add this feature for now with a comment calling out that support may be inconsistent, and then update it if we get that language feature. |
Would you be against In this case if you add an annotation but not a |
Ya I think we should require a named library from the user if we want to allow annotating it. |
@jakemac53 @natebosch should I also mixin |
c5bba7e
to
e38b032
Compare
Ok I just added the |
e38b032
to
c36646a
Compare
@natebosch @jakemac53 the library name is now generated. Happy to add documentation as well if that's something that you all want. Wasn't sure since #311 implied documentation might get a revamp. |
This generally LGTM but I will let Nate have the final say as he is more involved in this package |
@natebosch any thoughts on this? |
@donny-dont - sorry for the delay. This is published now. |
Adds the ability to annotate a
Library
generated bycode_builder
. This is to support scenarios like JavaScript interop usingpackage:js
where the library itself needs to be annotated with@JS()
.