Skip to content
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

cargo upgrade or cargo check-updates - upgrade dependencies to the latest versions, regardless of existing version constraints #74

Closed
887 opened this issue Feb 7, 2016 · 3 comments

Comments

@887
Copy link

887 commented Feb 7, 2016

Similar to this, only for cargo:
https://github.com/tjunnone/npm-check-updates

Maybe this feature already exists but i couldn't find it, and nobody at the last meet knew about it.

@killercup
Copy link
Owner

Sounds like an automated cargo outdated + editing Cargo.toml.

Could also work as a fork of cargo update.

Am 07.02.2016 um 11:23 schrieb 887 notifications@github.com:

Similar to this, only for cargo:
https://githubcom/tjunnone/npm-check-updates

Maybe this feature already exists but i couldn't find it, and nobody at the last meet knew about it


Reply to this email directly or view it on GitHub.

@robinst
Copy link

robinst commented Oct 12, 2016

For anyone landing here from a search, cargo-outdated (install via cargo install cargo-outdated) already works for printing the versions: cargo outdated

bjgill added a commit to bjgill/cargo-edit that referenced this issue Jun 18, 2017
This adds the specified dependency/ies only if they are already present. Thus, it acts like a 'cargo upgrade' (see killercup#74)
bjgill added a commit to bjgill/cargo-edit that referenced this issue Jun 26, 2017
Preliminary work to expose the APIs needed for a future `cargo upgrade`
(killercup#74)
@bjgill
Copy link
Collaborator

bjgill commented Jun 28, 2017

Given that cargo-list is on the way to deprecation, I think the correct way to do this would be to use cargo as a library to parse the manifest. We could then plug this into the existing cargo add --update-only to get something that was a good approximation to a proper cargo upgrade.

There'd then be additional work to properly support workspaces, implement some sort of 'check mode' and handle all the possible variations of dependency (dev/build/optional/etc.).

@killercup - I'd hope to get an MVP done within the next fortnight. Would that work with your plan for v0.2?

@killercup killercup added this to backlog in cargo-worlddomination Jul 1, 2017
@bjgill bjgill self-assigned this Jul 3, 2017
bjgill added a commit to bjgill/cargo-edit that referenced this issue Jul 19, 2017
This adds `cargo upgrade` as a more fully featured replacement for
`cargo add --update-only`.

Usage:

```plain
Upgrade all dependencies in a manifest file to the latest version.

Usage:
    cargo upgrade [--dependency <dep>...] [--manifest-path <path>]
    cargo upgrade (-h | --help)
    cargo upgrade (-V | --version)

Options:
    -d --dependency <dep>       Specific dependency to upgrade. If this
option is used, only the
                                specified dependencies will be upgraded.
    --manifest-path <path>      Path to the manifest to upgrade.
    -h --help                   Show this help page.
    -V --version                Show version.

Dev, build, and all target dependencies will also be upgraded. Only
dependencies from crates.io are
supported. Git/path dependencies will be ignored.
```

Resolves killercup#74.
bors bot added a commit that referenced this issue Jul 19, 2017
138: New command: cargo-upgrade r=bjgill

This adds `cargo upgrade` as a more fully featured replacement for `cargo add --update-only`. 

Usage:

```plain
Upgrade all dependencies in a manifest file to the latest version.

Usage:
    cargo upgrade [--dependency <dep>...] [--manifest-path <path>]
    cargo upgrade (-h | --help)
    cargo upgrade (-V | --version)

Options:
    -d --dependency <dep>       Specific dependency to upgrade. If this option is used, only the
                                specified dependencies will be upgraded.
    --manifest-path <path>      Path to the manifest to upgrade.
    -h --help                   Show this help page.
    -V --version                Show version.

Dev, build, and all target dependencies will also be upgraded. Only dependencies from crates.io are
supported. Git/path dependencies will be ignored.
```

Resolves #74.

Next steps (beyond this PR; probably not in v0.2) will be:

* Workspace support
* interactive 'check mode'
* Use `cargo` to parse the manifests

(I'll squash prior to merging)
bors bot added a commit that referenced this issue Jul 19, 2017
138: New command: cargo-upgrade r=bjgill

This adds `cargo upgrade` as a more fully featured replacement for `cargo add --update-only`. 

Usage:

```plain
Upgrade all dependencies in a manifest file to the latest version.

Usage:
    cargo upgrade [--dependency <dep>...] [--manifest-path <path>]
    cargo upgrade (-h | --help)
    cargo upgrade (-V | --version)

Options:
    -d --dependency <dep>       Specific dependency to upgrade. If this option is used, only the
                                specified dependencies will be upgraded.
    --manifest-path <path>      Path to the manifest to upgrade.
    -h --help                   Show this help page.
    -V --version                Show version.

Dev, build, and all target dependencies will also be upgraded. Only dependencies from crates.io are
supported. Git/path dependencies will be ignored.
```

Resolves #74.

Next steps (beyond this PR; probably not in v0.2) will be:

* Workspace support
* interactive 'check mode'
* Use `cargo` to parse the manifests

(I'll squash prior to merging)
@bors bors bot closed this as completed in #138 Jul 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants