extendr / rextendr

An R package that helps scaffolding extendr-enabled packages or compiling Rust code dynamically
https://extendr.github.io/rextendr/
Other
184 stars 27 forks source link

pkgdown action fails #201

Closed yutannihilation closed 2 years ago

yutannihilation commented 2 years ago

No idea what's happening.

https://github.com/extendr/rextendr/runs/6656686376?check_suite_focus=true

 ✔ Writing '/tmp/Rtmp2pTV9x/file353a5843f7a3/target/extendr_wrappers.R'
✔ Evaluating Rust extendr code chunk...
✔ Compiling Rust extendr code chunk...
ℹ build directory: /tmp/Rtmp2pTV9x/file353a5843f7a3
   Compiling rextendr7 v0.0.1 (/tmp/Rtmp2pTV9x/file353a5843f7a3)
error: could not compile `rextendr7` due to 2 previous errors
Quitting from lines 167-195 (rmarkdown.Rmd) 
Error in invoke_cargo(toolchain = toolchain, specific_target = specific_target,  : 
  Rust code could not be compiled successfully. Aborting.
✖ error[E0425]: cannot find function `class_symbol` in this scope
  --> src/lib.rs:16:1
   |
16 | #[extendr]
   | ^^^^^^^^^^ not found in this scope
   |
   = note: this error originates in the attribute macro `extendr` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing one of these items
   |
1  | use crate::symbol::class_symbol;
   |
1  | use extendr_api::symbol::class_symbol;
   |
✖ error: aborting due to previous error
--------------------------------------------------------------------------------
Error: Error in !trace_length(trace) : invalid argument type
Calls: <Anonymous> ... signal_abort -> cnd_message -> format_onerror_backtrace
Execution halted
Error: Process completed with exit code 1.
yutannihilation commented 2 years ago

The error happens during rendering this chunk.

https://github.com/extendr/rextendr/blob/ca41ec0126e8eb0404a666caa81ba78f5cdddf92/vignettes/rmarkdown.Rmd#L166-L195

yutannihilation commented 2 years ago

While the document says

https://github.com/extendr/rextendr/blob/ca41ec0126e8eb0404a666caa81ba78f5cdddf92/R/source.R#L24-L27

but it seems what's actually added is use extendr_api::*; Maybe this is a typo?

https://github.com/extendr/rextendr/blob/ca41ec0126e8eb0404a666caa81ba78f5cdddf92/R/source.R#L130