Pkg.undo() snapshot-step granularity limit in environment recovery
0 reputation · 15 Nov 2020, 08:01 UTC
Julia's Pkg package manager records mutating operations as snapshots of the active environment, enabling Pkg.undo() and Pkg.redo() to revert or re-apply the most recent change. This documented capability provides a first-line recovery path after a failed package upgrade, particularly when paired with a preserved Manifest.toml. However, the undo mechanism steps through recorded snapshots sequentially, and no public interface exists for targeting a specific historical snapshot by name, date, or operation index. This design choice creates a practical limitation for environments where multiple consecutive upgrades have occurred and a user must revert several steps without manually reconstructing a prior Manifest. Given that snapshot retention is not guaranteed to persist across depot resets or Julia session restarts, the inability to index or name prior states represents a gap in the recovery workflow.
- What mechanisms, if any, allow direct navigation to a named or dated undo snapshot?
- Is there an undocumented API or internal state that exposes the snapshot index map?
- How does the project intend to address stepwise-only undo in future Pkg versions?