@@ -162,7 +162,12 @@ export class SolutionConverterImpl implements SolutionConverter {
162162
163163 // compilers and variables detection handling: apply select-compiler and discover layer configurations if any
164164 csolution ?. setSelectCompiler ( convertResult . selectCompiler ) ;
165- detection = ( ! ! convertResult . undefinedLayers && await this . checkDiscoverLayers ( ) ) || ! ! convertResult . selectCompiler ;
165+ if ( convertResult . undefinedLayers ) {
166+ const [ discoverLayersDetected , discoverLayersOutput ] = await this . checkDiscoverLayers ( ) ;
167+ detection = discoverLayersDetected ;
168+ toolsOutputMessages = toolsOutputMessages . concat ( discoverLayersOutput ) ;
169+ }
170+ detection = detection || ! ! convertResult . selectCompiler ;
166171 }
167172
168173 let logResult = undefined ;
@@ -244,7 +249,7 @@ export class SolutionConverterImpl implements SolutionConverter {
244249 return formattedOutput ;
245250 }
246251
247- private async checkDiscoverLayers ( ) : Promise < boolean > {
252+ private async checkDiscoverLayers ( ) : Promise < [ boolean , string [ ] ] > {
248253 const outputChannel = this . outputChannelProvider . getOrCreate ( manifest . CMSIS_SOLUTION_OUTPUT_CHANNEL ) ;
249254 this . solutionManager . getCsolution ( ) ?. setVariablesConfigurations ( undefined ) ;
250255 // rpc method: DiscoverLayers
@@ -257,7 +262,10 @@ export class SolutionConverterImpl implements SolutionConverter {
257262 }
258263 ) as rpc . DiscoverLayersInfo ;
259264 this . solutionManager . getCsolution ( ) ?. setVariablesConfigurations ( result . configurations ) ;
260- return result . success ;
265+
266+ const formattedOutput = ! result . success && result . message ? [ `error csolution: ${ result . message } ` ] : [ ] ;
267+
268+ return [ result . success , formattedOutput ] ;
261269 }
262270
263271 private getSeverity ( messages : rpc . LogMessages , lines ?: string [ ] ) : Severity {
0 commit comments