carpentries / sandpaper-docs

Documentation for The Carpentries Workbench
https://carpentries.github.io/sandpaper-docs/
Other
5 stars 45 forks source link

Sandpaper error when restoring project library #200

Closed olexandr-konovalov closed 3 months ago

olexandr-konovalov commented 3 months ago

I am trying to follow https://carpentries.github.io/sandpaper-docs/migrating-from-styles.html and after the dialog

- Would you like to restore the project library? [y/N]: y

the following happens:

- Downloading whisker from CRAN ...             OK [64.9 Kb in 0.56s]
- Querying repositories for available source packages ... Done!
- Downloading sandpaper from https://carpentries.r-universe.dev ...     ERROR [error code 56]
Warning: failed to find binary for 'sandpaper 0.16.5' in package repositories
Warning: failed to find source for 'sandpaper 0.16.5' in package repositories
Warning: error downloading 'https://cloud.r-project.org/src/contrib/Archive/sandpaper/sandpaper_0.16.5.tar.gz' [error code 56]
Error: failed to retrieve package 'sandpaper@0.16.5'
Traceback (most recent calls last):
23: source("renv/activate.R")
22: withVisible(eval(ei, envir))
21: eval(ei, envir)
20: eval(ei, envir)
19: local(...) at activate.R#2
18: eval.parent(substitute(eval(quote(expr), envir)))
17: eval(expr, p)
16: eval(expr, p)
15: eval(quote(...), new.env())
14: eval(quote(...), new.env())
13: renv_bootstrap_exec(project, libpath, version) at activate.R#1216
12: if (!renv_bootstrap_load(project, libpath, version))
      renv_bootstrap_run(version, libpath) at activate.R#1049
11: return(renv::load(project = getwd())) at activate.R#1064
10: renv_load_finish(project, lockfile)
 9: renv_load_report_synchronized(project, lockfile)
 8: restore(project, prompt = FALSE, exclude = "renv")
 7: renv_restore_run_actions(project, diff, current, lockfile, rebuild)
 6: retrieve(packages)
 5: handler(package, renv_retrieve_impl(package))
 4: renv_retrieve_impl(package)
 3: renv_retrieve_repos(record)
 2: stopf("failed to retrieve package '%s'", renv_record_format_remote(record))
 1: stop(sprintf(fmt, ...), call. = call.)
> 

I can see that @froggleston released sandpaper 0.16.6 two days ago, but shouldn't the previous release still be available?

I can install the latest sandpaper manually, but then I am not sure that any other packages needed for the migration from styles to workbench would be missing

Context: I want to migrate https://github.com/carpentries-incubator/gap-lesson to Workbench.

froggleston commented 3 months ago

Hey @olexandr-konovalov - thanks for your question! I think this might be something for @tobyhodges - it looks like the renv.lock file needs to be updated to use 0.16.6 but I'm not 100% sure of the process for doing this. Toby, can you assist?

olexandr-konovalov commented 3 months ago

Thanks @froggleston - indeed, bumping up the version and updating md5 checksum in renv.lock seems to work. Of course, let's wait till @tobyhodges have the final word.

olexandr-konovalov commented 3 months ago

Next undocumented hurdle - missing jq. Resolved with brew install jq.

olexandr-konovalov commented 3 months ago

Finally, after some fiddling with (re)setting previous attempt after an error message caused by missing jq, it worked really well - everything was converted smoothly! Thanks a lot for providing tools and instructions! See Workbench version at https://carpentries-incubator.github.io/gap-lesson/

froggleston commented 3 months ago

Fixed in https://github.com/carpentries/lesson-transition/pull/103 and https://github.com/carpentries/lesson-transition/pull/104