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

Do not allow quarto typst update to run #9106

Closed
ForceBru opened this issue Mar 16, 2024 · 9 comments
Closed

Do not allow quarto typst update to run #9106

ForceBru opened this issue Mar 16, 2024 · 9 comments
Labels
bug Something isn't working typst
Milestone

Comments

@ForceBru
Copy link

Bug description

I'm unable to update Typst to version 0.11.0.

Steps to reproduce

~> quarto typst update
Downloading release ...
 10.0 MiB /  10.0 MiB (100 %)  10.0 MiB/s in  0s ETA:  0s
error: failed to self-replace running executable (Permission denied (os error 13) at path "/Applications/quarto/bin/tools/x86_64/.typst.__temp__x2lnN2").

Expected behavior

The command should update Typst.

Actual behavior

I get the above error.

Your environment

  • OS: macOS Ventura 13.6.3
  • Quarto 1.5.23 and 1.5.25

Quarto check output

~> quarto check
Quarto 1.5.25
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.25
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2024.01
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/forcebru/Library/TinyTeX/bin/universal-darwin
      Version: 2023

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.12.1
      Path: /Users/forcebru/.pyenv/versions/3.12.1/bin/python3
      Jupyter: 5.7.2
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

~> 
@ForceBru ForceBru added the bug Something isn't working label Mar 16, 2024
@mcanouil mcanouil added the typst label Mar 16, 2024
@mcanouil
Copy link
Collaborator

mcanouil commented Mar 16, 2024

How did you install Quarto? If you installed it using root access, then root access might be needed here as well.

This being said, I don't think you can upgrade Typst embedded version, as you can't for Pandoc.
Typst/Pandoc are updated and embedded at each new version of Quarto.
quarto typst is there to use the embedded version of Typst and nothing more.
Here, I am almost certain, there is no bug, but I'll let one of the main developers confirm this.

@ForceBru
Copy link
Author

@mcanouil, I installed Quarto with the regular installer. Indeed, ls -lah /Applications/quarto/ shows that everything in this directory is owned by root.

I was able to update using sudo:

/A/quarto> sudo quarto typst update
Password:
Downloading release ...
 10.0 MiB /  10.0 MiB (100 %)  10.0 MiB/s in  0s ETA:  0s
/A/quarto> quarto typst --version
typst 0.11.0 (2bf9f95d)

@gordonwoodhull
Copy link
Contributor

Needless to say, neither Pandoc nor Quarto directly supports Typst 0.11, so this may or may not work.

We hope to look into it soon!

@cderv
Copy link
Collaborator

cderv commented Mar 18, 2024

This being said, I don't think you can upgrade Typst embedded version, as you can't for Pandoc.
Typst/Pandoc are updated and embedded at each new version of Quarto.

I agree with that. I did no know typst allowed to be updated from itself. Doing this will probably break Typst support with Quarto and Pandoc as you mention @gordonwoodhull.

I don't think quarto typst update should be allowed to prevent any breaking of the Quarto installation

@cscheid
Copy link
Collaborator

cscheid commented Mar 18, 2024

Agreed with both @cderv and @gordonwoodhull on this being a bad idea that we should try and disallow. I'm going to rename this issue accordingly.

@cscheid cscheid changed the title Permission denied when running quarto typst update on macOS Do not allow quarto typst update to run Mar 18, 2024
@baptiste
Copy link

Is there any way to point Quarto to use the system Typst instead of the built-in one? I'm trying to use contexts in Typst, which is new.

@cscheid
Copy link
Collaborator

cscheid commented Mar 25, 2024

Our plan is to release Quarto 1.5 with support for Typst 0.11. We're in the process of ensuring everything works.

In the meantime, you can use the QUARTO_TYPST env variable, but that Voids The Warranty.

In other words: we make no promise if something breaks when you run Quarto with a non-builtin version of Pandoc or Typst!

@mpr1255
Copy link

mpr1255 commented Oct 23, 2024

Our plan is to release Quarto 1.5 with support for Typst 0.11. We're in the process of ensuring everything works.

In the meantime, you can use the QUARTO_TYPST env variable, but that Voids The Warranty.

In other words: we make no promise if something breaks when you run Quarto with a non-builtin version of Pandoc or Typst!

I just made a PR adding some documentation for this hidden feature, since it is extremely useful and I only found it in this discussion thread.

quarto-dev/quarto-web#1407

Really excellent & helpful feature; thanks.

@cscheid
Copy link
Collaborator

cscheid commented Oct 23, 2024

This feature is intentionally not documented. It exists for third-party packagers, not for users. So I don't want to spend precious documentation inches on discussing it. Instead, I'd prefer to document how document rendering can stop at .typ instead of .pdf:

format:
  typst:
    output-ext: typ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working typst
Projects
None yet
Development

No branches or pull requests

7 participants