Closed alaindresse closed 2 months ago
I don't want to dig into the implementation but I'm fine with the following changes:
findFiles2
if availableantora.yml
filesFor the later, and if we want to be thorough, we will need to add a listener (https://code.visualstudio.com/api/references/vscode-api#FileSystemProvider) and update the cache when:
Could you please open a dedicated pull request for "Use findFiles2
(proposed API) if available"?
Oh, I just found this in the documentation:
While you're not able to publish extensions using the proposed API on the Marketplace, you can still share your extension with your peers by packaging and sharing your extension.
I guess that would prevent us from using it since we want to publish on the Marketplace :(
Oh, I just found this in the documentation:
While you're not able to publish extensions using the proposed API on the Marketplace, you can still share your extension with your peers by packaging and sharing your extension.
I guess that would prevent us from using it since we want to publish on the Marketplace :(
Indeed, I don't believe we will have to wait for the api to be finalized before we can use it (except for internal releases).
Could you please open a dedicated pull request for "Use
findFiles2
(proposed API) if available"?
Given the restrictions on publishing an extension that uses a proposed API, I don't believe this is really useful ☹️
I don't want to dig into the implementation but I'm fine with the following changes:
- Make use of
findFiles2
if available- Add a cache mechanism on
antora.yml
filesFor the later, and if we want to be thorough, we will need to add a listener (https://code.visualstudio.com/api/references/vscode-api#FileSystemProvider) and update the cache when:
- a file is created with the name antora.yml
- a file is renamed to antora.yml
- an antora.yml is moved
In this proposal, I do listen to vscode.workspace.onDidChangeTextDocument
(in antoraConfig.ts
line 93), which I believe would cover antora.yml
files in the repo. Could you clarify what the FileSystemProvider would add to that ?
When I get some time, I'll try to create a PR that could actually be merged on the caching.
Closing this pull request as discussion has taken place with clear next steps
@alaindresse Could you please share the directory structure of your project? Maybe we could let the user configure the glob pattern to find antora.yml (default value **/antora.yml
). If you have a common structure, then something like projects/**/docs/antora.yml
might be faster.
@ggrossetie this shows my explorations on how to limit the impact of calls to findFiles on responsiveness, for discussion.
I will put a few comments in the PR to highlight the points that may be interesting.