Skip to content

Do depexts status check at opam update time #6489

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

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

arozovyk
Copy link
Collaborator

@arozovyk arozovyk commented Apr 25, 2025

Draft for #6461

@kit-ty-kate kit-ty-kate added this to the 2.5.0~alpha1 milestone Apr 25, 2025
@arozovyk arozovyk force-pushed the depexts_status_on_update_2 branch from a9ed214 to 6be401b Compare April 28, 2025 12:18
@arozovyk arozovyk force-pushed the depexts_status_on_update_2 branch 4 times, most recently from dac6fd8 to 4af5735 Compare June 6, 2025 10:35
Copy link
Collaborator

@rjbou rjbou left a comment

Choose a reason for hiding this comment

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

This is a first look, code only. I need to test and play with it to complete the review.

st
else
{st with sys_packages =
lazy ((OpamPackage.Map.union (fun x _ -> x)
Copy link
Collaborator

Choose a reason for hiding this comment

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

               lazy ((OpamPackage.Map.union (fun x _ -> x)

Why you take the first element, the one that is already in sys_package instead of updating with the new status ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If you remember, It did matter at some point which element to take but it was due to a buggy behaviour of the system overall that led to the fact that it had an importance.
Here, if the package is present in sys_package map, means that its status have already been computed (with depexts_status_of_packages by the way) and the status value is the same as from depexts_status_of_packages called here L1286.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This function is used in two cases : deps only newly created virtual packages and newly pinned packages. It is not an issue for the first case, but for the second case we want to retrieve the last information, no?
If this function is only meant to add new packages, the documentation and the implementation should be updated.

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed comp.1
Done.
Fatal error: External dependency handling not supported for OS family 'unknown'.
Copy link
Collaborator

Choose a reason for hiding this comment

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

error to investigate

@arozovyk arozovyk force-pushed the depexts_status_on_update_2 branch 10 times, most recently from c715f6a to 48e64e4 Compare June 24, 2025 09:44
@arozovyk arozovyk force-pushed the depexts_status_on_update_2 branch from 48e64e4 to 9d59425 Compare July 2, 2025 17:13
arozovyk and others added 3 commits July 25, 2025 19:11
The fix is not good as in the case where there is no depexts possible,
the previous version was returning an empty map and not supposing the
all packages are available. We may want to add another variant to `available_packages` to handle the no depext case ?
@rjbou rjbou force-pushed the depexts_status_on_update_2 branch from 9d59425 to 28b4831 Compare July 25, 2025 17:34
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.

3 participants