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 CLI with Positron #3705

Closed
petetronic opened this issue Jun 28, 2024 · 8 comments
Closed

Bundle Quarto CLI with Positron #3705

petetronic opened this issue Jun 28, 2024 · 8 comments
Assignees
Labels
area: builds Issues related to Builds category. area: quarto Issues related to Quarto category. enhancement New feature or request

Comments

@petetronic
Copy link
Collaborator

The Quarto Extension does not come with a Quarto CLI, so to make it simpler for customers to use Quarto with Positron out of the box, we should also look to bundle the Quarto CLI.

We currently bundle the Pandoc CLI separately, this would need to be coordinated with the inclusion of Quarto instead.

@petetronic petetronic added area: quarto Issues related to Quarto category. area: builds Issues related to Builds category. labels Jun 28, 2024
@petetronic petetronic added the enhancement New feature or request label Jun 28, 2024
@juliasilge juliasilge added this to the 2024.09.0 Pre-Release milestone Jul 5, 2024
@jmcphers jmcphers self-assigned this Jul 25, 2024
jmcphers added a commit that referenced this issue Aug 2, 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
Copy link
Collaborator

jmcphers commented Aug 2, 2024

We're bundling Quarto as of #4212, but to complete this story we also need a version of the Quarto extension that can find the bundle. quarto-dev/quarto#503 contains the needed changes.

@coatless
Copy link

coatless commented Aug 6, 2024

Looks like quarto-dev/quarto#503 just was merged in by JJ. Any chance the built-in Quarto extension could get bumped? 😄

@jmcphers
Copy link
Collaborator

jmcphers commented Aug 6, 2024

Yes, we'll bundle 1.114.0 of the extension when it becomes available (JJ will need to do the release first).

@jmcphers
Copy link
Collaborator

Should be ready to test now, note that there's still a problem with the Quarto extension not adding the Quarto path to the PATH if the Positron Quarto installation is your only Quarto installation. This needs to be fixed in the Quarto extension.

quarto-dev/quarto#517

@testlabauto
Copy link
Contributor

Anyone have thoughts on what can be tested prior to quarto-dev/quarto#517 being completed? It seems to me like we might need to wait on that to really test that bundling works. Without it, I am assuming that one would not truly be using the bundled extension.

@jonvanausdeln
Copy link
Contributor

As I just posted in the quarto issue quarto-dev/quarto#517 (comment)

I just tried with the latest build of Positron (2024.08.0-77 on Windows and it doesn't find Quarto.

  • Uninstalled all quarto versions
  • Uninstalled all Positron
  • Installed 2024.08.0-77 - which includes Quarto extension 1.114.0
  • Open .qmd file, and try to preview
C:\Users\JonVanausdeln\source\qa-example-content [main ≡]> quarto preview c:/Users/JonVanausdeln/source/qa-example-content/workspaces/quarto_basic/quarto_basic.qmd --no-browser --no-watch-inputs --output-dir C:\Users\JONVAN~1\AppData\Local\Temp\tmp-32232-hHeUVdON8Tb2 --embed-resources
quarto: The term 'quarto' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

@jmcphers
Copy link
Collaborator

jmcphers commented Sep 3, 2024

This should work now unless pyenv is active. As noted in quarto-dev/quarto#517 (comment), pyenv is removing Quarto from the $PATH which leads to the issue @jonvanausdeln describes above.

QA, can we close this one (assuming the non-pyenv case works okay)? I have opened #4561 to track the pyenv case.

@testlabauto
Copy link
Contributor

Verified Fixed

Positron Version(s) : 2024.09.0-1
OS Version          : OSX

Test scenario(s)

Non pyenv runs work fine!

Link(s) to TestRail test cases run or created:
N/A

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: builds Issues related to Builds category. area: quarto Issues related to Quarto category. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants