feat(compartment-mapper): Collect unused module descriptors #2614
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.
Closes: #2313
Description
This change adds instrumentation to the compartment mapper that allows it to omit module descriptors from archive compartment maps if they’re not needed to link the archived application.
Security Considerations
None.
Scaling Considerations
Should reduce bundle sizes.
Documentation Considerations
Does not merit attention and one less surprise for bundle size investigators. Noted in NEWS.
Testing Considerations
This change augments the existing test for compartment retention to cover module descriptor collection.
Compatibility Considerations
The change does not add the "retained" property to archived
compartment-map.json
, so new bundles should remain compatible with older versions ofcheckBundle
. However, I relaxed the schema validator to get an unrelated test forcaptureCompartmentMap
passing, so future deployments ofcheckBundle
will be more lenient.Upgrade Considerations
Should not affect upgrades.