-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swap the order of directories in --dir
#7301
Swap the order of directories in --dir
#7301
Conversation
This commit changes the `--dir` argument on the `wasmtime` CLI to be `HOST::GUEST` rather than `GUEST::HOST`. This matches Docker for example and is a little more consistent with only `--dir path` where the first argument is always treated as a host directory. In terms of breaking-ness the movement from `--mapdir` to `--dir` hasn't been released with Wasmtime 14 yet so my hope is that this can land on both `main` and Wasmtime 14.0.0 before it's released to avoid any breakage other than existing scripts migrating from `--mapdir` to `--dir`.
Matching docker makes sense to me too. As a historical note, the original syntax here wasn't something anyone thought about deeply, it was just something simple to get basic use cases working, that ended up sticking around. |
Is there a way this arg could be extended in future (in a backward-compatible way) to support an optional verbose form? E.g. I'm trying to think through how the delimiters/escaping would work, and I realised I don't understand how it works today — e.g. what happens if your path contains I ask this because these kinds of order-dependent syntaxes (Docker volume mounts, SSH port forwarding, etc.) have caused me seemingly endless confusion and suffering, and I'm not sure if I'm uniquely vulnerable to them or if this is something that lots of other people would like to be able to avoid as well. |
I personally agree with @jeffparsons, although it's a bit too late for Wasmtime 14/15 to change the syntax here that much. This at least makes things "no worse" on the understandability front hopefully. I've opened #7309 to continue discussion here now that this is merged, since I think there are still improvements to be had! |
This commit changes the
--dir
argument on thewasmtime
CLI to beHOST::GUEST
rather thanGUEST::HOST
. This matches Docker for example and is a little more consistent with only--dir path
where the first argument is always treated as a host directory.In terms of breaking-ness the movement from
--mapdir
to--dir
hasn't been released with Wasmtime 14 yet so my hope is that this can land on bothmain
and Wasmtime 14.0.0 before it's released to avoid any breakage other than existing scripts migrating from--mapdir
to--dir
.