Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Use wit-dep tool to automatically manage dependency vendoring#23

Merged
lukewagner merged 3 commits intomainfrom
use-depit
Apr 12, 2023
Merged

Use wit-dep tool to automatically manage dependency vendoring#23
lukewagner merged 3 commits intomainfrom
use-depit

Conversation

@lukewagner
Copy link
Member

This PR uses @rvolosatovs's depit tool to automate the currently-manual steps of copying the Wit documents from other WASI proposal repos. (Thanks Roman!) Over time we expect this tooling to evolve further, but this seems like a pretty useful and super-easy-to-adopt short-term improvement.

@Mossaka I think this also goes a long way to addressing the concerns about manual duplication in #20, so I think it resolves that issue too?

(The world.wit files are added by actually running depit before committing; everything else was in sync already.)

cc @pchickey @sunfishcode @peterhuene

Copy link
Contributor

@rvolosatovs rvolosatovs left a comment

Choose a reason for hiding this comment

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

LGTM, just note that since you depend on main branches of these dependencies, you'd need to both delete the wit/deps.lock and clear the cache to pull in any updates in 0.2.1
depit assumes URL contents to be immutable.
Cache is located at appropriate https://docs.rs/directories/5.0.0/directories/struct.ProjectDirs.html#method.cache_dir with depit as the project name, and it's also printed with RUST_LOG=debug
Perhaps something like bytecodealliance/wit-deps#15 could be useful to address this use case better

@lukewagner
Copy link
Member Author

Ah, good point. I had wondered whether it was better to use main or commit-hashes and chose main out of laziness, but maybe I should do commit hashes?

@rvolosatovs
Copy link
Contributor

Ah, good point. I had wondered whether it was better to use main or commit-hashes and chose main out of laziness, but maybe I should do commit hashes?

Laziness is a virtue, I really love this approach, it requires checking-in wit/deps (which is a minuscule price to pay, since that directory only contains WIT definitions), but allows for really simple update procedure and plays well with other tooling.
I've added depit update in bytecodealliance/wit-deps#16, which is available in version 0.2.2 https://github.com/rvolosatovs/depit/releases/tag/v0.2.2

@lukewagner
Copy link
Member Author

Awesome, thanks! I just updated the README.md to refer to depit update.

Copy link
Collaborator

@Mossaka Mossaka left a comment

Choose a reason for hiding this comment

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

lgtm!

@lukewagner lukewagner changed the title Use depit tool to automatically manage dependency vendoring Use wit-dep tool to automatically manage dependency vendoring Apr 12, 2023
@lukewagner lukewagner merged commit 2709cf2 into main Apr 12, 2023
@lukewagner lukewagner deleted the use-depit branch April 12, 2023 22:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants