Swap the order of directories in --dir#7301
Swap the order of directories in --dir#7301alexcrichton merged 1 commit intobytecodealliance:mainfrom
--dir#7301Conversation
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
--dirargument on thewasmtimeCLI to beHOST::GUESTrather thanGUEST::HOST. This matches Docker for example and is a little more consistent with only--dir pathwhere the first argument is always treated as a host directory.In terms of breaking-ness the movement from
--mapdirto--dirhasn't been released with Wasmtime 14 yet so my hope is that this can land on bothmainand Wasmtime 14.0.0 before it's released to avoid any breakage other than existing scripts migrating from--mapdirto--dir.