Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bistable preference-dependent forking scenario (#207)
Another test for the resolver instability. > This test contains a bistable resolution scenario when not using ahead-of-time > splitting of resolution forks: We meet one of two fork points depending on the > preferences, creating a resolution whose preferences lead us the other fork > point. > > In the first case, we are in cleaver 2 and fork on `sys_platform`, in the > second case, we are in foo 1 or bar 1 amd fork over `os_name`. > > First case: We select cleaver 2, fork on `sys_platform`, we reject cleaver 2 > (missing fork `os_name`), we select cleaver 1 and don't fork on `os_name` in > `fork-if-not-forked`, done. > Second case: We have preference cleaver 1, fork on `os_name` in > `fork-if-not-forked`, we reject cleaver 1, we select cleaver 2, we fork on > `sys_platform`, we accept cleaver 2 since we forked on `os_name`, done. I've also included a tristable system with two iterations lead-up time that is accidentally created. It's not documented, but i wouldn't waste such a cursed scenario. With uv 0.2.31: ``` $ uv venv && rm -f uv.lock && uv lock --preview --refresh && echo "===" && uv lock --preview && echo "===" && uv lock --preview && echo "===" && uv lock --preview Using Python 3.12.3 interpreter at: /home/konsti/.local/bin/python3 Creating virtualenv at: .venv Activate with: source .venv/bin/activate Resolved 9 packages in 362ms === Resolved 8 packages in 140ms Updated preferences-dependent-forking-bistable-cleaver v1.0.0 -> v2.0.0 Removed preferences-dependent-forking-bistable-fork-if-not-forked v2.0.0, v3.0.0 Removed preferences-dependent-forking-bistable-fork-if-not-forked-proxy v1.0.0 Added preferences-dependent-forking-bistable-fork-sys-platform v1.0.0, v2.0.0 Removed preferences-dependent-forking-bistable-reject-cleaver1 v1.0.0, v2.0.0 Removed preferences-dependent-forking-bistable-reject-cleaver1-proxy v1.0.0 Added preferences-dependent-forking-bistable-reject-cleaver2 v1.0.0, v2.0.0 Added preferences-dependent-forking-bistable-reject-cleaver2-proxy v1.0.0 === Resolved 9 packages in 3ms Updated preferences-dependent-forking-bistable-cleaver v2.0.0 -> v1.0.0 Added preferences-dependent-forking-bistable-fork-if-not-forked v2.0.0, v3.0.0 Added preferences-dependent-forking-bistable-fork-if-not-forked-proxy v1.0.0 Removed preferences-dependent-forking-bistable-fork-sys-platform v1.0.0, v2.0.0 Added preferences-dependent-forking-bistable-reject-cleaver1 v1.0.0, v2.0.0 Added preferences-dependent-forking-bistable-reject-cleaver1-proxy v1.0.0 Removed preferences-dependent-forking-bistable-reject-cleaver2 v1.0.0, v2.0.0 Removed preferences-dependent-forking-bistable-reject-cleaver2-proxy v1.0.0 === Resolved 8 packages in 4ms Updated preferences-dependent-forking-bistable-cleaver v1.0.0 -> v2.0.0 Removed preferences-dependent-forking-bistable-fork-if-not-forked v2.0.0, v3.0.0 Removed preferences-dependent-forking-bistable-fork-if-not-forked-proxy v1.0.0 Added preferences-dependent-forking-bistable-fork-sys-platform v1.0.0, v2.0.0 Removed preferences-dependent-forking-bistable-reject-cleaver1 v1.0.0, v2.0.0 Removed preferences-dependent-forking-bistable-reject-cleaver1-proxy v1.0.0 Added preferences-dependent-forking-bistable-reject-cleaver2 v1.0.0, v2.0.0 Added preferences-dependent-forking-bistable-reject-cleaver2-proxy v1.0.0 ```
- Loading branch information