8000 Request: more informative error message · Issue #305 · rstudio/renv · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Request: more informative error message #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wch opened this issue Dec 17, 2019 · 5 comments
Closed

Request: more informative error message #305

wch opened this issue Dec 17, 2019 · 5 comments

Comments

@wch
Copy link
wch commented Dec 17, 2019

I'm running renv::snapshot() in a GitHub Actions workflow and it's failing with this message:

Error in renv_filebacked_get(scope, path) : 
  renv_path_absolute(path) is not TRUE

https://github.com/rstudio/shiny-core-ci/runs/351435079#step:11:11

It would be very helpful to have an error message that explains what the problem is. FWIW, I don't get the error message when I run it locally, but I'm not sure why it's different. I worked around this in GitHub Actions by using path=getwd().

@kevinushey
Copy link
Collaborator

It would be helpful to know what commands, exactly, what you're running. The traceback:

19: renv::snapshot("apps/renv.lock", confirm = FALSE)

seems to suggest you might be calling renv::snapshot() incorrectly. (The first argument is the path to the project, not the lockfile)

@kevinushey
Copy link
Collaborator

Looks like the traceback is wrong -- the code is here:

https://github.com/rstudio/shiny-core-ci/blob/7ce1f29c71fce81c74a58579022c38a275464ad3/run_tests.R#L18

I think that I need to normalize the project path to ensure it's absolute.

@wch
Copy link
Author
wch commented Dec 17, 2019

Oh, the traceback is actually correct -- it's just that I had modified that line of code since then. This is what it looked like:
https://github.com/rstudio/shiny-core-ci/blob/aeb6acbba14f03d8e035d458e68eb79f2016d89a/run_tests.R#L18

Now that I look at it, I think I must have been running the command differently on my local system. 🤦‍♀ I have a feeling you don't think that you need to fix the code, but a clearer error message would still be helpful.

@wch
Copy link
Author
wch commented Dec 17, 2019

OK, after more trial and error, I found that this works:

renv::snapshot(getwd(), lockfile = "apps/renv.lock", confirm = FALSE)

This does not:

renv::snapshot(".", lockfile = "apps/renv.lock", confirm = FALSE)

@wch
Copy link
Author
wch commented Dec 17, 2019

One more thought: it might be helpful to error if there are any ... arguments, since it looks like they're currently ignored -- if someone provides them, it's probably a mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0