chore(build): Only suppress expected warnings from closure-make-deps #6350
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The basics
npm run formatandnpm run lintThe details
Proposed Changes
Modify
buildDepsgulp target (inbuild_tasks.js) to only suppress expected warnings fromclosure-make-deps.Behaviour Before Change
All
stderroutput fromclosure-make-depsredirected to/dev/nullBehaviour After Change
stderroutput fromclosure-make-depsread by the gulp task and logged to console after filtering known-Reason for Changes
While preparing PR #6337, @BeksOmega discovered that our block tests (in
tests/mocha/blocks/) were not being run. This was due to invalidimports, where several of those files attempted to import from../../build/…instead of../../../build/…. I was surprised that this did not provoke more complaints from various parts of our build/test infrastructure, and it occurred to me thatclosure-make-depsmay have discovered the problem and reported it but we threw the error in the bit-bucket along with all the actually-spurious warnings it generates.Thus I modified
buildDepsto be more selective about what is suppresses.Additional Information
Alas it turns out that
closure-make-depsdoes not in fact care if you attempt toimporta file that does not actually exist. Still, it is probably better that we be less heavy-handed in suppressing its warnings generally, so it seems worthwhile keeping the change I made.