mirror of
https://github.com/rife2/bld
synced 2026-07-25 08:57:48 +02:00
Order inherited BOM precedence by the standard scope order
Some checks are pending
bld-ci / build (./bld, 17, macos-latest, false) (push) Waiting to run
bld-ci / build (./bld, 21, macos-latest, false) (push) Waiting to run
bld-ci / build (./bld, 25, macos-latest, false) (push) Waiting to run
bld-ci / build (./bld, 26, macos-latest, false) (push) Waiting to run
bld-ci / build (.\bld.bat, 17, windows-latest, false) (push) Waiting to run
bld-ci / build (.\bld.bat, 21, windows-latest, false) (push) Waiting to run
bld-ci / build (.\bld.bat, 25, windows-latest, false) (push) Waiting to run
bld-ci / build (.\bld.bat, 26, windows-latest, false) (push) Waiting to run
bld-ci / build (unittests, password, unittests, mariadb:10.9, mysql:8, gvenzl/oracle-free:latest, gvenzl/oracle-xe:18-slim, postgres:15, ./bld, 17, ubuntu-latest, true) (push) Waiting to run
bld-ci / build (unittests, password, unittests, mariadb:10.9, mysql:8, gvenzl/oracle-free:latest, gvenzl/oracle-xe:18-slim, postgres:15, ./bld, 21, ubuntu-latest, true) (push) Waiting to run
bld-ci / build (unittests, password, unittests, mariadb:10.9, mysql:8, gvenzl/oracle-free:latest, gvenzl/oracle-xe:18-slim, postgres:15, ./bld, 25, ubuntu-latest, true) (push) Waiting to run
bld-ci / build (unittests, password, unittests, mariadb:10.9, mysql:8, gvenzl/oracle-free:latest, gvenzl/oracle-xe:18-slim, postgres:15, ./bld, 26, ubuntu-latest, true) (push) Waiting to run
javadocs-pages / deploy (push) Waiting to run
Some checks are pending
bld-ci / build (./bld, 17, macos-latest, false) (push) Waiting to run
bld-ci / build (./bld, 21, macos-latest, false) (push) Waiting to run
bld-ci / build (./bld, 25, macos-latest, false) (push) Waiting to run
bld-ci / build (./bld, 26, macos-latest, false) (push) Waiting to run
bld-ci / build (.\bld.bat, 17, windows-latest, false) (push) Waiting to run
bld-ci / build (.\bld.bat, 21, windows-latest, false) (push) Waiting to run
bld-ci / build (.\bld.bat, 25, windows-latest, false) (push) Waiting to run
bld-ci / build (.\bld.bat, 26, windows-latest, false) (push) Waiting to run
bld-ci / build (unittests, password, unittests, mariadb:10.9, mysql:8, gvenzl/oracle-free:latest, gvenzl/oracle-xe:18-slim, postgres:15, ./bld, 17, ubuntu-latest, true) (push) Waiting to run
bld-ci / build (unittests, password, unittests, mariadb:10.9, mysql:8, gvenzl/oracle-free:latest, gvenzl/oracle-xe:18-slim, postgres:15, ./bld, 21, ubuntu-latest, true) (push) Waiting to run
bld-ci / build (unittests, password, unittests, mariadb:10.9, mysql:8, gvenzl/oracle-free:latest, gvenzl/oracle-xe:18-slim, postgres:15, ./bld, 25, ubuntu-latest, true) (push) Waiting to run
bld-ci / build (unittests, password, unittests, mariadb:10.9, mysql:8, gvenzl/oracle-free:latest, gvenzl/oracle-xe:18-slim, postgres:15, ./bld, 26, ubuntu-latest, true) (push) Waiting to run
javadocs-pages / deploy (push) Waiting to run
This commit is contained in:
parent
d7d176eef6
commit
7d77f48aec
|
|
@ -77,12 +77,13 @@ public class DependencyScopes extends LinkedHashMap<Scope, DependencySet> {
|
||||||
* {@code runtime} and {@code test} scopes, and the {@code runtime} and
|
* {@code runtime} and {@code test} scopes, and the {@code runtime} and
|
||||||
* {@code provided} scope BOMs also apply to the {@code test} scope.
|
* {@code provided} scope BOMs also apply to the {@code test} scope.
|
||||||
* The BOMs are returned with the scope's own BOMs first, followed by
|
* The BOMs are returned with the scope's own BOMs first, followed by
|
||||||
* the inherited ones from the more specific to the more general scope,
|
* the inherited ones in the standard scope order, for the {@code test}
|
||||||
* for the {@code test} scope that is {@code test}, {@code runtime},
|
* scope that is {@code test}, {@code compile}, {@code provided},
|
||||||
* {@code provided}, {@code compile}. This order determines their
|
* {@code runtime}. This order determines their precedence when several
|
||||||
* precedence when several manage the same dependency: a BOM declared
|
* manage the same dependency: a BOM declared in the scope where a
|
||||||
* in the scope where a dependency is used takes precedence over a BOM
|
* dependency is used takes precedence over a BOM that is inherited from
|
||||||
* that is inherited from a broader scope.
|
* another scope, and among the inherited BOMs the more fundamental
|
||||||
|
* scope wins.
|
||||||
* <p>
|
* <p>
|
||||||
* The {@code standalone} scope only uses its own BOMs, and its BOMs
|
* The {@code standalone} scope only uses its own BOMs, and its BOMs
|
||||||
* deliberately never apply to any other scope.
|
* deliberately never apply to any other scope.
|
||||||
|
|
@ -106,7 +107,7 @@ public class DependencyScopes extends LinkedHashMap<Scope, DependencySet> {
|
||||||
return switch (scope) {
|
return switch (scope) {
|
||||||
case provided -> new Scope[]{Scope.provided, Scope.compile};
|
case provided -> new Scope[]{Scope.provided, Scope.compile};
|
||||||
case runtime -> new Scope[]{Scope.runtime, Scope.compile};
|
case runtime -> new Scope[]{Scope.runtime, Scope.compile};
|
||||||
case test -> new Scope[]{Scope.test, Scope.runtime, Scope.provided, Scope.compile};
|
case test -> new Scope[]{Scope.test, Scope.compile, Scope.provided, Scope.runtime};
|
||||||
default -> new Scope[]{scope};
|
default -> new Scope[]{scope};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -526,7 +526,7 @@ public class TestBom {
|
||||||
assertEquals(List.of(compile_bom), scopes.effectiveBoms(compile));
|
assertEquals(List.of(compile_bom), scopes.effectiveBoms(compile));
|
||||||
assertEquals(List.of(provided_bom, compile_bom), scopes.effectiveBoms(Scope.provided));
|
assertEquals(List.of(provided_bom, compile_bom), scopes.effectiveBoms(Scope.provided));
|
||||||
assertEquals(List.of(runtime_bom, compile_bom), scopes.effectiveBoms(Scope.runtime));
|
assertEquals(List.of(runtime_bom, compile_bom), scopes.effectiveBoms(Scope.runtime));
|
||||||
assertEquals(List.of(test_bom, runtime_bom, provided_bom, compile_bom), scopes.effectiveBoms(Scope.test));
|
assertEquals(List.of(test_bom, compile_bom, provided_bom, runtime_bom), scopes.effectiveBoms(Scope.test));
|
||||||
assertEquals(List.of(standalone_bom), scopes.effectiveBoms(Scope.standalone));
|
assertEquals(List.of(standalone_bom), scopes.effectiveBoms(Scope.standalone));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue