endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
761 stars 68 forks source link

feat(compartment-mapper): Collect unused module descriptors #2313

Open kriskowal opened 3 weeks ago

kriskowal commented 3 weeks ago

What is the Problem Being Solved?

When building an archive, the compartment mapper currently collects unused compartment descriptors, but the increased prevalence of package exports has created a lot of unused module descriptors.

Description of the Design

We should mark and sweep these too, as we do with the compartment “retained” flag.

Security Considerations

None.

Scaling Considerations

Should reduce bundle size.

Test Plan

Compatibility Considerations

May frustrate hashes of existing applications when they upgrade bundle-source in their package lock. I hope we no longer support system-level agoric CLI since upgrading that will frustrate hashes without opt-in.

Upgrade Considerations

None.