Skip to content

Conversation

juliasilge
Copy link
Contributor

@juliasilge juliasilge commented Oct 7, 2025

I hope that this addresses problems that folks are experiencing like:

We originally thought what needed to happen was to bundle tinytex or another PDF engine, but that may not be the source of the error folks are experiencing. Instead, as @cderv explains, these empty but required files are missing, leading to errors like:

NotFound: The system cannot find the file specified. (os error 2): lstat 'C:\Users\JonVanausdeln\AppData\Local\Programs\Positron\resources\app\quarto\share\formats\pdf\pandoc\before-bib.tex'

Release Notes

New Features

  • N/A

Bug Fixes

  • Fixed Quarto bundling on Windows

QA Notes

We need to get a Windows release build here, and then try to use quarto::quarto_render() for a small example file to render to PDF, something like this:

---
title: "Diamond sizes"
format: pdf
---

```{r}
#| label: setup
#| include: false

library(tidyverse)
library(diamonds)

smaller <- diamonds |>
  filter(carat <= 2.5)
```

We have data about `r nrow(diamonds)` diamonds. Only `r nrow(diamonds) - nrow(smaller)` are larger than 2.5 carats. The distribution of the remainder is shown below:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

```{r}
#| label: plot-smaller-diamonds
#| echo: false

smaller |> 
  ggplot(aes(x = carat)) +
  geom_freqpoly(binwidth = 0.03)
```

After this change, you'll get an error about not having tinytex instead of a missing before-bib.tex.

Copy link

github-actions bot commented Oct 7, 2025

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

@juliasilge
Copy link
Contributor Author

I just kicked off Windows release builds here: https://github.com/posit-dev/positron-builds/actions/runs/18317750173

@juliasilge
Copy link
Contributor Author

The initial change did not work, sadly; we still get the error about a missing before-bib.tex.

I added some logging and kicked off new builds: https://github.com/posit-dev/positron-builds/actions/runs/18320088914

@juliasilge
Copy link
Contributor Author

The logging says that there are no empty files after the unzip step; keepEmpty: true is not actually keeping the empty files for some reason?

I added new logging to see if the three files are in the ZIP file using a different library and find where we are losing them.

New builds are kicked off here: https://github.com/posit-dev/positron-builds/actions/runs/18323439431

@juliasilge
Copy link
Contributor Author

OMG I FORGOT TO COMPILE TO JS 😮‍💨

New builds are kicked off here: https://github.com/posit-dev/positron-builds/actions/runs/18324941010

@juliasilge
Copy link
Contributor Author

Well, the path to get here was embarrassing but FINALLY, I have something to show for it.

What is it, you ask? The fruit of making four different Windows builds? BEHOLD, A NEW ERROR:

Screenshot 2025-10-07 at 3 07 39 PM

@jennybc
Copy link
Member

jennybc commented Oct 7, 2025

I recognize this cli error. IME that occurs when you try to re-emit an error message via cli_abort() and that message itself contains {}. I'm not sure how much that helps here, but the error throwing the error is why aren't getting a more detailed message, I suspect.

@cderv
Copy link

cderv commented Oct 8, 2025

I recognize this cli error. IME that occurs when you try to re-emit an error message via cli_abort() and that message itself contains {}. I'm not sure how much that helps here, but the error throwing the error is why aren't getting a more detailed message, I suspect.

It seems I need to look for this in quarto-R. I don't think I have a report yet for such error.

Where can I find small-diamonds.qmd ?

Also @juliasilge the initial quarto error about missing tex file is not just with quarto_render(). I would be also the case at command line, when using the bundled quarto version inside positron. So if you don't have it anymore, this would be solved.

Also, I would check other OS -> are the empty files correctly inside the quarto installation folder bundled by positron ?

@juliasilge
Copy link
Contributor Author

I'm pretty sure that this is a Windows only problem, based on the experimentation I have done here. For example, for me on macOS:

juliasilge@Laszlo: /Applications/Positron.app/Contents/Resources/app
$ pwd                                                                                                                                      [10:08:55]
/Applications/Positron.app/Contents/Resources/app
 
juliasilge@Laszlo: /Applications/Positron.app/Contents/Resources/app
$ ls quarto/share/formats/pdf/pandoc                                                                                                       [10:09:06]
after-body.tex              before-title.tex            doc-class.tex               latex.common                template.tex
after-header-includes.latex biblio-config.tex           font-settings.latex         latex.template              tightlist.tex
babel-lang.tex              biblio.tex                  fonts.latex                 pandoc.tex                  title.tex
before-bib.tex              citations.tex               graphics.tex                passoptions.latex           toc.tex
before-body.tex             common.latex                hypersetup.latex            tables.tex

@cderv
Copy link

cderv commented Oct 8, 2025

Perfect. If the files are there, this should be ok then.

I see now that gulp-gunzip is used for other OS, while gulp-unzip on windows. So probably only the latter have the config;

Copy link
Collaborator

@jmcphers jmcphers left a comment

Choose a reason for hiding this comment

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

LGTM!

@juliasilge juliasilge merged commit f9d7b6e into main Oct 8, 2025
13 checks passed
@juliasilge juliasilge deleted the keep-empty-files-in-quarto-bundling branch October 8, 2025 18:40
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2025
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.

4 participants