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

Force unique package #3331

Open
janmasrovira opened this issue Feb 13, 2025 · 1 comment
Open

Force unique package #3331

janmasrovira opened this issue Feb 13, 2025 · 1 comment
Labels

Comments

@janmasrovira
Copy link
Collaborator

janmasrovira commented Feb 13, 2025

Context

Currently it is allowed that the dependency tree of a project depends trasitively to the same package with different versions. Most often than not, this causes confusing errors or even crashes.
The use of the defaultStdlib option in Package.juvix often results in having different versions on the standard library in the same dependency tree, which causes the problems mentioned above.

Proposal

This proposal was sketched in a conversation with @paulcadman and @lukaszcz

Remove defaultStdlib

This option will be removed. The standard library will no longer be bundled with the compiler.
In the global package we will put a dependency of the most recent version of the standard library. Likewise with defaultPackage.

Do not allow different versions of the same package

The transitive dependency tree must have at most one version of each package.

Allow dependency overwriting

We would add a field to the Package.juvix that would associate packageName : String to packageVersion : SemVer.

The overwrite preferences of the parent package take precedence.

Add minimal compiler version field

We would add a field that indicates what's the minimal juvix version supported for that Package.

@janmasrovira
Copy link
Collaborator Author

Approved

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

No branches or pull requests

1 participant