Skip to content

Commit 5effd60

Browse files
[projmgr] Fix optional empty layer report
1 parent 8422a81 commit 5effd60

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

tools/projmgr/src/ProjMgrWorker.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,10 @@ bool ProjMgrWorker::ProcessLayerCombinations(ContextItem& context, LayersDiscove
895895
}
896896
}
897897

898+
// init list of compatible layers with all required layer types
899+
for (const auto& type : discover.requiredLayerTypes) {
900+
context.compatibleLayers.insert({ type, StrVec() });
901+
}
898902
// update list of compatible layers
899903
context.validConnections.push_back(combination);
900904
for (const auto& [type, _] : discover.candidateClayers) {

tools/projmgr/test/data/TestLayers/ref/no_compiler.cbuild-idx.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ build-idx:
1010
- Board-Layer: $SolutionDir()$/select.clayer.yml
1111
settings:
1212
- set: set1.select1 (provided connections A and B - set 1 select 1)
13+
- Select1-Layer: ""
1314
- configuration:
1415
variables:
1516
- Board-Layer: $SolutionDir()$/select.clayer.yml
1617
settings:
1718
- set: set1.select2 (provided connections B and C - set 1 select 2)
19+
- Select1-Layer: ""
1820
select-compiler:
1921
- compiler: AC6
2022
- compiler: GCC

tools/projmgr/test/data/TestLayers/ref/select.cbuild-idx.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ build-idx:
1010
- Board-Layer: $SolutionDir()$/select.clayer.yml
1111
settings:
1212
- set: set1.select1 (provided connections A and B - set 1 select 1)
13+
- Select1-Layer: ""
1314
- configuration:
1415
variables:
1516
- Board-Layer: $SolutionDir()$/select.clayer.yml
1617
settings:
1718
- set: set1.select2 (provided connections B and C - set 1 select 2)
19+
- Select1-Layer: ""
1820
cprojects:
1921
- cproject: select.cproject.yml
2022
clayers:

tools/projmgr/test/data/TestLayers/searchpath.cproject.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
project:
44
layers:
55
- type: TestVariant
6+
optional: false

tools/projmgr/test/data/TestLayers/variables-notdefined.cproject.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ project:
44
layers:
55
- layer: $NotDefined$
66
type: Board
7+
optional: false

0 commit comments

Comments
 (0)