Open Bug 1650783 Opened 4 years ago Updated 4 years ago

Add a test to warn if `node bin/bundle.js` needs to be executed

Categories

(DevTools :: Debugger, task, P3)

task

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.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: General → Debugger

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

You need to log in before you can comment on or make changes to this bug.