@@ -3,7 +3,10 @@ import type { ModeledMethod } from "./modeled-method";
3
3
import type { BaseLogger } from "../common/logging" ;
4
4
5
5
interface Notifier {
6
- missingMethod ( signature : string ) : void ;
6
+ missingMethod (
7
+ signature : string ,
8
+ modeledMethods : readonly ModeledMethod [ ] ,
9
+ ) : void ;
7
10
inconsistentSupported ( signature : string , expectedSupported : boolean ) : void ;
8
11
}
9
12
@@ -21,14 +24,14 @@ export function checkConsistency(
21
24
) ;
22
25
23
26
for ( const signature in modeledMethods ) {
27
+ const modeledMethodsForSignature = modeledMethods [ signature ] ;
28
+
24
29
const method = methodsBySignature [ signature ] ;
25
30
if ( ! method ) {
26
- notifier . missingMethod ( signature ) ;
31
+ notifier . missingMethod ( signature , modeledMethodsForSignature ) ;
27
32
continue ;
28
33
}
29
34
30
- const modeledMethodsForSignature = modeledMethods [ signature ] ;
31
-
32
35
checkMethodConsistency ( method , modeledMethodsForSignature , notifier ) ;
33
36
}
34
37
}
@@ -51,9 +54,14 @@ function checkMethodConsistency(
51
54
export class DefaultNotifier implements Notifier {
52
55
constructor ( private readonly logger : BaseLogger ) { }
53
56
54
- missingMethod ( signature : string ) {
57
+ missingMethod ( signature : string , modeledMethods : readonly ModeledMethod [ ] ) {
58
+ const modelTypes = modeledMethods
59
+ . map ( ( m ) => m . type )
60
+ . filter ( ( t ) => t !== "none" )
61
+ . join ( ", " ) ;
62
+
55
63
void this . logger . log (
56
- `Model editor query consistency check: Missing method ${ signature } for method that is modeled. ` ,
64
+ `Model editor query consistency check: Missing method ${ signature } for method that is modeled as ${ modelTypes } ` ,
57
65
) ;
58
66
}
59
67
0 commit comments