Skip to content

documents fail on bookdown 0.23 #380

Closed

Description

@bob-carpenter

Summary:

After upgrading the R package bookdown to the 0.23 (the latest), our documents fail to build. I know it builds in 0.18 as that's the previous version I had. See below for the gory details.

This might be an issue with bookdown, but I don't see that anywhere.

Description:

~/github/stan-dev/docs (feature/issue-375-complex-numbers)$ python build.py 2 28 reference-manual html

processing file: _main.Rmd
  |......................................................................| 100%
   inline R code fragments


output file: _main.knit.md

/usr/local/bin/pandoc +RTS -K512m -RTS _main.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash+smart --output _main.html --email-obfuscation none --wrap preserve --standalone --section-divs --table-of-contents --toc-depth 3 --template /Library/Frameworks/R.framework/Versions/3.6/Resources/library/bookdown/templates/gitbook.html --highlight-style pygments --number-sections --css ../stan-manual.css --include-in-header /var/folders/b3/6h4t41094vz281j7nn48ws900001jv/T//RtmpRHfYjh/rmarkdown-strd100676522e8.html --mathjax --lua-filter /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown/rmd/lua/latex-div.lua --filter /usr/local/bin/pandoc-citeproc 

Output created: _book/index.html
[1] "/Users/bcarpenter/github/stan-dev/docs/src/reference-manual/_book/index.html"

and then

> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] bookdown_0.18

loaded via a namespace (and not attached):
[1] compiler_3.6.2 tools_3.6.2    knitr_1.28     xfun_0.12 

but then after updating:

> install.packages('bookdown')
--- Please select a CRAN mirror for use in this session ---
...

I get this

> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] bookdown_0.23

loaded via a namespace (and not attached):
[1] compiler_3.6.2 tools_3.6.2    knitr_1.33     xfun_0.25    

but the docs fail to build with this error:

~/github/stan-dev/docs (feature/issue-375-complex-numbers)$ python build.py 2 28 reference-manual html
Error: $ operator is invalid for atomic vectors
Execution halted

Command Rscript -e "bookdown::render_book('index.Rmd', output_format='bookdown::gitbook')" failed

Traceback (most recent call last):
  File "build.py", line 113, in <module>
    main()
  File "build.py", line 109, in main
    make_docs(docspath, stan_version, doc, formats)
  File "build.py", line 54, in make_docs
    shexec(command)
  File "build.py", line 35, in shexec
    raise Exception(returncode)
Exception: 1

Nothing informative in the error other than the line I spaced out. Is there a way to figure out what's going wrong here?

Additional Information:

Provide any additional information here.

Current Version:

v2.18.0

Activity

  1. mitzimorris commented on Aug 23, 2021

    @mitzimorris
    Member

    https://stackoverflow.com/questions/68806645/bookdown-0-22-0-23-error-operator-is-invalid-for-atomic-vectors

    problem is a bookdown problem. we could pin the version to 0.22. or follow other suggestions in the SO discussion.

  2. bob-carpenter commented on Aug 23, 2021

    @bob-carpenter
    MemberAuthor

    @mitzimorris: How do we pin a version of an R package? If the last suggestion in the StackOverflow discussion works for the latest bookdown, I think we should go with that. My reasoning is that it's easier to keep an R package upgraded than downgraded.

  3. mitzimorris commented on Aug 23, 2021

    @mitzimorris
    Member

    global namespace of R will make pinning version difficult.
    the problem is that the devs at RStudio introduced a breaking change to the yaml config ("_output.yml").
    we need to change the header from:

    search: TRUE
    

    to

    search:
        engine: lunr
    

    (or search engine fuse - they're saying go with fuse).

  4. WardBrian commented on Oct 26, 2021

    @WardBrian
    Member

    Closed by #390

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions