Skip to content
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

Bundle Quarto with Positron #4212

Merged
merged 11 commits into from
Aug 2, 2024
Merged

Bundle Quarto with Positron #4212

merged 11 commits into from
Aug 2, 2024

Conversation

jmcphers
Copy link
Collaborator

@jmcphers jmcphers commented Aug 1, 2024

This change bundles the Quarto CLI and all of its requisite tooling (deno, typst, etc.) with Positron, replacing the former Pandoc-only approach. Quarto is currently version-pinned at 1.5.55.

The Quarto bundle is stored in the quarto subdirectory of the app root.

Addresses #3705.

Important

This change alone is not sufficient to allow the Quarto extension to discover the copy of Quarto bundled in Positron; the Quarto extension's search path is not configurable, so a separate change will need to be made to the Quarto extension to include the Positron app directory in the search path. I'll make that change once this one has landed successfully.

QA Notes

  • This change needs to be tested on all 3 platforms.
  • The Quarto extension does look on the PATH for Quarto, so if you're feeling brave you can cause it to use this bundled version of Quarto by putting it on your PATH.
  • This change uses a different version of Pandoc and puts Pandoc in a new location. Make sure that RSTUDIO_PANDOC points to a folder that contains the pandoc executable, and that rmarkdown::find_pandoc() and the "Render R Markdown" command are able to use the new Pandoc.
  • Both the Quarto extension and R Markdown package will find Quarto/Pandoc on the PATH, so to ensure you're testing against the embedded copy of Quarto and Pandoc in Positron, make sure to remove any other installations of Quarto and Pandoc on your PATH (or temporarily modify your PATH so they aren't discovered)
  • It is expected that this change will dramatically increase the size of the installers.

@jmcphers jmcphers requested a review from petetronic August 1, 2024 20:09
@coatless
Copy link

coatless commented Aug 1, 2024

@jmcphers, is there any chance the first version of Positron with an embedded copy of Quarto could have an updated copy of Quarto extension built-in with the fix? Or is the fix + update something that will immediately follow (< 24 hours)?

@jmcphers
Copy link
Collaborator Author

jmcphers commented Aug 1, 2024

@coatless It'll definitely be more than 24 hours as this change still needs reviewing and building, and I haven't finished the changes to the Quarto extension yet. In flight, stay tuned!

@petetronic
Copy link
Collaborator

Thanks Jonathan, I've rebuilt installers for Mac and Linux with this branch and confirmed they are bundling Quarto 1.5.55 (and understand the extension needs to be updated before it will find them in this new location). I'll rebuild Windows now too just to complete the set.

petetronic
petetronic previously approved these changes Aug 2, 2024
Copy link
Collaborator

@petetronic petetronic left a comment

Choose a reason for hiding this comment

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

Windows also bundled Quarto 1.5.55

@petetronic
Copy link
Collaborator

petetronic commented Aug 2, 2024

I was also able to update my PATH to the bundled Quarto and it attempted to use it when previewing a .qmd, but it ran into permission issues compiling the theme on MacOS.

quarto preview /Users/username/dev/scratch/bugs/Untitled-1.qmd --no-browser --no-watch-inputs
~/dev/scratch/bugs: quarto preview /Users/username/dev/scratch/bugs/Untitled-1.qmd --no-
browser --no-watch-inputs
ERROR: Theme file compilation failed:

/Users/username/dev/git/posit/VSCode-darwin-arm64/Positron.app/Contents/Resources/app/quarto/bin/tools/aarch64/dart-sass/sass: line 20: /Users/username/dev/git/posit/VSCode-darwin-arm64/Positron.app/Contents/Resources/app/quarto/bin/tools/aarch64/dart-sass/src/dart: Permission denied

@jmcphers
Copy link
Collaborator Author

jmcphers commented Aug 2, 2024

@petetronic thanks, I just saw this in my own testing as well this morning! Should be addressed in 6c3c0a6.

@petetronic
Copy link
Collaborator

Nice, I confirmed adding the executable flag to the dart binary resolved the error.

@jmcphers jmcphers merged commit e81305f into main Aug 2, 2024
2 checks passed
@jmcphers jmcphers deleted the feature/bundle-quarto branch August 2, 2024 21:56
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants