-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Type paths to missing files in swg.js #18586
Copy link
Copy link
Closed
Description
New versions of Closure Compiler upgraded "module not found" from warnings to errors. For example:
amphtml/third_party/subscriptions-project/swg.js
Lines 2272 to 2278 in 6b112a7
| /** | |
| * @param {!../model/doc.Doc} doc | |
| */ | |
| constructor(doc) { | |
| /** @private @const {!../model/doc.Doc} */ | |
| this.doc_ = doc; | |
| } |
!../model/doc.Doc doesn't exist in the bundled SWG binary.
Unfortunately don't seem suppressible with @suppress {moduleLoad}, individually or at the @fileoverview level. The current workaround is to not fail the build on warnings in swg.js replace these types with * via regex (see #18589).
To fix this, we can either strip these bogus types, use externs, or bundle these missing classes.
Context: #18552
/to @jpettit /cc @dvoytenko @dparikh
Reactions are currently unavailable