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

Wrong PackageId generation when using --manifest-path #497

Closed
dotdash opened this issue Sep 1, 2014 · 5 comments
Closed

Wrong PackageId generation when using --manifest-path #497

dotdash opened this issue Sep 1, 2014 · 5 comments

Comments

@dotdash
Copy link
Contributor

dotdash commented Sep 1, 2014

Using --manifest-path I get different PackageIds (and thus bogus rebuilds) depending on whether I specify just the directory or the full path including the Cargo.toml part.

Just the directory:

$ RUST_LOG=cargo cargo build --release --verbose --manifest-path src/sdl-demo/ |& grep ids
5:cargo::core::registry: getting packags; sources=1; ids=[sdl v0.3.4 (file:///home/bs/src/rust-sdl/src), sdl-demo v0.3.4 (file:///home/bs/src/rust-sdl/src)]
5:cargo::sources::path: getting packages; ids=[sdl v0.3.4 (file:///home/bs/src/rust-sdl/src), sdl-demo v0.3.4 (file:///home/bs/src/rust-sdl/src)]

Path incl. filename:

$ RUST_LOG=cargo cargo build --release --verbose --manifest-path src/sdl-demo/Cargo.toml |& grep ids 
5:cargo::core::registry: getting packags; sources=1; ids=[sdl-demo v0.3.4 (file:///home/bs/src/rust-sdl/src/sdl-demo), sdl v0.3.4 (file:///home/bs/src/rust-sdl/src/sdl-demo)]
5:cargo::sources::path: getting packages; ids=[sdl-demo v0.3.4 (file:///home/bs/src/rust-sdl/src/sdl-demo), sdl v0.3.4 (file:///home/bs/src/rust-sdl/src/sdl-demo)]

Notice how the sdl-demo part is only present when the filename is given.

I also wonder if the path for sdl v0.3.4 should really point to `src/sdl-demo´ instead of the sdl root, but that's a different issue.

SimonSapin added a commit to SimonSapin/servo that referenced this issue Sep 22, 2014
Currently, `mach build-cef` uses a completely separate target directory
than `mach build`, so everything gets built twice.

Now that we’ve upgraded Rust to a version that fixes
rust-lang/rust#16496,
we can make this symlink to share target directories.

"git" dependencies builds are shared as expected, but "path" dependecies
still get rebuilt for some reason that might be related to
rust-lang/cargo#497

@alexcrichton says this is unsupported behavior and we shouldn’t do it,
but it still is strictly better than what we have now as far as I can tell.
SimonSapin added a commit to SimonSapin/servo that referenced this issue Sep 22, 2014
Currently, `mach build-cef` uses a completely separate target directory
than `mach build`, so everything gets built twice.

Now that we’ve upgraded Rust to a version that fixes
rust-lang/rust#16496,
we can make this symlink to share target directories.

"git" dependencies builds are shared as expected, but "path" dependecies
still get rebuilt for some reason that might be related to
rust-lang/cargo#497

@alexcrichton says this is unsupported behavior and we shouldn’t do it,
but it still is strictly better than what we have now as far as I can tell.
metajack added a commit to metajack/servo that referenced this issue Jun 8, 2015
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.
@alexcrichton
Copy link
Member

At this point the package id generation I don't believe will change, but the symptom of this, #1694, I should have a fix for shortly.

metajack added a commit to metajack/servo that referenced this issue Jun 9, 2015
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.
bors-servo pushed a commit to servo/servo that referenced this issue Jun 9, 2015
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6306)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Jun 9, 2015
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6306)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Jun 9, 2015
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6306)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Jun 9, 2015
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6306)
<!-- Reviewable:end -->
metajack added a commit to metajack/servo that referenced this issue Jun 9, 2015
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.
metajack added a commit to metajack/servo that referenced this issue Jun 12, 2015
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.
bors-servo pushed a commit to servo/servo that referenced this issue Jun 12, 2015
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6306)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Jun 12, 2015
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6306)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Jun 15, 2015
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6306)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Jun 15, 2015
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6306)
<!-- Reviewable:end -->
@alexcrichton
Copy link
Member

I think this is also the cause of servo/servo#9794, which is unfortunately much more serious.

@alexcrichton
Copy link
Member

I believe this has since been fixed, so closing.

jrmuizel pushed a commit to jrmuizel/gecko-cinnabar that referenced this issue Jun 12, 2017
…ack:shared-target-dir); r=mbrubeck

This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.

Source-Repo: https://github.com/servo/servo
Source-Revision: d6263c9b6e969fde4c644034e684a39d68667ad9
@nagisa
Copy link
Member

nagisa commented Jun 6, 2019

This appear to be an outstanding bug still.

@nagisa
Copy link
Member

nagisa commented Jun 6, 2019

See rust-lang/rust#61553

gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Sep 30, 2019
…ack:shared-target-dir); r=mbrubeck

This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.

Source-Repo: https://github.com/servo/servo
Source-Revision: d6263c9b6e969fde4c644034e684a39d68667ad9

UltraBlame original commit: 42376672d55b8b2f7f08473d1ab24888896d0256
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…ack:shared-target-dir); r=mbrubeck

This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.

Source-Repo: https://github.com/servo/servo
Source-Revision: d6263c9b6e969fde4c644034e684a39d68667ad9

UltraBlame original commit: 42376672d55b8b2f7f08473d1ab24888896d0256
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…ack:shared-target-dir); r=mbrubeck

This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.

Source-Repo: https://github.com/servo/servo
Source-Revision: d6263c9b6e969fde4c644034e684a39d68667ad9

UltraBlame original commit: 42376672d55b8b2f7f08473d1ab24888896d0256
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