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

Dependency collisions (co-existence of multiple versions of the same assembly) #61

Closed
eladb opened this issue Jul 10, 2018 · 2 comments
Closed

Comments

@eladb
Copy link
Contributor

eladb commented Jul 10, 2018

Various host languages have varying degrees of support for co-existence of multiple versions of the same module within their runtime closure. For example, node/npm simply allows that (since the runtime closure is a directory tree), Java supports it only with certain class loaders, etc.

The questions are:

  1. Should the jsii-runtime support it (at the moment, it intentionally blocks this from happening)
  2. What happens in environments where this is not supported? Do we have a way to help users resolve these conflicts?
@RomainMuller
Copy link
Contributor

I think the compiler has opportunities to catch this problem, too. If jsii-runtime will not allow something, the compiler shouldn't allow it either (but they must still both validate, since what is built against may differ from what is run against).

@eladb
Copy link
Contributor Author

eladb commented Feb 17, 2019

We determined that the best approach for jsii would be to enforce that all dependencies are always specified as "peer dependencies". This forbids closures from including more than a single version of a certain module and essentially levels the playing field amongst jsii languages.

See: #361

@eladb eladb closed this as completed Feb 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants