Remove optimization criterion on OS mismatches (#43282)

This commit is contained in:
Massimiliano Culpo 2024-03-20 11:57:56 +01:00 committed by GitHub
parent ac8800ffc7
commit 7cb0dbf77a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1011,16 +1011,6 @@ node_os_weight(PackageNode, Weight)
attr("node_os", PackageNode, OS),
os(OS, Weight).
% match semantics for OS's
node_os_match(PackageNode, DependencyNode) :-
depends_on(PackageNode, DependencyNode),
attr("node_os", PackageNode, OS),
attr("node_os", DependencyNode, OS).
node_os_mismatch(PackageNode, DependencyNode) :-
depends_on(PackageNode, DependencyNode),
not node_os_match(PackageNode, DependencyNode).
% every OS is compatible with itself. We can use `os_compatible` to declare
os_compatible(OS, OS) :- os(OS).
@ -1509,16 +1499,6 @@ opt_criterion(39, "compiler mismatches that are not from CLI").
build_priority(PackageNode, Priority)
}.
% Try to minimize the number of compiler mismatches in the DAG.
opt_criterion(35, "OS mismatches").
#minimize{ 0@235: #true }.
#minimize{ 0@35: #true }.
#minimize{
1@35+Priority,PackageNode,DependencyNode
: node_os_mismatch(PackageNode, DependencyNode),
build_priority(PackageNode, Priority)
}.
opt_criterion(30, "non-preferred OS's").
#minimize{ 0@230: #true }.
#minimize{ 0@30: #true }.