craigcitro / r-travis

Tools for using R with Travis (http://travis-ci.org) in lieu of a website:

Home Page:https://github.com/craigcitro/r-travis/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Command to install pandoc binary

hadley opened this issue · comments

RStudio provides pandoc binaries. These are useful if you want to check Rmd vignettes:

  # Install binary pandoc from Rstudio
  - export PATH="$HOME/pandoc:$PATH"
  - mkdir $HOME/pandoc
  - curl -O https://s3.amazonaws.com/rstudio-buildtools/pandoc-1.12.3.zip
  - unzip -j pandoc-1.12.3.zip pandoc-1.12.3/linux/debian/x86_64/pandoc
      -d $HOME/pandoc
  - chmod +x $HOME/pandoc/pandoc
  - pandoc --version

Awesome!! Thanks for sharing

sweet! a few questions:

  • is there a plan to have a -latest.zip file, so we're not stuck with a specific version?
  • there's a little tweak needed to get the $PATH udpate to be visible outside .travis.yml, but i think it's doable.
  • any mac binaries in the works? :D
  • @jjallaire could we have a -latest.zip for the pandoc binaries?
  • @craigcitro did you try unzipping that file? ;)

Here are the most up to date pandoc binaries we have: https://s3.amazonaws.com/rstudio-buildtools/pandoc-1.12.4.2.zip. Mac and Windows binaries are included in this zip file as well.

Note this is not "latest" as we only update our embedded pandoc periodically (with the final release of a given major pandoc point series, roughly every 9-12 months). If you want the very latest it's available from the pandoc GitHub releases page: https://github.com/jgm/pandoc/releases (note that there are only Windows and Mac binaries there not Linux). All of that said, I don't recommend that you blindly take the latest version as there are definitely regressions from version to version and it's good to wait until you know you have a version that works as expected for your scenario.

@jjallaire I think Craig was asking for an alias that would always point to the latest version that we provide

It' still unzips to a directory with the version encoded in the name (this
is important for the way we manage downloaded dependencies for the RStudio
IDE build) so having the "latest" alias won't actually help you (because
you still need to know the version number).

If you guys want to make a new archive that has no version markers at all
then go for it. However IMHO given the potential for regressions in pandoc
I think it's important that any downstream user actually knowingly take the
new version rather than automagically get the latest version. Note also
that we update about once a year so pointing to the new version when you
are ready for it should not be an undue maintenance burden.

On Wed, Nov 12, 2014 at 8:49 AM, Hadley Wickham notifications@github.com
wrote:

@jjallaire https://github.com/jjallaire I think Craig was asking for an
alias that would always point to the latest version that we provide


Reply to this email directly or view it on GitHub
#136 (comment).

@hadley sweet! i had not yet unzipped the file to find out it had mac binaries. wooooo ;)

@jjallaire i'll buy that argument for manually tracking the version. my only question is really in the opposite direction -- i assume older copies won't get deleted, so that we can depend on an old version as long as it works for us?

i'll try and take a shot at this tonight or tomorrow.

Yes, older versions are there permanently (we need that so we can rebuild
any branch/version of RStudio from source).

On Wed, Nov 12, 2014 at 12:06 PM, Craig Citro notifications@github.com
wrote:

@hadley https://github.com/hadley sweet! i had not yet unzipped the
file to find out it had mac binaries. wooooo ;)

@jjallaire https://github.com/jjallaire i'll buy that argument for
manually tracking the version. my only question is really in the opposite
direction -- i assume older copies won't get deleted, so that we can depend
on an old version as long as it works for us?

i'll try and take a shot at this tonight or tomorrow.


Reply to this email directly or view it on GitHub
#136 (comment).

It's working fine for me. See this recent build using this .travis.yml.

Note that the .travis.yml file uses https://github.com/metacran/r-builder (born from #9) because I need R-devel.

so i've got a branch (74ecd6f) with a first pass at this, and a build running -- but travis is having some issues tonight, so i'll check back tomorrow.

docs still needed, but the binary ends up in ${HOME}/pandoc/pandoc.

if someone else comes along and gives this a spin, let me know how it goes. ;)

I recommend that you put it in ${HOME}/opt/pandoc (where it will be
automatically found by the rmarkdown package with no manipulating of the
PATH necessary:
https://github.com/rstudio/rmarkdown/blob/master/R/pandoc.R#L495-L496)

On Thu, Nov 13, 2014 at 2:17 AM, Craig Citro notifications@github.com
wrote:

so i've got a branch (74ecd6f
74ecd6f)
with a first pass at this, and a build running
https://travis-ci.org/craigcitro/r-travis/builds/40858147 -- but travis
is having some issues tonight, so i'll check back tomorrow.

docs still needed, but the binary ends up in ${HOME}/pandoc/pandoc.

if someone else comes along and gives this a spin, let me know how it
goes. ;)


Reply to this email directly or view it on GitHub
#136 (comment).

@jjallaire ah, that's a good idea. (it also means i only need to sudo for one command.) one last question for you -- is there an easy way to get a list of all available versions? (i can't see a directory listing for the rstudio-buildtools bucket.)

this is up and running, and tested on both linux and mac. going to squash and merge right now -- feel free to file more issues if you hit trouble.

thanks!

There isn't currently a way to enumerate the available versions.

Note that I also happened to update to pandoc 1.13.1 yesterday so this is
now available:

https://s3.amazonaws.com/rstudio-buildtools/pandoc-1.13.1.zip

Next update will probably be on the order of 6-12 months away and I'll file
a PR here when that occurs.

On Sat, Nov 15, 2014 at 3:43 AM, Craig Citro notifications@github.com
wrote:

@jjallaire https://github.com/jjallaire ah, that's a good idea. (it
also means i only need to sudo for one command.) one last question for
you -- is there an easy way to get a list of all available versions? (i
can't see a directory listing for the rstudio-buildtools bucket.)

this is up and running, and tested on both linux
https://travis-ci.org/craigcitro/r-travis/builds/41076082 and mac
https://travis-ci.org/craigcitro/r-travis/builds/41077395. going to
squash and merge right now -- feel free to file more issues if you hit
trouble.

thanks!


Reply to this email directly or view it on GitHub
#136 (comment).

@jjallaire would it be possible to make different downloads for each platform binary? that zip is 110MB :(

@jjmalina are you worried about it in the context of travis, or just in general?

@craigcitro in general, but would certainly help in the context of travis. there are 6 platform binaries in that zip.

@jjmalina at least for travis, the plan is to get pandoc into a base image, so it shouldn't be a worry long-term.

Those binaries are originally intended for the RStudio build process and
for various reasons it makes sense for us to have them all contained in a
single binary. You are of course are more than welcome to fork off one or
more of these into their own download though.

On Mon, Mar 23, 2015 at 11:58 AM, Jeremiah Malina notifications@github.com
wrote:

@jjallaire https://github.com/jjallaire would it be possible to make
different downloads for each platform binary? that zip is 110MB :(


Reply to this email directly or view it on GitHub
#136 (comment).