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

Update default pandoc #469

Open
hadley opened this issue Jan 3, 2022 · 18 comments
Open

Update default pandoc #469

hadley opened this issue Jan 3, 2022 · 18 comments
Labels
blocked Blocked by an issue elsewhere feature a feature request or enhancement

Comments

@hadley
Copy link
Member

hadley commented Jan 3, 2022

2.7.3 is getting quite old; would be good to update to what dev RStudio uses, i.e. 2.16.1

@gaborcsardi
Copy link
Member

gaborcsardi commented Jan 3, 2022

The default is 2.14.2:

default: '2.14.2'

@hadley
Copy link
Member Author

hadley commented Jan 3, 2022

Hmmm, then why I am seeing 2.7.3 here: https://pkgdown.r-lib.org/pkgdown.yml?

Given https://github.com/r-lib/pkgdown/runs/4560801265?check_suite_focus=true, maybe I just need to update to v2?

(Still might be worth bumping to 2.16.1 anyway; I have a vague recollection that there's something useful there. But @cderv would be the best person to recommend the default version)

@cderv
Copy link
Contributor

cderv commented Jan 3, 2022

2.14.2 has been put the default in #336 and it has been done for v2 only so you need r-lib/actions/setup-pandoc@v2 I believe

Last IDE release ships 2.14.0.3 and not yet 2.16.2 which is current last released Pandoc version. 2.16 brings some changes in Lua and revert back the YAML parser but nothing that useful for R user. 2.15 had a fix useful for self-contained document.

Anway, it is hard to choose a good default version. Should actions follow the version shipped with RStudio IDE release ?
Seems like a good default.

We could also argue that the action is mainly design for installing Pandoc to test code in CI and that default to last available Pandoc version released is interesting to detect a breakage. One could pin a specific version in workflow when desired. This would require to update the default frequently, or better install the last available release by default.
Would that be bad ?

@hadley
Copy link
Member Author

hadley commented Jan 3, 2022

Ok, sounds like the current version is correct, and I just need to switch to v2.

More generally, it seems like the two most important versions are the version used by released RStudio (to check what a user is most likely to see) and the oldest version used on a CRAN machine (to avoid R CMD check issues) . Maybe we could add a couple of aliases so you could do version: CRAN or version: RStudio?

And then maybe version: release would make sense if you always wanted to use the latest pandoc release?

@gaborcsardi gaborcsardi added the feature a feature request or enhancement label Jan 3, 2022
@cderv
Copy link
Contributor

cderv commented Jan 4, 2022

I think the alias would be great. I would also see a version: devel or version: nightly related to #187. This is useful to test against future version of Pandoc.

Regarding pandoc ships with RStudio, just a note that future IDE release will use the Pandoc version shipped with Quarto and RStudio IDE will pin a Quarto version probably, which pin a Pandoc version. It does not change much but it could mean that Pandoc version in the IDE could increase quicker than it was in the past.

Do we have a service yet (like an API or maybe just a file somewhere) so that we can know which tools use what across RStudio ? It could simplify the maintenance for an action using such aliases.

@gaborcsardi
Copy link
Member

gaborcsardi commented Jan 4, 2022

We could add version aliases, with the price that they'll make the action less robust. E.g. for RStudio we would need to query the pandoc version in RStudio somewhere. So I think we should still keep the default a well defined reasonably recent version that we occasionally update.

The RStudio devel version is maybe here (in the master branch): https://github.com/rstudio/rstudio/blob/ed4b652356424770419680d85f742b2a88bf87d2/dependencies/common/install-pandoc#L24

The released version might be in the latest tag, but I am not sure:
https://github.com/rstudio/rstudio/blob/v2021.09.1+372/dependencies/common/install-pandoc#L24

CRAN uses different versions on different machines, so that is not very well defined.

@cderv
Copy link
Contributor

cderv commented Jan 4, 2022

For RStudio IDE, I don't know how those file you found will still be correct as I understand that Pandoc version from Quarto will be used now (rstudio/rstudio@12fcc2f)

Quarto version is indicated in a similar file: https://github.com/rstudio/rstudio/blob/b2694ae09e6c6f5560482084b655197bc3871123/dependencies/common/install-quarto#L29
but then Pandoc version would be in the file from the versioned tag then https://github.com/quarto-dev/quarto-cli/blob/bdfb7c3c0101bcd2575af067dbed1b8c3aaef729/configuration#L13

@gaborcsardi
Copy link
Member

Seems like quarto now uses 2.19.2: https://github.com/quarto-dev/quarto-cli/blob/38b7b765c5594fa19a73f854eefe2c98fdb3cdc8/configuration#L13

So FWIW I am going to update the hardcoded default now in the setup-pandoc action.

@gaborcsardi
Copy link
Member

This is blocked by some service that we can rely on for the various pandoc versions.

@gaborcsardi gaborcsardi added the blocked Blocked by an issue elsewhere label Oct 20, 2022
@cderv
Copy link
Contributor

cderv commented Oct 20, 2022

Can you be more precise on what you mean by some service ? What is blocking to update default pandoc version to latest version 2.19.2 ? You mean knowing which version we should update to and when ? We could probably provide such info within Quarto website if we want to rely on Quarto bundled version

@gaborcsardi
Copy link
Member

What is blocking to update default pandoc version to latest version 2.19.2 ?

Nothing, I already did that.

The version: CRAN etc. part is blocked. We need to be able to look up this info somewhere, in a robust way.

We could probably provide such info within Quarto website if we want to rely on Quarto bundled version

Yeah, that's a good step.

@gaborcsardi
Copy link
Member

To determine the latest pandoc release, we could use the https://github.com/jgm/pandoc/releases/latest link, this is redirected to the latest tag. Hopefully this has the binaries at the time it is created.

OTOH determining the versions in RStudio release and nightly needs a different logic, and is probably more fragile. So it would be still best to add these versions to https://api.r-hub.io/rversions/

@cderv
Copy link
Contributor

cderv commented Dec 29, 2022

To determine the latest pandoc release, we could use the https://github.com/jgm/pandoc/releases/latest link, this is redirected to the latest tag. Hopefully this has the binaries at the time it is created.

That is what I am using also in pandoc::pandoc_install()

@tarleb do you know when Github Pandoc releases are done if the binaries are already downloaded before making the release endpoint public ?

OTOH determining the versions in RStudio release and nightly needs a different logic, and is probably more fragile. So it would be still best to add these versions to api.r-hub.io/rversions

It could be probably easier for RStudio IDE team to maintain this information and each release and daily version. They have JSON endpoint for products where this may be interesting to add : https://dailies.rstudio.com/json-api/

OTOH Pandoc comes with Quarto now in the product, so maybe worth adding the information in Quarto own JSON ? We could easily add it.

Just ideas. api.r-hub.io/rversions could also be a good place for that probably.

@tarleb
Copy link

tarleb commented Dec 29, 2022

@tarleb do you know when Github Pandoc releases are done if the binaries are already downloaded before making the release endpoint public ?

Don't know for sure, but I believe that they are.

@tarleb
Copy link

tarleb commented Dec 29, 2022

FWIW, there's also pandoc/actions/setup.

@hadley
Copy link
Member Author

hadley commented Jan 3, 2023

@cderv would you mind working with the IDE/quarto teams to figure where's the best place to expose this info?

@cderv
Copy link
Contributor

cderv commented Jan 3, 2023

Sure - I'll work with them.

@gaborcsardi
Copy link
Member

gaborcsardi commented Feb 27, 2024

Some changes.

  • I updated the default to 3.1.11, which is the one that quarto is using right now.
  • I also added latest for the latest release, and
  • nightly for the nightly pandoc build.

(These changes are coming in the next r-lib/actions release.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by an issue elsewhere feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants