Pkgdown: Highlight package update cannot be compiled for older R versions

Created on 2 Dec 2019  路  6Comments  路  Source: r-lib/pkgdown

Import highlight.

The current CRAN-version 0.4.7.3 delivers the following problem when used on travis-ci for R 3.3, R 3.4 and R 3.5

g++ -I"/home/travis/R-bin/lib/R/include" -DNDEBUG -I/home/travis/R-bin/include -I. -fpic -g -O2 -c codegenerator.cpp -o codegenerator.o

Is there a way to remove the dependency?

Most helpful comment

highlight is orphaned.

All 6 comments

highlight is orphaned.

If highlight stays orphaned, would it make sense to switch to highr, which is a dependency of knitr, so it already is an implicit dep (albeit via Suggests, but still)?

It's probably time to think about switching to highr. A PR is welcome.

Transferring from a Slack conversation with @jimhester

Here is the diff of CRAN's (BDRs) changes

diff highlight_0.4.7.2 highlight_0.4.7.3 -r
diff -r highlight_0.4.7.2/DESCRIPTION highlight_0.4.7.3/DESCRIPTION
8c8
< Version: 0.4.7.2
---
> Version: 0.4.7.3
23c23
< Date/Publication: 2017-10-04 09:19:47 UTC
---
> Date/Publication: 2019-12-01 08:24:40 UTC
25c25
< Packaged: 2017-10-04 09:15:29 UTC; ripley
---
> Packaged: 2019-12-01 08:12:05 UTC; ripley
27c27,28
<         corrected.  NMU by CRAN team.  Further NMU 2017-10-04.
---
>         corrected.  NMU by CRAN team.  Further NMUs 2017-10-04 and
>         2019-12-01.
diff -r highlight_0.4.7.2/MD5 highlight_0.4.7.3/MD5
1c1
< 3f5eda74e791178971d7fcf84e2a1020 *DESCRIPTION
---
> fb2f30fb4ab847bb92b6bebbbf94d913 *DESCRIPTION
254c254
< d43777ed13ce39f8ce241cec6f68c399 *src/codegenerator.cpp
---
> 47b6ec866f4c2b182669556d35a6353b *src/codegenerator.cpp
271c271
< 7f49838452258678e520cf8c940fc3b8 *src/languagedefinition.cpp
---
> 5a481c91a36abb58cfbc0cc6fb90025f *src/languagedefinition.cpp
diff -r highlight_0.4.7.2/src/codegenerator.cpp highlight_0.4.7.3/src/codegenerator.cpp
464c464
<                       auto_ptr<Matcher> matcher ( regexElem->rePattern->createMatcher ( line ) );
---
>                       unique_ptr<Matcher> matcher ( regexElem->rePattern->createMatcher ( line ) );
1742,1743c1742,1743
<                       auto_ptr<Pattern> reDefPattern ( Pattern::compile ( "\\$[-\\w]+" ) );
<                       auto_ptr<Matcher> m ( reDefPattern->createMatcher ( line.substr ( noParseCmd.size() +cmdPos ) ) );
---
>                       unique_ptr<Pattern> reDefPattern ( Pattern::compile ( "\\$[-\\w]+" ) );
>                       unique_ptr<Matcher> m ( reDefPattern->createMatcher ( line.substr ( noParseCmd.size() +cmdPos ) ) );
diff -r highlight_0.4.7.2/src/languagedefinition.cpp highlight_0.4.7.3/src/languagedefinition.cpp
100c100
<               auto_ptr<Matcher> m ( reDefPattern->createMatcher ( paramValue ) );
---
>               unique_ptr<Matcher> m ( reDefPattern->createMatcher ( paramValue ) );

He is using unique_ptr, a C++11 feature, but not declaring C++11 in SystemRequirements, presumably because R-devel now assumes C++11, but this breaks backwards compatibility

This would be really great to fix, probably by eliminating the use of highlight (unless there's a plan to unORPHAN it).

I think this should be resolved now that @hadley has un-orphaned highlight.

https://cran.r-project.org/web/packages/highlight/index.html

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seanhardison1 picture seanhardison1  路  5Comments

dfalbel picture dfalbel  路  10Comments

chuxinyuan picture chuxinyuan  路  6Comments

privefl picture privefl  路  3Comments

nschiett picture nschiett  路  6Comments