extendr / rextendr

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

[Bugfix 234]: Fix how `rust_source()` handles code passed via `file` parameter #248

Closed Ilia-Kosenkov closed 1 year ago

Ilia-Kosenkov commented 1 year ago

Fixes #234

Ilia-Kosenkov commented 1 year ago

@yutannihilation , any idea why this is failing? Cannot reproduce locally. I suspect something wrong with the source code on Windows.

Ilia-Kosenkov commented 1 year ago

I am currently debugging CI, so the latest runs fail on purpose.

CGMossa commented 1 year ago

Is the long-path support a Windows feature? Maybe we should have this check:

- name: Check LongPathsEnabled
  run: |
           (Get-ItemProperty "HKLM:System\CurrentControlSet\Control\FileSystem").LongPathsEnabled

there is this link as well https://www.microfocus.com/documentation/filr/filr-4/filr-desktop/t47bx2ogpfz7.html I'm not finding something for making it possible in the runner.

Ilia-Kosenkov commented 1 year ago

For some reason, it does not fail on R-devel on Windows, which may suggest that R-devel does things differently.

Ilia-Kosenkov commented 1 year ago

Yes and no. I am fairly confident in the approach I've chosen, but these tests guard us against such path/libraryname problems. And I guarantee you there will be another person using rust_source() in a weird scenario, so better be safe than sorry :)

yutannihilation commented 1 year ago

R-devel does things differently.

It seems the implementation around file path on Winodws is getting overhauled in R-devel. But, I don't understand the details and how it relates to the difference we observed here... Anyway, good that it passed the CI.