The format is based on Keep a Changelog.
- Support for TOML 1.1
- Report error when failing to update lockfile
- Dependency updates
- Dependency updates
- (upgrade) Don't update git dependencies that were excluded
- Add logging
- Add logging
- Add
-nas a short for--dry-run
- (upgrade) Provide more context on registry errors
- (upgrade) Don't silence network errors
- Changed compilation settings
- (upgrade) Remove of
--offlineas we don't have local caching for sparse registry
- (upgrade) Switched from git to sparse registry for faster runs
- Dependency update
- Stylize help output
- Fix building on nightlies
- (rm) Removed in favor of
cargo remove - (upgrade)
--recursive <true|false>now defaults to the same as--compatible <true|false>
- MSRV-aware setting of version requirements with
--ignore-rust-versionand--rust-version <VER>flags- Resolver still won't be MSRV aware
- Lack of transparency in filtering out incompatible rust-versions (no warnings, no details in errors)
- Don't upgrade indirect dependencies with
--incompatible allow --compatible deny
upgrade
--locked --dry-runshould error if there are changes
upgrade
- In summary lists, coalece long lists
- Reduce padding, consuming precious vertical space on large workspaces
- Move unchanged requirements out of table unless
--verbose, moving the existing--verboseto--verbose --verbose.
upgrade
- Report dependency tables to
stdout, instead ofstderr
- Dependencies updated
- Improved build times
upgrade
- Ensure precise version setting runs
- Remove error blocking precise version setting
set-version
- Modify
workspace.package.versionand all dependents, when needed
set-version
- Update versions in
workspace.dependenciesin virtual workspaces - Be more consistent with rest of cargo in output
- Polished help output
upgrade
- Upgrade
workspace.dependencies(new in Rust 1.64)
upgrade
- Changed
--compatible,--incompatible, and--pinnedfrom acceptingtrue|falsetoallow|ignore(with aliases for compatibility- While we are still working out how we want to express these options, this at least removes the confusion over
--compatible falselooking like it is the same as--incompatible.
- While we are still working out how we want to express these options, this at least removes the confusion over
This release is another step in our effort to find the appropriate cargo upgrade workflow for merging into cargo.
This new iteration is modeled on the idea "if we started from scratch, what
would cargo update look like?". Besides getting us to think outside
the box, I hope that we can deprecate cargo update and replace it with cargo upgrade (caution: this has not been passed by the cargo team). We need
runtime with the proposed behavior with feedback to see how well the idea works
in theory and if it justifies the ecosystem churn of deprecating cargo update.
More concretely, the approach taken in this release is a cargo update-like
command that implicitly modifies Cargo.lock.
To this end
cargo upgradenow works on the whole workspace exclusively- This also resolves confusion over
--package,--exclude, and the positionalPKGIDargument - This also removes any UI barriers for supporting workspace inheritance coming in 1.64
- This also resolves confusion over
cargo upgrade -p serde@1.0.100will act as ifcargo update -p serde --precise 1.0.100was performed- Compatible versions are upgraded by default
- Pass
--incompatibleor--pinnedto upgrade to incompatible versions - Disable the default with
--compatible false - See this PR for context on the trade offs
- Pass
A side benefit of this approach is that users will get an approximation of
minimal-version resolution so long as they stay within cargo add and cargo upgrade and commit their Cargo.lock file.
Please include in any feedback:
- An evaluation of current behavior that takes into account the exiting "care abouts" or any additional we don't have listed yet
- An evaluation of how existing or new alternatives would better fit the full set of care abouts
upgrade
- Compatible versions are upgraded by default, with opt-out via
--compatible false - Pinned dependencies will be upgraded to compatible versions when
--compatible true, reserving--pinnedfor incompatible upgrades - Incompatible versions require opting in with
-i/--incompatible - When a version requirement is fully specified, the lock version will modified to use that version
- Exclusively operate on the workspace
- The positional argument for selecting dependencies to upgrade has moved to
--package <NAME> --packageand--excludenow take crate names rather than dependencies names (matters when dependencies are renamed)
upgrade
--recursive <true|false>for controlling how the lockfile is updated- Update git dependencies
upgrade
- Treat
3.2.xas pinned - Update lockfile in offline mode
- Don't touch the lockfile in dry-run
- Prefer preserving the original version requirement over compatible version upgrades (in cases where we don't know how to preserve the format)
upgrade
- Hide "note" column when unused
- Summarize uninteresting rows by default
upgrade
- Provide table view of upgrades, like
cargo outdated, to raise visibility for why a change isn't made - Fix where we didn't respect
--offline - Fix
--to-lockfileto update non-registry version requirements - Update lockfile for upgraded requirements
- Update
--helpto be consistent withcargo add
rm
- Update
--helpto be consistent withcargo add
upgrade
- Only fail on bad lockfile if
--to-lockfileis set
rm
- Don't duplicate error messages
upgrade
- Note the
--pinnedflag when pinned dependencies are skipped
add
- Provide a failing command to tell people how to get it
- Many programmatic APIs changed
cargo addremove in favor of the version included with cargo 1.62.0cargo upgradeskips pinned dependencies by default, run with--pinnedto do them allcargo upgrade --skip-compatibleis now default, run with--to-lockfileto upgrade allcargo upgradenow accepts dependency keys rather than crate namescargo upgradenow preserves version req precisioncargo upgrade --allow-prereleasewas removed to matchcargo add
All
- Align console messages
- Allow using
--manifest-pathwith--pkgid - Allow relative paths with
--manifest-path
upgrade
- Positional arguments are now dependency keys, allowing forcing of renamed dependencies to upgrade
- Make compatible upgrades and precision preservation work together
- Cleaned up output
- Preserve user formatting of dependencies
- Don't confuse dependencies
upgrade
- Always preserve version req precision
- With
--verbose, see why dependencies didn't upgrade - Error if upgrades possible with
--locked - Allow multiple occurrences of
--pkgid
rm
- Add
--targetflag - Add
--dry-runflag
set-version
- Don't overwrite updated dependencies with stale data when modifying multiple packages
In large part, this release is a test-bed for changes proposed as part of the
path to merging cargo-add into cargo. See
internals
for more background on the changes.
- Many programmatic APIs changed
- Feature flag
vendored-libgit2is activated by default
cargo-add
- Removed
--upgrade <policy> - Removed
--sort - Removed
--allow-prerelease - Removed
cargo add <git-url>, requiringcargo add --git <git-url> - Removed
--path <path>in favor ofcargo add <path> - Removed
--vers <version-req>in favor ofcargo add <name>@<version-req> --gitsupport is now feature gated as we work out how to expose it
cargo-add
- Lists available features
- Warn when adding non-existent features
- git
--tagand--revsupport --default-featuresflag for when updating an existing entry--no-optionalflag for when updating an existing entry- Allow
,to separate--features - Added
-Fshort flag for--features cargo add serde +derivefeature activation--dry-runsupport
General
- TOML 1.0 compliant parser
- Use stderr for user messages
- Improve detection for enabling colored output
- Handle empty cargo config
sourcetable
cargo-add
- Allow
--registrywithname@versionand path dependencies - Don't panic on
--target=(ie empty target) - Cleaned up "Adding" message
- Improve overwrite behavior (re-adding the same dependency)
- Allow using both
--manifest-pathand--package - Remove invalid dependency activation
- When adding an existing dependency to another table, reuse the existing source information (e.g. version requirement)
cargo-rm
- Don't create empty feature tables
- Remove dep activation when no longer optional
cargo-upgrade
- Preserve version requirement precision (behind a feature flag)
cargo-set-version
- Allow
--metadatato override version metadata - Improve dependent detection
Many programmatic APIs changed
cargo-add
- Dependency paths are now relative to current working directory, rather than affect crate root (#497)
- Sane defaults when adding a dependency from within the workspace (#504)
- New
vendored-opensslcrate feature (#447) - New
vendored-libgit2crate feature (#488) - Support for dotted keys in TOML (#491)
cargo-set-version
- New command to bump crate versions (#482)
- Automatically update all workspace dependents (#506)
cargo-upgrade
- Add
--exclude(#446)
- Fixed various bugs when interacting with the registry (e.g. #433, #484)
- Read config files with extensions as added with Rust 1.39 (#439)
- rustsec
- Removed unmaintained
dirsdependency (#440) - Remove dependency on old
hyperv0.13 (#431)
- Removed unmaintained
- Respect
--quietwhen updating the index (#462) - Lookup pkg id's relative to
--manifest-pathrather than current working directory (#505)
cargo-add
- Look up versions after updating the index (#483)
- Allow optional build dependencies (#494)
- Dependency paths are now relative to current working directory, rather than affect crate root (#497)
- Prevent
cargo add .from working (#501) - Sane defaults when adding a dependency from within the workspace (#504)
cargo-upgrade
- Update optional dependencies with
--to-lockfile(#427) - Actually report upgrade when
packagekey is used (#409)
cargo-rm
- Remove references among features to crate being removed (#500)
New features:
- Keep dependencies in sorted order if they were already sorted (#421 by @joshtriplett)
Fixes:
- Fix for cargo-nightly (#413 by @meltinglava)
- Normalise windows-style paths (#403 by @Michael-F-Bryan)
- Fix for non-lowercase crate names (#398)
New features:
- You can now specify a branch for git dependencies (#379 by @struktured)
- A long awaited feature to support
-pflag in the workspace is finally there 🎉 ` (#390 by @pwoolcoc)
Fixes:
--allflag is now deprecated in favor of--workspaceto match cargo (#392 by @pwoolcoc)
This is a minor release that updates the dependencies so that it's easier to use cargo-edit as a library.
Fixes:
- Adding a dependency that was renamed previously (#351 by @stiiifff)
Full changes: https://github.com/killercup/cargo-edit/compare/v0.4.2...v0.5.0
New features:
-
Add a
--skip-compatibleflag to cargo upgrade (#360)This flag will make cargo upgrade ignore upgrades where the old version is semver compatible with the new one. This is useful in cases where you don't want to churn the
Cargo.tomlfiles in the whole project knowing that the lockfile is already forcing the versions to be up to date.
Other:
- Bunch of internal clean-ups
New features:
- new cool feature: try passing
--to-lockfiletocargo upgrade(#337 by @tofay) - alternative registries support (#336 by @tofay)
cargo addnow supports--renameflag (#345)
Bug fixes:
cargo upgradeworks correctly with renamed dependencies (#342 by @stiiifff)cargo-{add, upgrade}now works with ssh auth for git (#334)cargo upgradedoes not downgrade prerelease dependencies (#348)
Major changes:
cargo addandcargo upgradenow supports--offlinemode and minimizes network queries (#317 by @DCjanus)cargo addnow accepts--sortflag to sort dependencies (#322 by @thiagoarrais)
- Update dependencies to most recent versions
New features:
- add multiple local packages (#295)
- support for
--no-default-featuresflag (#290) - rm multiple crates (#289)
Bug fixes:
- strip semver metadata on versions (#304)
Update dependencies, which fixes issues with OpenSSL 1.1.1 (#245)
A lot has happened since the last stable release!
The most important feature sure is that we try to not mess up your Cargo.toml files anymore!
While we are not 100% there yet, cargo add foo should give you much nicer edits now.
Other cool features:
- Add proxy support via env variable (#179)
- Allow simultaneous specification of both version and path (thanks, @dherman!)
- Add specific error for a missing crate (thanks, @bjgill!)
cargo-upgradenow supports--precise,--dry-run, and has nicer output