Skip to content

With --deps-only pkg, no longer set pkg as a conflict#6520

Merged
kit-ty-kate merged 3 commits intoocaml:masterfrom
rjbou:no-self-conflict-deps-pkg
Jun 18, 2025
Merged

With --deps-only pkg, no longer set pkg as a conflict#6520
kit-ty-kate merged 3 commits intoocaml:masterfrom
rjbou:no-self-conflict-deps-pkg

Conversation

@rjbou
Copy link
Copy Markdown
Collaborator

@rjbou rjbou commented May 19, 2025

The current behaviour of opam install --deps-only foo creates deps-of-foo.y virtual packages that contains the dependencies of each foo.y and a conflict with foo != y.

This PR changes this behaviour.
It is intended for the case where foo.1 is installed in the switch, and we want to install foo.2. This leads to the removal of foo.1 from the switch even if we don't install foo.2 by itself.

related to #6501

@rjbou rjbou changed the title With --deps-only pkg, no loner set pkg as a conflict With --deps-only pkg, no longer set pkg as a conflict May 19, 2025
Comment on lines +39 to +42
=== install 3 packages
- install bar 1 [required by baz]
- install foo 1 [required by bar, truc]
- install truc 1 [required by foo]
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The information here is not very understandable : truc is not a dependency of foo.1, so we don't understand from where it comes.
Should we then add the information of the version to required by pkg messages?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracked in #6546

@rjbou
Copy link
Copy Markdown
Collaborator Author

rjbou commented Jun 12, 2025

A double check is needed on the newly added test as it is these tests that we will follow for the futures changes of behaviour of deps-only.

@rjbou rjbou force-pushed the no-self-conflict-deps-pkg branch from f5c7c2d to 2976f2e Compare June 13, 2025 16:49
- install sit 1 [required by lorem]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed deps-of-lorem.1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracked in #6167

Comment on lines +39 to +42
=== install 3 packages
- install bar 1 [required by baz]
- install foo 1 [required by bar, truc]
- install truc 1 [required by foo]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracked in #6546

@kit-ty-kate kit-ty-kate mentioned this pull request Jun 17, 2025
rjbou added 3 commits June 18, 2025 11:24
Install of dependencies (main + tests) from a local package, in the case
where the main package is already installed in switch from repository.
Only dependencies are taken into account instead of coinstability of the
requested packages
@kit-ty-kate kit-ty-kate force-pushed the no-self-conflict-deps-pkg branch from 2976f2e to 3ca9578 Compare June 18, 2025 10:26
@kit-ty-kate kit-ty-kate merged commit adfafa3 into ocaml:master Jun 18, 2025
44 checks passed
@kit-ty-kate
Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants