Skip to content

Comments

package and version inference, build driver persistence#17

Open
mikonse wants to merge 21 commits intomainfrom
milo/package-and-version-inference
Open

package and version inference, build driver persistence#17
mikonse wants to merge 21 commits intomainfrom
milo/package-and-version-inference

Conversation

@mikonse
Copy link
Member

@mikonse mikonse commented Jan 14, 2026

No description provided.

@mikonse mikonse force-pushed the milo/package-and-version-inference branch from 90d9022 to ad295ac Compare January 14, 2026 21:14
@mikonse mikonse marked this pull request as ready for review February 12, 2026 21:45
@TheJJ TheJJ requested a review from Copilot February 14, 2026 13:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the debmagic CLI/build implementation to infer package name/version from debian/changelog, introduces driver persistence (esp. for Docker/incremental workflows), and updates tooling/CI accordingly.

Changes:

  • Add package description inference from debian/changelog and use a structured PackageVersion.
  • Introduce persistent build driver configuration and new Docker driver implementation under pack/.
  • Update CLI (buildpack), integration tests, CI, and add Python tests for debmagic-pkg parsing/utilities.

Reviewed changes

Copilot reviewed 19 out of 26 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
tests/integration/test_packages.py Updates integration test to run cargo run … pack and adjusts Docker base image flag / pip install args.
packages/debmagic/tests/assets/config1.toml Adjusts test config fixture to new [driver] persistent config.
packages/debmagic/src/package.rs Adds changelog-based package name/version inference.
packages/debmagic/src/pack/driver_docker.rs New Docker build driver with optional persistence + metadata handling.
packages/debmagic/src/pack/driver_bare.rs Refactors bare driver to use new shared driver config + updated trait signature.
packages/debmagic/src/pack/config.rs Introduces shared DriverConfig with persistent + per-driver subconfigs.
packages/debmagic/src/pack/common.rs Removes old PackageDescription, updates BuildConfig, changes interactive_shell signature.
packages/debmagic/src/pack.rs Main packaging flow; improves error context and replaces tree copy with ignore walker.
packages/debmagic/src/main.rs Switches CLI subcommand to pack, changes config discovery path, wires CLI overrides.
packages/debmagic/src/config.rs Updates config model (replaces dry_run with incremental) and adjusts tests.
packages/debmagic/src/cli.rs Restructures CLI args, adds docker base-image flag and persistence/incremental flags.
packages/debmagic/src/build/driver_docker.rs Removes old build-module Docker driver implementation.
packages/debmagic/src/build/config.rs Removes old build-module driver config.
packages/debmagic/Cargo.toml Adds dependencies for changelog parsing + ignore-based walking + common crate.
packages/debmagic-pkg/tests/test_versioning.py Adds Python tests for version parsing parity.
packages/debmagic-pkg/tests/test_package.py Adds Python tests for source package parsing.
packages/debmagic-pkg/tests/test_exec.py Adds Python tests for subprocess helper behavior.
packages/debmagic-pkg/tests/test_changelog.py Adds Python tests for changelog parsing (including timestamp parsing).
packages/debmagic-pkg/tests/assets/pkg1/debian/control Adds fixture Debian control file for Python tests.
packages/debmagic-pkg/tests/assets/pkg1/debian/changelog Adds fixture changelog file for Python tests.
packages/debmagic-common/src/debian/version.rs Refactors PackageVersion to Option fields + adds Display.
debian/control Adds new Rust build-deps and removes ${python3:Depends} from debmagic package.
Cargo.toml Adds workspace deps for debmagic-common, debian-changelog, and ignore.
Cargo.lock Locks newly added Rust dependencies.
.pre-commit-config.yaml Adds a clippy pre-commit hook.
.github/workflows/ci.yml Updates CI self-build step to use debmagic pack.
Comments suppressed due to low confidence (2)

packages/debmagic/src/pack/driver_bare.rs:82

  • interactive_shell for the bare driver no longer opens an interactive shell; it only prints the build source directory. This breaks the “drop into shell on failure” workflow in pack.rs for bare builds. Consider restoring the previous behavior (spawn $SHELL/bash) and use the provided cwd so the shell opens in the build directory.
    packages/debmagic/src/pack.rs:276
  • copy_dir_all copies files to dst.join(relative_path) but doesn’t ensure the destination parent directory exists for file entries. ignore::Walk ordering isn’t guaranteed to yield directories before files, so this can fail with No such file or directory for nested files. Create dst.join(relative_path).parent() (if any) before calling fs::copy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 28 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant