[R-pkg-devel] [External] Re: debian - how to replicate the error
Zhang, Xueqiong
jo@n@zh@ng @end|ng |rom emory@edu
Wed Sep 21 02:12:47 CEST 2022
Hi Ivan, thanks for these helpful inputs! I have tested my package on an ubuntu box, it seemed work well. I am currently working on setting up a debian instance on aws, and hopefully I can catch the bug from there. Will keep you posted if the bug is something we need be aware of. Thanks, 😊
Joan Zhang
From: Ivan Krylov <krylov.r00t using gmail.com>
Date: Tuesday, September 20, 2022 at 3:26 AM
To: Zhang, Xueqiong <joan.zhang using emory.edu>
Cc: r-package-devel using r-project.org <r-package-devel using r-project.org>
Subject: [External] Re: [R-pkg-devel] debian - how to replicate the error
On Tue, 20 Sep 2022 03:28:09 +0000
"Zhang, Xueqiong" <joan.zhang using emory.edu> wrote:
> I don’t have a linux box, and was not able to check it via
> r-hub-linux-platforms since some of bioc dependencies are not
> installed on r-hub. What should I do for the error check, any ideas?
There are Debian builds for both x86_64 and arm64, so it should be
possible to set up a virtual machine on your Mac that would be
relatively quick thanks to hardware virtualisation. For example, you
could start with a Dockerfile for an R-hub builder [1], add the missing
Bioconductor packages and try to reproduce the error there.
This way lies a lot of work, though. Worst case scenario, after you're
done setting up the virtual machine, the test may pass.
> I am thinking error from debian was caused by tempdir()? this is the
> code of how I created the temp folder fd_out =
> as.character(paste0(tempdir(), "/", "outputs", "/")) . The error will
> go away if I change the code to fd_out = tempdir()?
Doesn't look likely to me. True, you could use file.path(tempdir(),
'outputs') instead of paste0(...), but that shouldn't cause any
differences between two POSIX-compatible systems that both use a
forward slash as a directory separator.
An error due to file paths would look like "file not found", or tests
for file paths being equivalent failing due to a spurious slash or
something. Your error looks different:
> Error in `select(., -c(id, seq_num))`: Can't subset columns that
> don't exist.
> x Column `id` doesn't exist.
Try instrumenting your tests to produce more output around that line?
(Not sure how to do that with testthat.) Since we don't see the code,
we can't say much else. Where does that data.frame come from? What
could be the reasons for it to miss an "id" column? Does seq_num exist
there too?
> Also, tempdir() is something like this
> "/var/folders/_p/vkt5cmsn2559zqnyhpdwnnsr0000gn/T//RtmpUHe1uR" . I
> wonder if the double slashes doesn’t recognized by linux?
No, that's not the problem. POSIX allows an operating system to treat a
double slash in the beginning of a path specially, but on Linux,
multiple slashes anywhere are equivalent to a single slash:
cd ////////usr///////bin && pwd
# /usr/bin
--
Best regards,
Ivan
[1] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fr-hub%2Frhub-linux-builders&data=05%7C01%7Cjoan.zhang%40emory.edu%7Cea374061de6946ffc5f308da9ad957a4%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C637992555687410710%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=i21TZo3IQ3ni6ttETec%2F70CQlZgKr%2FnrrkujRaX50Js%3D&reserved=0
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list