quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.81k stars 309 forks source link

Check for tools version when not expected ones are used #10047

Open cderv opened 3 months ago

cderv commented 3 months ago

From #9921, the issue is reproducible doing

This means that Quarto 1.4 is now running Typst 0.11.0 instead of 0.10.0 is this is not expected. The source of the bug if from here because now Quarto 1.4 with Pandoc 3.1.11 is producing a .typ file that is not compatible with Typst 0.11.0

The users is using a NixOs package version which bundling / using a bad typst version for Quarto 1.4 . From the user

I use NixOS, so i used the quarto-package that is provided by nixpkgs. Unfortunately distributed binaries dont work on NixOS, so they just remove the bin/tools directory in the finished package. They wrap the quarto program with the definition of the env-variable QUARTO_TYPST, but this points to the newest version of typst available in nixpkgs. This is also why there is (unknown hash) inside of the version number, i guess.

Quarto 1.4 has an expected version https://github.com/quarto-dev/quarto-cli/blob/1f5fd5e7f70f4aa0ed38ab3d21d8fa8914aa63c7/configuration#L17

So we could check when a variable like QUARTO_TYPST is checked, that at least the expected version is used.

Originally posted by @cderv in https://github.com/quarto-dev/quarto-cli/discussions/9921#discussioncomment-9807151

gordonwoodhull commented 3 months ago

I can't find the discussion, but when we discussed this before, the limiting factor was that configuration is not always copied to the installation.