Skip to content

Implement TextDocumentSnapshot for delay open notifications - #1773

Merged
Dirk Bäumer (dbaeumer) merged 5 commits into
mainfrom
dbaeumer/watery-puma-black
May 22, 2026
Merged

Dirk Bäumer (dbaeumer) merged 5 commits into
mainfrom
dbaeumer/watery-puma-black

Conversation

@dbaeumer

Copy link
Copy Markdown
Member

Introduce TextDocumentSnapshot to enhance the delay open notification functionality, ensuring accurate handling of document states and content.

@dbaeumer
Dirk Bäumer (dbaeumer) merged commit 0a70e0d into main May 22, 2026
6 checks passed
@dbaeumer
Dirk Bäumer (dbaeumer) deleted the dbaeumer/watery-puma-black branch May 22, 2026 16:59
@DanTup

Copy link
Copy Markdown
Contributor

Dirk Bäumer (@dbaeumer) FYI, this issue came up this week:

Dart-Code/Dart-Code#6088

The issue is that didChange and didOpen (in response to a workspace/applyEdit from the server) were sent in the wrong order (and the Dart server errors if it gets didChange for a file that's not open).

I suspect that it's related to my recent re-enabling or delayOpenNotifications (using the latest next release), but I am not certain.

I will let you know if I can track anything down, but wanted to give you a heads up.

I'm starting to wonder if this flag is worth the effort. I really wish it could just be handled in VS Code instead of trying to workaround it here.

@dbaeumer

Copy link
Copy Markdown
Member Author

I really wish it could just be handled in VS Code instead of trying to workaround it here.

My gut feeling tells me that with all the cases in VS Code itself the code would get equally complicated. The problem is that changing something like this so late is absolutely not easy.

Please keep me in the loop if you find something. And BTW I release 3.18 so you don't need to use next.

@DanTup

Copy link
Copy Markdown
Contributor

Please keep me in the loop if you find something.

Will do!

And BTW I release 3.18 so you don't need to use next.

Thanks - I noticed this last week and changed over (and have started on updating the server too) :-)

@DanTup

Copy link
Copy Markdown
Contributor

I haven't managed to repro that issue yet, so I'm going to revert enabling delayOpenNotifications for the upcoming Dart extension release, and I'll try to do some more debugging next month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants