Add a script to vendor WIT files#8111
Conversation
This is a follow-up to bytecodealliance#7929 where it was concluded that we want to retain textual WIT files in this repository. Currently today we have no automated checks for vendoring and re-vendoring requires hand-editing. To help incrementally improve this situation this commit adds a script to do all the vendoring for us. This way CI can verify that everything is generated with respect to the output of this script.
|
|
||
| dst=crates/wasi/wit/deps | ||
|
|
||
| rm -rf $dst |
There was a problem hiding this comment.
Maybe check git diff --exit-code before this and exit the script before doing any permanent deletions if there are local, uncommitted changes? Just to be safe.
There was a problem hiding this comment.
Personally I'd prefer to leave that to CI because it makes editing a script like this hard to work with and git is otherwise pretty good about making sure things aren't overwritten.
| rm -rf $dst | ||
| mkdir -p $dst | ||
|
|
||
| repos="cli clocks filesystem http io random sockets" |
There was a problem hiding this comment.
Comment for this variable describing how to add new WASI repos/WITs to vendor, either here or at the top?
| mkdir -p $dst | ||
|
|
||
| repos="cli clocks filesystem http io random sockets" | ||
| tag=0.2.0 |
There was a problem hiding this comment.
And maybe the same for how to update tag/WASI version?
May make sense to put all the "config" variables at the top of the script so that folks can update them without having to read the whole script and learn the implementation just to eg add support for WASI-foo to the script.
This is a follow-up to #7929 where it was concluded that we want to retain textual WIT files in this repository. Currently today we have no automated checks for vendoring and re-vendoring requires hand-editing. To help incrementally improve this situation this commit adds a script to do all the vendoring for us. This way CI can verify that everything is generated with respect to the output of this script.