shuttle
shuttle copied to clipboard
check_lib_version can panic on deploy without informative message
The current method uses indexing to pull out the version of Cargo.toml
. This can panic if the key is not present:
https://github.com/shuttle-hq/shuttle/blob/d4af3674de5f77477eda7febbbd7935add7f1672/cargo-shuttle/src/lib.rs#L257
If the Cargo.toml
does not have a dependencies table or shuttle-service is not present then this expression panics. It would better to catch these and produce a readable error. Can use Document::get
to do that.
The second question is whether shuttle-service = "0.4.0"
is an error because there are no features specified. While adding this change should shuttle suggest that a feature needs to present?
I am happy to add this change ;)
I think shuttle-service = "0.4.0"
should be correct, because that's how I think a user implemented service would specify the shuttle_service dependency.
@kaleidawave sure, you can make the change :smile:
We removed this check in 0.12, so closing this.