-
Notifications
You must be signed in to change notification settings - Fork 1k
Please provide a way to suppress Bounded generic semantics are currently still in development
warnings from closure-make-deps
#1156
Comments
Slightly unrelated to your ask, but I saw this error message the other day and realized it was because I had the wrong syntax for closure-library/closure/goog/dom/dom.js Line 182 in ba7c8d7
|
True, and one solution would be to remove the bounds added by a colleague, but as we are busy porting to TypeScript which does support bounded generics it would be preferable not to lose this information in the mean time, and since the compiler already supports bounds to the extend of generating a warning about them and then ignoring them, it would be nice if we could just suppress the warning. |
I think this would entail some changes here: closure-library/closure-deps/lib/parser.js Line 255 in 5f0d878
|
Given that Closure Compiler does not actually treat the bounds correctly, if you're dead-set on retaining this information, you're probably better off doing so in a non-annotation comment. But I don't really understand quite what you're actually doing here - I assume you're migrating from JS to TS, but in that case, where are these bounds coming from? Are you trying to add them before actually cutting over to TS? Anyway, the error is there for a reason: the feature doesn't work, so we're not going to add an option to suppress it. |
A colleague added them. It is possible that they are more familiar with JSDoc as understood by
My thought was that it would be useful to keep this information in a form that some of the tooling we use (e.g. VisualStudio) understands, so that it might get transcribed automatically when we do the cut over.
That is a reasonable conclusion to this issue—though I note that I like the approach that Closure Compiler takes, where almost all the diagnostics can be made to be errors, non-fatal warnings, or suppressed entirely. (Though perhaps that is more complexity than is justified here.) |
Are you saying that the compiler already allows you to suppress this one? I find that surprising - I was under the impression that it was unsuppressible. I think the fact that Closure and TypeScript interpret it differently is likely to cause you to have a bad time. |
Declarations like
@template {ClassName} C
in the input toclosure-make-deps
provoke warnings like:Is there a way to suppress these warnings? If not, could one be added? I am happy to get warnings from the compiler about them (where I can suppress if desired), but I don't see why make-deps should care.
The text was updated successfully, but these errors were encountered: