Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove package cycles #2196

Open
turadg opened this issue Apr 1, 2024 · 3 comments
Open

remove package cycles #2196

turadg opened this issue Apr 1, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@turadg
Copy link
Member

turadg commented Apr 1, 2024

What is the Problem Being Solved?

Lerna complains,

lerna WARN ECYCLE Dependency cycles detected, you should fix these!
lerna WARN ECYCLE @endo/compartment-mapper -> ses -> @endo/compartment-mapper
lerna WARN ECYCLE @endo/static-module-record -> (nested cycle: @endo/compartment-mapper -> ses -> @endo/compartment-mapper) -> @endo/static-module-record
lerna WARN ECYCLE (nested cycle: @endo/static-module-record -> (nested cycle: @endo/compartment-mapper -> ses -> @endo/compartment-mapper) -> @endo/static-module-record) -> (nested cycle: @endo/static-module-record -> (nested cycle: @endo/compartment-mapper -> ses -> @endo/compartment-mapper) -> @endo/static-module-record)

Since #1633 this repo doesn't have any cycles in its dependencies graph, but it still has cycles when including devDependencies.

Description of the Design

Refactor devDependencies to remove the cycles.

Security Considerations

Scaling Considerations

Test Plan

Compatibility Considerations

Upgrade Considerations

@turadg turadg added the enhancement New feature or request label Apr 1, 2024
@kriskowal
Copy link
Member

I’m not sure that it is possible to solve this problem. There is a certain meta-circularity in the dev toolchain. SES is at the bottom of the layer cake, but it reaches up to compartment-mapper/bundle.js to build the “rollups” in dist/* when it is published to npm.

@turadg
Copy link
Member Author

turadg commented Apr 3, 2024

I’m not sure that it is possible to solve this problem. There is a certain meta-circularity in the dev toolchain. SES is at the bottom of the layer cake, but it reaches up to compartment-mapper/bundle.js to build the “rollups” in dist/* when it is published to npm.

Does ses need the local version of component-mapper/bundle.js? If it's just using it to bundle, it could pull from NPM.

If ses has to depend on component-mapper then the parts of SES that compartment-mapper depends on could be moved into a lower dependency like @endo/ses-core.

@kriskowal
Copy link
Member

Compartment Mapper depends on Compartment but doesn’t depend on Lockdown. There is a possibility that we could separate the Compartment shim. Or, we could decompose Compartment into the underlying Module Harmony machinery for ModuleSource (StaticModuleRecord) and Module instance (to drive the dependency trampoline without necessarily executing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants