Skip to content

Add public API for checking environment staleness#10

Open
yzx9 wants to merge 1 commit into
apposed:mainfrom
yzx9:check-up-to-date
Open

Add public API for checking environment staleness#10
yzx9 wants to merge 1 commit into
apposed:mainfrom
yzx9:check-up-to-date

Conversation

@yzx9
Copy link
Copy Markdown

@yzx9 yzx9 commented Jun 2, 2026

  • Adds isUpToDate() and checkUpToDate() to Builder and Environment, enabling applications to check whether an environment needs syncing without triggering a build
  • Introduces CheckResult interface with isUpToDate(), description(), and verified(): the verified() flag indicates whether a real tool was invoked (vs. a fast config comparison)
  • UvBuilder supports verified checks via uv sync --dry-run for pyproject.toml-based projects; PixiBuilder and MambaBuilder fall back to config-level checks

close apposed/appose#34

Test plan

  • Unit tests pass: CheckResult factory methods, SimpleBuilder always up-to-date, BaseBuilder stale when no env / stale after config change, DynamicBuilder delegation
  • Integration tests (require uv + appose-python): build uv envisUpToDate() returns true → modify config → returns false; checkUpToDate() returns verified=true for pyproject.toml projects

@yzx9 yzx9 force-pushed the check-up-to-date branch from 0277ed9 to 4d8b3ef Compare June 2, 2026 12:33
Add isUpToDate() and checkUpToDate() to Builder and Environment,
enabling applications to check whether an environment needs syncing
without triggering a build. The fast isUpToDate() compares against
appose.json; checkUpToDate() may additionally invoke tool-specific
verification (e.g., uv sync --dry-run) and returns a CheckResult
with a verified() flag.
@yzx9 yzx9 force-pushed the check-up-to-date branch from 4d8b3ef to 5b872ab Compare June 2, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add public API for checking environment staleness

1 participant