Error: argument "update" is missing, with no default
I'm getting the following error in my Github Actions workflows when using Bioconductor 3.16 e.g. here
Error in .install_github(todo, lib = lib, lib.loc = lib.loc, repos = repos, :
argument "update" is missing, with no default
The call that leads to this is BiocManager::install(version = "3.16", ask = FALSE) however I'm having trouble recreating it outside of GitHub Actions. It seems fine both on my local machine and in Docker, but in the action you can see it occurs on all three operating systems. However it doesn't occur when I'm using Bioconductor 3.15, even though they're the same version of BiocManager e.g. here
I'm not sure if this is the root cause, but maybe this line does need update to be passed to the call to .install()? I haven't spent enough time to follow the logic about whether you could ever end up at this point with update defined but not passed on.
https://github.com/Bioconductor/BiocManager/blob/2e16840e990b2d322f69e74e0e2a59d5febc66ee/R/install.R#L262
I wondered if you had any insights on what might be going on.
Cheers, Mike
Hi Mike, This should be taken care of at https://github.com/Bioconductor/BiocManager/commit/bed58a6054fe4a91c09ff74b1e1f97db2b53630b And available with version 1.30.19 Feel free to re-open if the error persists. Best, Marcel
Thanks for the info Marcel.
This is weird then, because you can clearly see at https://github.com/grimbough/biocActionsExamples/actions/runs/3329539630/jobs/5506890568#step:3:226 that the failing workflow is installing 1.30.19 and at https://github.com/grimbough/biocActionsExamples/actions/runs/3329539630/jobs/5506890568#step:3:257 it's printing the output from BiocManager:::.install which shows the changes made in that commit, so they should be reflected in the code.
There must be something odd about the setup on GitHub actions. I'll give it a day or so to check if this is some transient problem and get back to you.
Is there a path .install() -> .install_updated_version() -> .install() that loses update (it's passed to .install_updated_version(), but not passed from there to .install())? Maybe in the GitHub action you could arrange for options(error = traceback) to get the traceback when the error occurs...
That is strange. Are you using the same runner for release and devel?
I'm not sure why .install_updated_version() would be called.
As far as I can see the runners are the same, the version of R is the same, the installation of BiocManager is the same. It's just BiocManager::install(version = "3.16", ask = FALSE) Vs BiocManager::install(version = "3.15", ask = FALSE). Very weird, but the same behaviour is consistent across 3 different OSs.
Debugging is definitely made more complex by burying this inside an action. I'll add options(error = traceback) tomorrow and maybe also try a standalone workflow calling the two command.
I can replicate this in a regular workflow outside of my own actions.
Maybe this run helps (https://github.com/grimbough/bioc-manager-testing/actions/runs/3334657404/jobs/5517840246)
The trackback from rlang::last_error() is:
Error in .install_github(todo, lib = lib, lib.loc = lib.loc, repos = repos, :
argument "update" is missing, with no default
The downloaded binary packages are in
Calls: <Anonymous> ... .install_updated_version -> .install -> .install_github
/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//Rtmpgn34D8/downloaded_packages
Execution halted
Backtrace:
1. BiocManager::install(version = "3.16", ask = FALSE)
2. BiocManager:::.install_updated_version(...)
3. BiocManager:::.install(...)
4. BiocManager:::.install_github(...)
I'm not sure why
.install_updated_version()would be called.
I think this is because with a fresh install of R-4.2.1, followed by an install of BiocManager, the return value of BiocManager::version() is "3.15".
When you then call BiocManager::install(version = "3.16", ask = FALSE) this line
https://github.com/Bioconductor/BiocManager/blob/2e16840e990b2d322f69e74e0e2a59d5febc66ee/R/install.R#L398
leads to cmp <- 1L.
Then when we get here:
https://github.com/Bioconductor/BiocManager/blob/2e16840e990b2d322f69e74e0e2a59d5febc66ee/R/install.R#L435-L439
cmp != 0 is TRUE and .install_updated_version() gets executed. That's presumably the correct behaviour if one is really updating the BioC version, but it does look like you can get .install_updated_version() -> .install() where the value of update is dropped.
Here's an docker command that shows those steps and reproduces the issue:
docker run -ti --rm r-base:4.2.1 R \
-e "install.packages('BiocManager')" \
-e "BiocManager::version()" \
-e "BiocManager::install(version='3.16',ask=FALSE)"
Hi Mike, @grimbough Can you try with this branch? https://github.com/Bioconductor/BiocManager/tree/update_142 Best, Marcel
Hi @LiNk-NY - I ran into the same issue as Mike and saw this thread 🙂 the branch above seems to still fail for me, but now because it's missing the ask argument: https://github.com/csoneson/test_biocmanager/actions/runs/3343658102/jobs/5537107445#step:6:81.
Ah thanks, Charlotte @csoneson I've updated the branch. Can you try again? Best, Marcel
Yep, that seems to work!
What about the other 'top level' arguments, checkBuilt, version, site_repository? Do (some?) need to be passed too?
Sorry @LiNk-NY I've been travelling today, thanks for providing the patches & thanks for stepping in with the testing @csoneson
I can confirm that the update_142 branch works for me, no matter what combination of arguments I've provided. Thanks for the patch @LiNk-NY
@LiNk-NY - since this seems to be working for people, is this fix going to be merged?
For now, I've merged the branch into the main branch (devel). I don't have an exact date for when the CRAN version will be updated.
I needed to install the current version on GitHub (7e3f92cb78472051712571b070f155f4516fa23d) to upgrade to BioC 3.16 on my Ubuntu laptop. I think it would be good to it updated on CRAN ASAP.
Thanks Pete. CRAN discourages frequent updates (no more than 3 per month, IIRC) and therefore we publish enhancements and fixes in batches. I am working on a substantial change to add to the next release of BiocManager. Thanks for your patience.