feat(publish): allow directory path for wkg publish#212
Conversation
Co-authored-by: Bailey Hayes <ricochet@users.noreply.github.com>
Co-authored-by: Bailey Hayes <ricochet@users.noreply.github.com>
| wit::build_wit_dir(&self.path, client.clone(), &mut lock_file).await?; | ||
| // There is no way to check if we are in a git repository unlike `cargo publish --allow-dirty` so | ||
| // check against previous values. | ||
| if lock_file != prev_lock_ref && !self.dry_run { |
There was a problem hiding this comment.
I'm not sure this check is even needed yet
vados-cosmonic
left a comment
There was a problem hiding this comment.
Hey @mkatychev this looks great!
Either in this PR or as a follow up (this PR has certainly been waiting too long!), what do you think about adding a regression test for this real quick? If there are any convenient-to-add adjacent tests those would be great too, but reading over the code this makes me think that we should really be testing the at multiple levels (core/client & CLI) to make sure we don't regress.
|
@vados-cosmonic I agree, one of my hesitations in doing config/data driven coverage testing is that I plan to add overlay support cargo style sometime after #215. Note this commit from the multi package publishing PR: |
Moved parts of
wkg wit buildinto shared function to allow logic reuse between publish and build:wasm-pkg-tools/crates/wkg/src/wit.rs
Lines 113 to 124 in a840224
wkg publish ./wit/will abort if it would result in changingwkg.lock