Skip to content

Conversation

@DavisVaughan
Copy link
Collaborator

@DavisVaughan DavisVaughan commented Nov 8, 2024

Branched from #599

@juliasilge what do you think about this?

withVirtualDocUri() is now in charge of both:

  • Creation of the vdocUri by calling virtualDocUri()
  • Clean up of the vdocUri

This prevents any kind of leakage of temp files from occurring.

After this we should try and go back and use withVirtualDocUri() instead of virtualDocUri() everywhere and then make virtualDocUri() private.

withVirtualDocUri() could also provide an error hook if a user needs to control the } catch (error) { case too, but I'd only add that later on if it turns out we need it.

@DavisVaughan
Copy link
Collaborator Author

CC @lionel- too, just as an FYI since we've talked about this in the past a bit

Copy link
Collaborator

@juliasilge juliasilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! That is going to work well.

@juliasilge juliasilge merged commit 323a5ca into quarto-dev:help-topic-provider Nov 9, 2024
juliasilge added a commit that referenced this pull request Nov 9, 2024
* Add new help topic provider for Quarto files

* Fix up return

* Help topic provider with doc (#601)

* More usefully define `withVirtualDocUri()`

* Use `withVirtualDocUri()` in `provideHelpTopic()`

* Use new version of `withVirtualDocUri()` for statement range provider as well

* Update changelog

---------

Co-authored-by: Davis Vaughan <davis@posit.co>
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.

2 participants