@@ -24,6 +24,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
24
24
import { IFileService , IFileStatWithPartialMetadata } from 'vs/platform/files/common/files' ;
25
25
import { createDecorator , IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
26
26
import { ILabelService } from 'vs/platform/label/common/label' ;
27
+ import { ILogService , LogLevel } from 'vs/platform/log/common/log' ;
27
28
import { IProgress , IProgressStep } from 'vs/platform/progress/common/progress' ;
28
29
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry' ;
29
30
import { minimapFindMatch , overviewRulerFindMatchForeground } from 'vs/platform/theme/common/colorRegistry' ;
@@ -851,7 +852,8 @@ export class FolderMatchWorkspaceRoot extends FolderMatchWithResource {
851
852
@IReplaceService replaceService : IReplaceService ,
852
853
@IInstantiationService instantiationService : IInstantiationService ,
853
854
@ILabelService labelService : ILabelService ,
854
- @IUriIdentityService uriIdentityService : IUriIdentityService
855
+ @IUriIdentityService uriIdentityService : IUriIdentityService ,
856
+ @ILogService private readonly _logService : ILogService ,
855
857
) {
856
858
super ( _resource , _id , _index , _query , _parent , _searchModel , null , replaceService , instantiationService , labelService , uriIdentityService ) ;
857
859
}
@@ -881,14 +883,22 @@ export class FolderMatchWorkspaceRoot extends FolderMatchWithResource {
881
883
const fileMatchParentParts : URI [ ] = [ ] ;
882
884
let uri = this . uriParent ( rawFileMatch . resource ) ;
883
885
886
+ const debug : string [ ] = [ '[search model building]' ] ;
884
887
while ( ! this . uriEquals ( this . resource , uri ) ) {
885
888
fileMatchParentParts . unshift ( uri ) ;
886
889
const prevUri = uri ;
887
890
uri = this . uriParent ( uri ) ;
891
+ if ( this . _logService . getLevel ( ) === LogLevel . Trace ) {
892
+ debug . push ( `current uri parent ${ uri } comparing with ${ prevUri } ` ) ;
893
+ }
888
894
if ( this . uriEquals ( prevUri , uri ) ) {
895
+ this . _logService . trace ( debug . join ( '\n\n' ) ) ;
889
896
throw Error ( `${ rawFileMatch . resource } is not correctly configured as a child of its ${ this . resource } ` ) ;
890
897
}
891
898
}
899
+ if ( this . _logService . getLevel ( ) === LogLevel . Trace ) {
900
+ this . _logService . trace ( debug . join ( '\n\n' ) ) ;
901
+ }
892
902
893
903
const root = this . closestRoot ?? this ;
894
904
let parent : FolderMatch = this ;
0 commit comments