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

rebuild dependencies on rust update #278

Closed
allan-simon opened this issue Jul 28, 2014 · 4 comments
Closed

rebuild dependencies on rust update #278

allan-simon opened this issue Jul 28, 2014 · 4 comments

Comments

@allan-simon
Copy link

When I update rust nightly and i try to cargo build again I got these errors

src/xmpp/lib.rs:15:1: 15:18 error: found possibly newer version of crate `std` which `xml` depends on
src/xmpp/lib.rs:15 extern crate xml;
                   ^~~~~~~~~~~~~~~~~
src/xmpp/lib.rs:15:1: 15:18 note: perhaps this crate needs to be recompiled?
src/xmpp/lib.rs:15 extern crate xml;
                   ^~~~~~~~~~~~~~~~~
src/xmpp/lib.rs:15:18: 15:18 note: crate `std` path #1: /usr/lib/rust/rust-nightly/lib/rustlib/i686-unknown-linux-gnu/lib/libstd-4e7c5e5c.rlib
src/xmpp/lib.rs:15:18: 15:18 note: crate `std` path #2: /usr/lib/rust/rust-nightly/lib/rustlib/i686-unknown-linux-gnu/lib/libstd-4e7c5e5c.so
src/xmpp/lib.rs:15:18: 15:18 note: crate `xml` path #1: /home/allan/perso/rust-xmpp-server-stream/target/deps/libxml4e3e5018578ccea9.rlib
error: aborting due to previous error
Could not execute process `rustc src/xmpp/lib.rs --crate-name xmpp --crate-type lib -g -C metadata=rust-xmpp-server-stream:-:0.0.0:-:file:/home/allan/perso/rust-xmpp-server-stream -C extra-filename=59396aea2dc02d0a --out-dir /home/allan/perso/rust-xmpp-server-stream/target -L /home/allan/perso/rust-xmpp-server-stream/target -L /home/allan/perso/rust-xmpp-server-stream/target/deps` (status=101)

however the crate xml is provided as dependency, it would be great if cargo could detect that and rebuild dependencies on version change of rust (as otherwise we need to guess that we have to delete target directory, though I admit it's not a difficult guess )

@alexcrichton
Copy link
Member

Cargo does indeed detect when rust was updated, so I'm curious why you're running into this. Could you give some more information about your setup, steps to reproduce, and the version of cargo you're using?

@allan-simon
Copy link
Author

it's a bit late, but basically here are the steps

  1. I use cargo and rust-nightly from ubuntu's ppa
  2. built a first time this project https://github.com/allan-simon/rust-xmpp-server-stream and its dependencies using cargo build not later than 3 days ago (may be 2 days ago)
  3. updated my code a little (I assume it should not be of any importance but who knows), the dependencies haven't changed.
  4. upgraded today my version of rust (cargo was not updated)
  5. runned cargo build again => get that error

@alexcrichton
Copy link
Member

Ok, I've gone through that workflow many times recently and cargo has rebuilt when rustc updates. It may have been fixed in a version of cargo later on than you're using. I'm going to close this for now under that assumption, but feel free to reopen if you run into it again!

bors added a commit that referenced this issue Mar 18, 2019
Update toml requirement from 0.4.2 to 0.5.0

Updates the requirements on [toml](https://github.com/alexcrichton/toml-rs) to permit the latest version.
<details>
<summary>Release notes</summary>

*Sourced from [toml's releases](https://github.com/alexcrichton/toml-rs/releases).*

> ## Preserve order feature, minor fixes
> - Add `preserve_order` Cargo feature. This retains the order of map keys in `toml::Value`. ([#278](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/278))
> - Fix issue [#279](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/279) where some duplicate table headers were accepted. Added `Deserializer::set_allow_duplicate_after_longer_table` for anyone who wants to retain the old, broken behavior. ([#280](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/280))
> - Fix case sensitivity with T, Z, and E. ([#290](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/290))
> - Add `PartialEq` to `de::Error`. ([#292](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/292))
</details>
<details>
<summary>Commits</summary>

- [`dbdcc9c`](toml-rs/toml-rs@dbdcc9c) Merge pull request [#292](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/292) from omarabid/master
- [`fbc0557`](toml-rs/toml-rs@fbc0557) Add PartialEq to Toml::de
- [`4fb12b4`](toml-rs/toml-rs@4fb12b4) Merge pull request [#290](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/290) from ehuss/fix-case-sensitivity
- [`8fce90e`](toml-rs/toml-rs@8fce90e) Fix case sensitivity with T, Z, and E.
- [`56f9afb`](toml-rs/toml-rs@56f9afb) Merge pull request [#278](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/278) from Kerollmops/master
- [`d0977ab`](toml-rs/toml-rs@d0977ab) Merge pull request [#280](https://github-redirect.dependabot.com/alexcrichton/toml-rs/issues/280) from alexcrichton/fix-duplicate
- [`7ee1c1b`](toml-rs/toml-rs@7ee1c1b) Fix disallowing duplicate table headers
- [`ad5ea1d`](toml-rs/toml-rs@ad5ea1d) Update build urls
- [`600c6e5`](toml-rs/toml-rs@600c6e5) Tweak travis config
- [`0372ba6`](toml-rs/toml-rs@0372ba6) Update the serde test-suite map! macro
- Additional commits viewable in [compare view](toml-rs/toml-rs@0.4.2...0.5.0)
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
@nfriedly
Copy link

I know this is a super-old ticket, but I ran into a related issue today and came across this when searching for a solution. I eventually figured it out, but hopefully this saves someone else some time and frustration:

If you get the message

note: perhaps this crate needs to be recompiled?

The way you do that is by running cargo clean and then cargo build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants