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

Check package name conflicts #3352

Merged
merged 6 commits into from
Mar 7, 2025
Merged

Check package name conflicts #3352

merged 6 commits into from
Mar 7, 2025

Conversation

janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Mar 6, 2025

This pr adds a check that ensures no two packages in the dependency tree have the same name but different versions. Example error message:

/home/jan/projects/juvix/tests/negative/PackageNameConflict/dep2/Package.juvix:1:1: error:
The package dep is used with different versions:
• version 0.11.0-5075d2e2d2ea0ceedb49a53ad8daf559c89cb9c3f86b11853bcc1586907cf3d1
  • at /home/jan/projects/juvix/tests/negative/PackageNameConflict/dep2/
• version 1.0.0-5075d2e2d2ea0ceedb49a53ad8daf559c89cb9c3f86b11853bcc1586907cf3d1
  • at /home/jan/projects/juvix/tests/negative/PackageNameConflict/dep1/

I've added a global flag that disables this check: --unsafe-ignore-package-name-conflicts. I've added this flag just in case some existing Juvix project relied on the existing behaviour. We should probably remove it in the near future.

@janmasrovira janmasrovira self-assigned this Mar 6, 2025
@janmasrovira janmasrovira force-pushed the package-name-conflict branch 3 times, most recently from 67b9f0b to 2cf4b87 Compare March 6, 2025 15:18
@janmasrovira janmasrovira marked this pull request as ready for review March 6, 2025 17:49
@janmasrovira janmasrovira force-pushed the package-name-conflict branch from 8c4b324 to 57d1b5a Compare March 7, 2025 08:10
@janmasrovira janmasrovira requested a review from lukaszcz March 7, 2025 09:39
lukaszcz
lukaszcz previously approved these changes Mar 7, 2025
@lukaszcz lukaszcz merged commit adc3b81 into main Mar 7, 2025
4 checks passed
@lukaszcz lukaszcz deleted the package-name-conflict branch March 7, 2025 16:47
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

Successfully merging this pull request may close these issues.

2 participants