Repository navigation
Require() returns FALSE when a package fails to attach; cloning no longer deletes from the source library; other round-6 follow-ups - #254
Open
eliotmcintire wants to merge 4 commits into
Conversation
…no longer deletes, pakPkgDep loop, token download retry - doLoads sets pkgDT$require FALSE for a package require() could not attach; Require() returns pkgDT$require, so it said TRUE. - clonablePackages no longer calls clearErrorReadRDSFile, which deleted every folder without readable metadata (incl. other installs' 00LOCK-) from cloneFrom source libraries. Function removed. - pakPkgDep gives up when the same archive supplement refs fail again. - .downloadFileMasterMainAuth with a token keeps the error and retries, instead of httr::content() on a try-error; uses URL, not url. - masterMainHEAD(need = "HEAD") returns the HEAD url once. - setupOff passes verbose to its messages. - tibble dropped from Suggests (last use removed in #251). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXgG6hSA1CRAMhvKajR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXgG6hSA1CRAMhvKajR
…folder without rprojroot (#255) * Drop unused packages from Suggests; setupOff finds the .Rproj folder with base R (no rprojroot) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXgG6hSA1CRAMhvKajR * Require's token-authenticated GitHub downloads go through curl; GETWauthThenNonAuth() stays on httr (#256) .downloadFileMasterMainAuth() now uses a new internal curlGETauth() (curl::curl_fetch_memory(), same bad-credentials/404 fallback). The exported GETWauthThenNonAuth() is unchanged and still returns an httr response, because SpaDES.core (module-repository.R) reads it with httr::content() and httr::stop_for_status(); httr stays in Suggests for it. checkForToken() now needs curl, not httr. Claude-Session: https://claude.ai/code/session_01Lx3DXgG6hSA1CRAMhvKajR Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…) needs it checkForToken() asks for both gitcreds and curl. The tests skipped only on a missing curl, so on the nosuggests runner (curl present, gitcreds absent) the token was never read and the tests failed. Same skip as test-31's token test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXgG6hSA1CRAMhvKajR
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes six bugs found while writing the round-6 tests. The two that matter most: Require said TRUE for a package it could not load, and cloning from another library could delete folders in that library.
Affects:
Require()now returns FALSE for a package that did not attach. A broken package in aRequire.cloneFromlibrary is skipped, not deleted along with other folders there. Dependency lookups for archived packages can no longer loop forever.Technical details
Each fix has a test in test-31 ("follow-ups from round 6") that fails on the old code.
doLoads()(R/Require2.R):Require()builds its return value frompkgDT$require, not fromdoLoads()'s result, so a package whoserequire()returned FALSE still came back TRUE.doLoads()now setsrequire := FALSEfor those rows. The line that reorderedoutand discarded the result is removed.clonablePackages()calledclearErrorReadRDSFile()on eachcloneFromsource library. On any readRDS error it deleted every folder there without a readableMeta/package.rds: the broken package, and also other processes'00LOCK-*folders. The call and function are removed;packageHasError()already filters broken packages out. Its test in test-28 is removed.pakPkgDep()(R/pak.R): when the archive retry added the same supplement refs again,pkgDonewas reset, so it calledpak::pkg_depsforever. It now gives up when there are no new refs..downloadFileMasterMainAuth()with a git token: a failed GET went tohttr::content()on a try-error ("is.response(x) is not TRUE"). It also usedurlwhere it should have usedURL. It now keeps the error and retries, like the no-token path.masterMainHEAD(need = "HEAD")returned the HEAD url twice; it now returns it once.setupOff()passesverboseto its messages.tibbleis removed from Suggests; Unit tests (coverage round 6) and the bugs they found; remove dead code #251 removed its last use.ianmseddy/LandR.CSrenamedmastertomain, soLandR.CS@mastercould not be installed. The test now asks for@main. It failed the same way on unchanged development.Checked and left alone: the PAT-strip in the muffled warning handler has no effect (harmless);
withCloneLocktaking over an empty lock after 60 s is deliberate;pakSerialInstall's captured messages never show (harmless);downloadRepo()is used by SpaDES.project.Full local
devtools::test()(2.1.1.9055): 561 tests, 2474 passed, 0 failed/errors/warnings/skipped.🤖 Generated with Claude Code
https://claude.ai/code/session_01Lx3DXgG6hSA1CRAMhvKajR