Skip to content

Add env mode to spk export - #1366

Open
jrray wants to merge 1 commit into
mainfrom
export-solve-mode
Open

jrray wants to merge 1 commit into
mainfrom
export-solve-mode

Conversation

@jrray

@jrray jrray commented May 19, 2026

Copy link
Copy Markdown
Collaborator

I had a need to export a package and all its dependencies and found that I had to export them one by one, and tediously figure out each dependency and version needed. And since I was lazy I also ended up exporting all the builds of these packages when I really only needed the one build necessary for the solve to succeed. So I had this idea to extend the spk export command to accept a list of requests and have it figure this all out automatically, and produce a single output file with all the packages.

Summary

  • add an --env mode to spk export that writes a complete solved archive
  • preserve the existing direct package export flow
  • because --env accepts a variable number of requests, a custom output filename is provided via --file/-f rather than a positional argument
  • cover env-mode filename derivation, whole-solution export, and multiple-requests-with-custom-filename behavior

Testing

  • make nextest lint

@jrray jrray self-assigned this May 19, 2026
@jrray jrray added enhancement New feature or request AI Code authored with AI assistance. labels May 19, 2026
@jrray
jrray force-pushed the export-solve-mode branch 2 times, most recently from a7f6952 to 6104837 Compare May 19, 2026 19:08
@codecov

codecov Bot commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.82192% with 28 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/spk-cli/group3/src/cmd_export.rs 73.68% 15 Missing ⚠️
crates/spk-storage/src/storage/archive.rs 77.19% 13 Missing ⚠️

📢 Thoughts on this report? Let us know!

@jrray
jrray force-pushed the export-solve-mode branch from 6104837 to c2a21df Compare June 4, 2026 19:25
@jrray jrray changed the title Add solve mode to spk export Add env mode to spk export Jun 4, 2026
Extend spk export with a --env mode that resolves requests and
writes the full solved package set into a single importable archive.

This keeps single-package exports available while letting solved
environments be exported as complete, reusable archives.

Because --env accepts a variable number of requests, a custom output
filename is given via --file/-f rather than a positional argument.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: J Robert Ray <jrray@imageworks.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jrray
jrray force-pushed the export-solve-mode branch from c2a21df to eff6e64 Compare June 4, 2026 19:40
@jrray
jrray requested a review from rydrman June 4, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Code authored with AI assistance. enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants