-
-
Notifications
You must be signed in to change notification settings - Fork 197
Update complete uri and model handling in EditorApp #904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty huge commit 🤔
Yes, but model/uri handling was still fishy and that made this change bigger than initially expected. vitest gave me some headache as well. |
…d handling in react component. - Enforce proper uri usage in tests - Allow model dispose in EditorApp to be asynchronous in tests
…move getTextContents
@CGNonofr any thoughts? I have released next versions based on the current status, btw. |
I'm sorry, I don't have as much time I'd like to be able to fully understand the changes you made. I'm sure it's for the best! |
@CGNonofr take your time. People can provide feedback based on the next packages. I also want to do some react component testing myself. |
Hi @kaisalmen I just tried upgrading to 6.7.0-next.0 and it still throws error in strict mode
and I also get Edit: Did you notice that in strict mode, you get component rendered twice (it doesn't happen in my instance but when I run the examples it does, also I tried to create an example vite project and it also rendered twice)? |
@kaisalmen I still believe there is no straightforward way to do this without implementing a task queue. Everything is asynchronous, and although we expect the component to initialize first and then dispose, we can't guarantee this sequence with asynchronous initialization and disposal. |
Hi @zoran995 I cannot reproduce the behaviour with a unit test, yet. I have locally defined another one that uses strict mode. I need to see if I make web worker language server run in a test (it did not work in the past if I remember correctly). I am hesitant to introduce something complex to overcome a "dev" feature. I am not implying here that what it shows is wrong, but I am favoring a simpler solution if possible. There must have been something else been broken during the "simplification" in February (before |
Changes:
EditorApp
now always created models and disposes them properly when they are no longer needed. The logical structure of the code is better.Wrapper
/EditorApp
The react component may need further polishing depending also on other observations from people I did not yet analyse, but we should go from here...