Add a test to warn if `node bin/bundle.js` needs to be executed
Categories
(DevTools :: Debugger, task, P3)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
Details
After updating some files in devtools, it is necessary to regenerate the debugger bundles:
cd devtools/client/debugger
yarn
node bin/bundle.js
But if you don't have tests checking the change your patch, you might land a fix without regenerating the necessary bundles.
Ideally we should have a test on CI that complains when one of the bundle sources has changed and the bundles have not been regenerated.
One option would be to generate the bundles during a test and compare them with the ones currently in the source control. If they don't match fail the test. However for this to work it needs to only fail when a devtools source changes. If an external dependency updates because we are not importing a hardcoded version, this won't be acceptable.
Another option is to generate content hashes for all the devtools files that compose the bundle, store those hashes and check it didn't change.
Comment 1•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•4 years ago
•
|
||
Yes, a mochitest is a great idea.
We have a lockfile so external packages should not change.
the hash file seems a bit too rigid
Description
•