Skip to content

Conversation

@cpcallen
Copy link
Collaborator

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Proposed Changes

Modify buildDeps gulp target (in build_tasks.js) to only suppress expected warnings from closure-make-deps.

Behaviour Before Change

All stderr output from closure-make-deps redirected to /dev/null

Behaviour After Change

stderr output from closure-make-deps read 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 invalid imports, 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 that closure-make-deps may 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 buildDeps to be more selective about what is suppresses.

Additional Information

Alas it turns out that closure-make-deps does not in fact care if you attempt to import a 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.

@cpcallen cpcallen added component: build process PR: chore General chores (dependencies, typos, etc) labels Aug 15, 2022
@cpcallen cpcallen requested a review from a team as a code owner August 15, 2022 17:47
@cpcallen cpcallen requested a review from gonfunko August 15, 2022 17:47
Copy link
Contributor

@BeksOmega BeksOmega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines +343 to +344
!(/Missing type declaration./.test(line) ||
/illegal use of unknown JSDoc tag/.test(line)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we'll be dealing with this long enough that it would be useful to separate these out into an array?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I sincerely hope not. But when I find myself a fourth regexp to this conditional then it will be time to reevaluate…

}
});
})).then(() => {
done();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this fixing the prepare error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not as far as I know!

The switch to Promises is to allow the non-Sync version of exec to be used (which in turn is so that we can capture stderr even when the child process does exit(0)). We still need to make sure done() is called after all the rest of the work is done, though, as it was in the original version. (We could of course alternatively return a vinyl stream, but that doesn't seem applicable for this task.)

@cpcallen cpcallen merged commit 883d78d into RaspberryPiFoundation:develop Aug 18, 2022
@cpcallen cpcallen deleted the less-suppression branch August 18, 2022 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: build process PR: chore General chores (dependencies, typos, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants