Skip to content

Smarter file processing #25

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

Closed
4 tasks done
wooorm opened this issue Jan 7, 2022 · 7 comments · Fixed by #62
Closed
4 tasks done

Smarter file processing #25

wooorm opened this issue Jan 7, 2022 · 7 comments · Fixed by #62
Labels
🤞 phase/open Post is being triaged manually

Comments

@wooorm
Copy link
Member

wooorm commented Jan 7, 2022

Initial checklist

Problem

workspace/didChangeWatchedFiles means a file or folder changed. https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_didChangeWatchedFiles. Instead of reprocessing every markdown file (

checkDocuments(...documents.all())
).

Solution

perhaps we should use cheap hashes to ensure we only perform work when something changed.

Alternatives

n/a

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Jan 7, 2022
@wooorm wooorm changed the title Smarted file processing Smarter file processing Jan 10, 2022
@remcohaszing
Copy link
Member

Problem

workspace/didChangeWatchedFiles means a file or folder changed. https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_didChangeWatchedFiles. Instead of reprocessing every markdown file

This doesn’t mean a file has changed. It means a watched file has changed.

How this is used can be seen in remark-vscode: https://github.com/remarkjs/vscode-remark/blob/2f1cb9916651e1cb19ede823f2bf0ffdb3aa8af8/src/extension.js#L27-L32

So if a configuration file changes, all documents are checked again.

@wooorm
Copy link
Member Author

wooorm commented Jan 10, 2022

That is an important caveat that seems like it’s something that should be in a comment next to the function?

@remcohaszing
Copy link
Member

Maybe in the readme for workspace/didChangeWatchedFiles add somethink like:

Clients are expected to watch the remark configuration files.

@wooorm
Copy link
Member Author

wooorm commented Jan 10, 2022

I’m okay on that too, but probably also perhaps a new section (Client?) on how to make a client (because Use should be one basic example, and API should be just about options)

@remcohaszing
Copy link
Member

I think that’s basically what the Language Server features section is.

@wooorm
Copy link
Member Author

wooorm commented Jan 10, 2022

It is the items in that list, and could be that section, but the current wording is different than what I’m looking for. That section currently explains what the code is doing.

I’m looking for a list that explains what requests and notifications, must/should/could be sent, and when, by clients.
And a list of things that are sent by the server back to the client, and how the client should respond to that.

@github-actions
Copy link

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤞 phase/open Post is being triaged manually
Development

Successfully merging a pull request may close this issue.

2 participants