Skip to content

depguard

0.2.0Package record

Manifest-Based Dependency Conflict Detection for Sandboxed and Desktop R Sessions

0packages depend
382downloads / year
94.5%test coverage
13/13flavors OK

Overview

About

Lightweight, offline-first checking of R package dependencies against the currently installed environment, without requiring a full project lockfile. Verifies a declared manifest of package versions, including version constraints declared by transitive dependencies, reports session-level snapshot differences (including stale versions still loaded in a running session), detects packages shadowed by another library, and offers single-package version rollback. Designed for hosted notebooks (e.g. Kaggle, Colab, Binder) where 'renv'-style lockfile ownership is impractical, and equally usable on a normal desktop.

Changes in 0.2.0

Bug fixes

  • dep_diff() now detects upgrades and downgrades of packages that are loaded in the running session. Version 0.1.0 compared the *loaded* version, which does not change until R restarts, so the headline dep_snapshot() -> install.packages() -> dep_diff() workflow reported "no changes" for exactly the packages it was meant to protect. Comparison is now on the on-disk version, and a loaded package whose running version no longer matches disk is flagged (session_stale).
  • dep_check() is now genuinely offline by default. It previously called tools::package_dependencies() without a local database, which queried CRAN; with no internet the transitive tree came back empty and the check reported success. Dependencies are now resolved from installed metadata.
Show all changes in 0.2.0Hide the rest of the changes in 0.2.0
  • Malformed lines in a text manifest containing {} no longer break the error message.
  • Fixed a stray merge-conflict fragment in the vignette.

New features

  • dep_check() verifies the version constraints that packages declare on each other (Imports: cli (>= 3.4.0)), not just that transitive dependencies are installed, so real conflicts are caught. New columns loaded and reason; new status "restart"; stop_on_problem for scripts and CI; check_cran = TRUE now adds cran_latest and outdated and fails gracefully offline.
  • Manifests accept operators: ">= 1.2", "== 1.2.3", "< 2.0", "!= 1.0". A bare version still means "at least", so existing manifests keep working.
  • Manifests can be human-readable text files (any extension other than .rds), convenient for version control.
  • dep_manifest_freeze() pins the packages you are using now.
  • dep_snapshot() records every installed package by default (scope = "all"), can be saved with path, and dep_diff() accepts a snapshot, a file path, or nothing (the latest snapshot). Saved snapshots survive the session restart that hosted notebooks require after installs.
  • dep_env() detects Kaggle, Colab, Binder, RStudio and plain desktop sessions and reports writable libraries. Restart advice in messages is tailored to the platform.
  • dep_libraries() finds packages shadowed by a different version in another library.
  • dep_healthcheck() now reports the environment and shadowed packages.
  • dep_fix() gains lib, dry_run and method = "archive", a base-R backend that needs neither pak nor remotes. It verifies the result and warns if a restart is needed or if an earlier library hides the new copy.

Breaking changes

  • The depguard_snapshot structure changed (packages now has columns disk_version, library, loaded_version); snapshots saved by 0.1.0 cannot be diffed.
  • dep_check() results have two extra columns and the class depguard_check (still a data frame); the required column shows the operator form (e.g. ">= 1.1.4").
  • sessioninfo is no longer imported.
  • dep_check() prints the summary of problems; printing the result shows only problem rows (print(x, all = TRUE) for everything).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 20.5 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OKNow
  • OK5 OK2026-09-24
Advisories

none known

Documentation

In release 0.2.0
READMEYes · 371 wordsVignettesYes · 1 · staticNEWSYes · 100% structured · mentions 0.2.0Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
11 (1 internal)includes a package overview page
Examples that run
88%7 run in a plain check · 1 never run
Exported functions with examples
80%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

382
CRAN downloads in the past year
Rank #25,126 · ~1/day · ~32/mo
Daily download trend is not available in this view yet.
38230 days
38290 days
3821 year
Compare downloads with other packages →
Also on5 r2u3 autocran

Repository

1Stars
0Forks
0Open issues
0Open PRs
1Releases
24Commits
2Commit identities
dependency-managementgoogle-colabkagglerr-packager-package-developmentr-packagesreproducibility
24 commits · Last activity 2026-10-17
Responsiveness
not measured

Stars over time

2026-09-24 · 02026-10-07 · 1
PracticesBeta

5 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/sunraycodes/depguard on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
8 external dependencies (excludes base and recommended)

Installing depguard adds 1 package (1 with compiled code, 629 KB of source tarballs). Heaviest: cli 629 KB.

Depends (1)
R >= 3.5
Imports (4)
clistatstoolsutils
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (3)
Author, Maintainer since 0.1.0 (2026)
Contributor
Releases (2)

Pick two releases to compare their code metrics.

  • 0.2.0Latest
    record
    2026-10-06 · current release · diff ↗ ·
    added 3 exports
    dep_env, dep_libraries, dep_manifest_freeze
  • 0.1.0
    record
    2026-09-24
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-09-24
Total releases
2 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 3.5
Download size
40 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("depguard")
Amol Shah, S., Pal, A., & Patel, K. (2026). depguard: Manifest-Based Dependency Conflict Detection for Sandboxed and Desktop R Sessions (Version 0.2.0) [Computer software]. https://doi.org/10.32614/CRAN.package.depguard

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for depguard version 0.2.0 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy