You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dynamically adding extra lib is not working on 0.39.0 version. It was working fine till 0.28.0 version.
Below are the play ground link of 0.39.0 and 0.28.0
After playground editors are loaded, please follow the below steps to reproduce the issue:
step1 - Click on Second_injection button.
step2 - Click on Third_injection button.
step3 - Click on First_injection button.
After step3, editor should not show the error for test.descriptionfirst property, because we injected the first library again on button click. But it is still showing the error in 0.39.0 version. Same workflow working fine in 0.28.0 version.
constvalue=/* set from `myEditor.getModel()`: */`function hello() { alert('Hello world!');}var test:Test;test.descriptionfirst;`;// Hover on each property to see its docs!constmyEditor=monaco.editor.create(document.getElementById("container"),{
value,language: "typescript",automaticLayout: true,});varlibrary="declare class Test { descriptionfirst:string; } ";lettestDisposable1=monaco.languages.typescript.typescriptDefaults.addExtraLib(library,monaco.Uri.file("test.d.ts").toString());lettestDisposable2=monaco.languages.typescript.javascriptDefaults.addExtraLib(library,monaco.Uri.file("test.d.ts").toString());varfirstInjectTest=functionfirstInjectTest(){testDisposable1.dispose();testDisposable2.dispose();letlibrary="declare class Test { descriptionfirst:string; } ";testDisposable1=monaco.languages.typescript.typescriptDefaults.addExtraLib(library,monaco.Uri.file("test.d.ts").toString());testDisposable2=monaco.languages.typescript.javascriptDefaults.addExtraLib(library,monaco.Uri.file("test.d.ts").toString());alert('First library Injection\n LibraryClass: '+library);}window['firstInjectTest']=firstInjectTest;varsecondInjectTest=functionsecondInjectTest(){testDisposable1.dispose();testDisposable2.dispose();letlibrary="declare class Test { descriptionsecond:string; } ";testDisposable1=monaco.languages.typescript.typescriptDefaults.addExtraLib(library,monaco.Uri.file("test.d.ts").toString());testDisposable2=monaco.languages.typescript.javascriptDefaults.addExtraLib(library,monaco.Uri.file("test.d.ts").toString());alert('Second library Injection \n LibraryClass: '+library);}window['secondInjectTest']=secondInjectTest;varthirdInjectTest=functionthirdInjectTest(){testDisposable1.dispose();testDisposable2.dispose();letlibrary="declare class Test { descriptionthird:string; } ";testDisposable1=monaco.languages.typescript.typescriptDefaults.addExtraLib(library,monaco.Uri.file("test.d.ts").toString());testDisposable2=monaco.languages.typescript.javascriptDefaults.addExtraLib(library,monaco.Uri.file("test.d.ts").toString());alert('Third library Injection \n LibraryClass: '+library);}window['thirdInjectTest']=thirdInjectTest;// HTML CODE <br><br><inputtype="button"value="First_Injection"onclick="firstInjectTest();"/><br><br><inputtype="button"value="Second_Injection"onclick="secondInjectTest();"/><br><br><inputtype="button"value="Third_Injection"onclick="thirdInjectTest();"/><divid="container"style="height: 100%"></div>
Reproduction Steps
After playground editors are loaded, please follow the below steps to reproduce the issue:
step1 - Click on Second_injection button.
step2 - Click on Third_injection button.
step3 - Click on First_injection button.
After step3, editor should not show the error for test.descriptionfirst property, because we injected the first library again on First_injection button click. But it is still showing the error in 0.39.0 version. Same workflow working fine in 0.28.0 version.
Actual (Problematic) Behavior
If we dynamically dispose the library and add again with changes, first time it work fine but from the second time it is not working in 0.39.0 version but and I check in earlier version the same workflow was working till 0.28.0 version.
I have mentioned steps to reproduce the issue in Reproduction Steps.
It should dynamically dispose the previous library and add changed library and also should show the intelligence for change library even if we repeat the steps multiple times.
After step3, editor should not show the error for test.descriptionfirst property, because we injected the first library again on First_injection button click. But it is still showing the error in 0.39.0 version. Same workflow working fine in 0.28.0 version.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
DharmendraSendhav
changed the title
Updating extra lib not working after dispose in 0.39.0 version. It is working fine till version 0.28.0
[Bug] Updating extra lib not working after dispose in 0.39.0 version. It is working fine till version 0.28.0
Jun 13, 2023
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
Dynamically adding extra lib is not working on 0.39.0 version. It was working fine till 0.28.0 version.
Below are the play ground link of 0.39.0 and 0.28.0
After playground editors are loaded, please follow the below steps to reproduce the issue:
step1 - Click on Second_injection button.
step2 - Click on Third_injection button.
step3 - Click on First_injection button.
After step3, editor should not show the error for test.descriptionfirst property, because we injected the first library again on button click. But it is still showing the error in 0.39.0 version. Same workflow working fine in 0.28.0 version.
Playground_V_0.39.0
Playground_V_0.28.0
Monaco Editor Playground Code
Reproduction Steps
After playground editors are loaded, please follow the below steps to reproduce the issue:
step1 - Click on Second_injection button.
step2 - Click on Third_injection button.
step3 - Click on First_injection button.
After step3, editor should not show the error for test.descriptionfirst property, because we injected the first library again on First_injection button click. But it is still showing the error in 0.39.0 version. Same workflow working fine in 0.28.0 version.
Actual (Problematic) Behavior
If we dynamically dispose the library and add again with changes, first time it work fine but from the second time it is not working in 0.39.0 version but and I check in earlier version the same workflow was working till 0.28.0 version.
I have mentioned steps to reproduce the issue in Reproduction Steps.
Playground_V_0.39.0
Playground_V_0.28.0
Expected Behavior
It should dynamically dispose the previous library and add changed library and also should show the intelligence for change library even if we repeat the steps multiple times.
After step3, editor should not show the error for test.descriptionfirst property, because we injected the first library again on First_injection button click. But it is still showing the error in 0.39.0 version. Same workflow working fine in 0.28.0 version.
Additional Context
No response
The text was updated successfully, but these errors were encountered: