File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,8 @@ export function buildDeprecatedProposedApi(
63
63
const interpreterPathService = serviceContainer . get < IInterpreterPathService > ( IInterpreterPathService ) ;
64
64
const interpreterService = serviceContainer . get < IInterpreterService > ( IInterpreterService ) ;
65
65
const extensions = serviceContainer . get < IExtensions > ( IExtensions ) ;
66
+ const warningLogged = new Set < string > ( ) ;
66
67
function sendApiTelemetry ( apiName : string , warnLog = true ) {
67
- if ( warnLog ) {
68
- console . warn ( 'Extension is using deprecated python APIs which will be removed soon' ) ;
69
- }
70
68
extensions
71
69
. determineExtensionFromCallStack ( )
72
70
. then ( ( info ) => {
@@ -75,6 +73,12 @@ export function buildDeprecatedProposedApi(
75
73
extensionId : info . extensionId ,
76
74
} ) ;
77
75
traceVerbose ( `Extension ${ info . extensionId } accessed ${ apiName } ` ) ;
76
+ if ( warnLog && ! warningLogged . has ( info . extensionId ) ) {
77
+ console . warn (
78
+ `${ info . extensionId } extension is using deprecated python APIs which will be removed soon.` ,
79
+ ) ;
80
+ warningLogged . add ( info . extensionId ) ;
81
+ }
78
82
} )
79
83
. ignoreErrors ( ) ;
80
84
}
You can’t perform that action at this time.
0 commit comments