You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was proposed as --print to print the new version number alone on a new line in #7.
Before starting to add workspace support this seemed like a good idea. Unfortunately, this very simple output doesn't allow for multiple packages to be updated, since there is no way to distinguish them.
Surveying what other cargo tools do, the biggest one folks seem to wrap is cargo_metadata which by default outputs JSON. With that in mind, perhaps we need a few output types:
human - This output type will be default, it will likely be more verbose and include symbols to look nicer.
simple - This output type is basically a whitespace separated vector, $crate_name $old_version $new_version. This should be easily pulled apart in bash/powershell scripts used in CI systems.
json - This output type is to copy cargo_metadata, would be something like:
ndjson - This output type would basically be the above but instead of wrapping in an array, new line delimit the JSON.
This could be done as a --output $TYPE option.
We should probably try to use the same setup for JSON that cargo_metadata is using, so I don't have multiple JSON deserializers in the binary. There are already 2 TOML serializers and deserializers because we need to retain formatting, no reason to also bloat for JSON.
The text was updated successfully, but these errors were encountered:
I suggest always printing the version exactly as in Cargo.toml. For workspaces, the -p package could be used to specify exact path, otherwise the nearest Cargo.toml should be used (that's Cargo's behavior).
This was proposed as
--print
to print the new version number alone on a new line in #7.Before starting to add workspace support this seemed like a good idea. Unfortunately, this very simple output doesn't allow for multiple packages to be updated, since there is no way to distinguish them.
Surveying what other cargo tools do, the biggest one folks seem to wrap is
cargo_metadata
which by default outputs JSON. With that in mind, perhaps we need a few output types:human
- This output type will be default, it will likely be more verbose and include symbols to look nicer.simple
- This output type is basically a whitespace separated vector,$crate_name $old_version $new_version
. This should be easily pulled apart in bash/powershell scripts used in CI systems.json
- This output type is to copycargo_metadata
, would be something like:ndjson
- This output type would basically be the above but instead of wrapping in an array, new line delimit the JSON.This could be done as a
--output $TYPE
option.We should probably try to use the same setup for JSON that
cargo_metadata
is using, so I don't have multiple JSON deserializers in the binary. There are already 2 TOML serializers and deserializers because we need to retain formatting, no reason to also bloat for JSON.The text was updated successfully, but these errors were encountered: