Commit 4ce024f
committed
Resolve artifact ambiguities using shortest match
This changes the behavior of `select_platform()` to resolve ambiguities
using a two-step process. Previously, we would simply sort the
resultant triplets and return the last one (so as to provide asemi-
arbitrary stability, and also to prefer higher version numbers over
lower version numbers in tags). However, with the proliferation of tags
(and especially the new `sanitize=memory` tags) we need a way to exclude
these "extra" tags when our `HostPlatform()` does not have them.
This new matching algorithm excludes candidates from matching with the
platform if there are other candidates with fewer total tags. This
results in a "simplest match first" behavior, which better represents
the intent of tags in the first place.1 parent f48194c commit 4ce024f
2 files changed
+28
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1067 | 1067 | | |
1068 | 1068 | | |
1069 | 1069 | | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
1075 | | - | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
1076 | 1084 | | |
1077 | 1085 | | |
1078 | 1086 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
| 318 | + | |
319 | 319 | | |
| 320 | + | |
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
| |||
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
330 | | - | |
331 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
332 | 335 | | |
333 | 336 | | |
334 | 337 | | |
| |||
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
342 | 353 | | |
343 | 354 | | |
344 | 355 | | |
| |||
0 commit comments