r-lib / pillar

Format columns with colour
https://pillar.r-lib.org/
Other
178 stars 37 forks source link

chore: workaround no longer needed for pkgdown 2.1 #668

Open olivroy opened 4 months ago

olivroy commented 4 months ago

Trying to render a Quarto vignette today, I got:

Error in get(paste0(generic, ".", class), envir = get_method_env()) : 
  object 'type_sum.accel' not found
Output created: ..\..\..\..\AppData\Local\Temp\Rtmpeg0nPL\pkgdown-quarto-2d035aa1f9f\gt-visual.html

Since the mentioned issue is fixed, we can remove this? https://github.com/r-lib/pkgdown/issues/1540.

I may have been mistaken. https://github.com/r-lib/pkgdown/issues/2188 is the issue that got fixed recently.

krlmlr commented 4 months ago

Thanks. Does Quarto set the IN_PKGDOWN environment variable, or what is happening here?

olivroy commented 4 months ago

Hmm, it is just that pkgdown now supports Quarto vignettes. So I am giving it a test.

Basically, in one of my packages, I have this quarto article.

---
title: "gt visual tests"
format: html
editor: source
code-link: true
toc: true
html-table-processing: none
code-fold: true
---

Vignette text.

And when I use pkgdown::build_article('my-article", quiet = FALSE), I get the error I mentioned. (this is why Quarto is setting th IN_PKGDOWN envvar.

Should I look for anything else in particular?

I just installed pillar with pak::pak("r-lib/pillar#668") and surprisingly, it worked without issue.. I don't fully understand what is going on tbh.

I just made a github search for 'type_sum.accel' and landed here, and it mysteriously fixed my issue.

olivroy commented 4 months ago

Maybe pillar could simply use #' @exportS3method instead of s3_register() if it can depend on R 3.6? https://github.com/hadley/r-pkgs/issues/1082

krlmlr commented 4 months ago

I'd like to better understand the issue. Does it really have to be a Quarto vignette, or is a Quarto article sufficient (perhaps externally setting the IN_PKGDOWN environment variable)? Why is rmarkdown not affected?

olivroy commented 4 months ago

I am trying to build / preview a quarto article locally. I didn't encounter issues on GitHub actions.

It seems like IN_PKGDOWN is set for a longer period, and then I get an error somewhere in quarto_render().

I don't fully understand the interactions between all those components.

For now, since I didn't encounter issues on gh actions, it doesn't seem worth the trouble.

@hadley may have some ideas of what's going on.