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

Switch to bootstrapping from 1.27 #50629

Merged
merged 4 commits into from
May 17, 2018
Merged

Conversation

Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented May 10, 2018

It's possible the Float trait could be removed from core, but I couldn't tell whether it was intended to be removed or not. @SimonSapin may be able to comment more here; we can presumably also do that in a follow up PR as this one is already quite large.

@rust-highfive
Copy link
Collaborator

warning Warning warning

  • These commits modify submodules.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 10, 2018
@@ -2,6 +2,8 @@
authors = ["The Rust Project Developers"]
name = "alloc"
version = "0.0.0"
autotests = false
autobenches = false
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is right but I'd like confirmation.

@@ -2,6 +2,8 @@
authors = ["The Rust Project Developers"]
name = "core"
version = "0.0.0"
autotests = false
autobenches = false
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As with alloc I'm not sure about this, but it felt right...

@@ -19,7 +19,7 @@

use mem;
use num::Float;
#[cfg(not(stage0))] use num::FpCategory;
use num::FpCategory;
use num::FpCategory as Fp;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels super awkward and I was confused about the original intent.

trait SliceExt {
type Item;

#[stable(feature = "core", since = "1.6.0")]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not quite sure how to interpret this -- these I think were removed in stage1+ anyway, but they are marked as stable...

@@ -246,12 +241,9 @@ macro_rules! vector_impl { ($([$f:ident, $($args:tt)*]),*) => { $($f!($($args)*)
#[path = "../stdsimd/coresimd/mod.rs"]
#[allow(missing_docs, missing_debug_implementations, dead_code, unused_imports)]
#[unstable(feature = "stdsimd", issue = "48556")]
#[cfg(not(stage0))] // allow changes to how stdsimd works in stage0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh these are actually intended to stay as we permanently, currently, don't want to compile stdsimd in stage (allows for us to tweak it more easily)

@@ -553,7 +552,6 @@ macro_rules! f32_core_methods { () => {

#[lang = "f32"]
#[cfg(not(test))]
#[cfg(not(stage0))]
impl f32 {
f32_core_methods!();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea is that the macro above would be inlined here but we can always do that in a follow-up

@alexcrichton
Copy link
Member

@bors: r+ all looks good to me, thanks @Mark-Simulacrum! We can continue to file follow-up cleanups for the remaining things

@bors
Copy link
Contributor

bors commented May 10, 2018

📌 Commit 4e77523 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 10, 2018
@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/18/61/4e0f977cfe063188d73622a91cab8b8b409b662f422303fc687f362d941f/awscli-1.15.18-py2.py3-none-any.whl (1.3MB)
    0% |▎                               | 10kB 7.4MB/s eta 0:00:01
    1% |▌                               | 20kB 1.7MB/s eta 0:00:01
    2% |▉                               | 30kB 2.0MB/s eta 0:00:01
    3% |█                               | 40kB 1.8MB/s eta 0:00:01
---
[00:06:44]     Checking tempdir v0.3.7
[00:06:44]     Checking rustdoc v0.0.0 (file:///checkout/src/librustdoc)
[00:06:51]     Checking rustdoc-tool v0.0.0 (file:///checkout/src/tools/rustdoc)
[00:06:51]     Finished release [optimized] target(s) in 10.35s
[00:06:51] thread 'main' panicked at 'no output generated for "librustdoc-tool-binary" "rmeta"', bootstrap/compile.rs:1113:21
[00:06:51] travis_fold:end:stage0-rustdoc

[00:06:51] travis_time:end:stage0-rustdoc:start=1525985185381973022,finish=1525985195751241078,duration=10369268056

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexcrichton
Copy link
Member

@bors: r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 10, 2018
@Mark-Simulacrum
Copy link
Member Author

I can't really tell exactly what the problem here is, I'll have to dig in deeper. A few other things of note:

Periodically, I get the error below. I think this happens any time I recompile without recompiling the rustc library. Logging shows that the librustc-...rmeta file is rejected due to metadata.

I am somewhat suspecting that a change to metadata encoding/decoding is causing this to occur for sysroot crates, but can't come up for a good reason why that would be the case. I don't immediately see anything in the changelog since last stable to rustc_metadata that could cause this...

I'll dig more into this tomorrow and over the weekend, but I have not come up with a good reason why this would happen.

    Checking rustdoc v0.0.0 (file:///home/mark/Build/rust/src/librustdoc)
     Running `/home/mark/Build/rust/build/bootstrap/debug/rustc --crate-name rustdoc librustdoc/lib.rs --error-format json --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C metadata=db2cc8d63ee60236 -C extra-filename=-db2cc8d63ee60236 --out-dir /home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps --extern tempdir=/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libtempdir-bbbd9a1d6520a8dc.rmeta --extern pulldown_cmark=/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libpulldown_cmark-aabc6d2d653f0cb7.rmeta`
rustc command: "/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0/bin/rustc" "--crate-name" "rustdoc" "librustdoc/lib.rs" "--crate-type" "lib" "--emit=dep-info,metadata" "-C" "opt-level=3" "-C" "metadata=db2cc8d63ee60236" "-C" "extra-filename=-db2cc8d63ee60236" "--out-dir" "/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps" "--target" "x86_64-unknown-linux-gnu" "-L" "dependency=/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps" "-L" "dependency=/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps" "--extern" "tempdir=/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libtempdir-bbbd9a1d6520a8dc.rmeta" "--extern" "pulldown_cmark=/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libpulldown_cmark-aabc6d2d653f0cb7.rmeta" "--cfg" "stage0" "--sysroot" "/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot" "-g" "-C" "debug-assertions=y" "-C" "codegen-units=16" "-C" "link-args=-Wl,-rpath,$ORIGIN/../lib" "--color=always" "-Dwarnings"
sysroot: "/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot"
libdir: "/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0/lib"
error[E0463]: can't find crate for `rustc`
  --> librustdoc/lib.rs:30:1
   |
30 | extern crate rustc;
   | ^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: Could not compile `rustdoc`.

Caused by:
  process didn't exit successfully: `/home/mark/Build/rust/build/bootstrap/debug/rustc --crate-name rustdoc librustdoc/lib.rs --error-format json --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C metadata=db2cc8d63ee60236 -C extra-filename=-db2cc8d63ee60236 --out-dir /home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps --extern tempdir=/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libtempdir-bbbd9a1d6520a8dc.rmeta --extern pulldown_cmark=/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libpulldown_cmark-aabc6d2d653f0cb7.rmeta` (exit code: 101)
command did not execute successfully: "/home/mark/Build/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-j" "16" "-v" "--release" "--manifest-path" "/home/mark/Build/rust/src/tools/rustdoc/Cargo.toml" "--message-format" "json"

src/Cargo.lock Outdated
@@ -1565,7 +1565,7 @@ dependencies = [
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended?

@kennytm
Copy link
Member

kennytm commented May 11, 2018

Regarding the title... I think you mean "Switch to bootstrapping from 1.27"? 😄

@Mark-Simulacrum Mark-Simulacrum changed the title Switch to bootstrapping from 1.26 Switch to bootstrapping from 1.27 May 11, 2018
@Mark-Simulacrum
Copy link
Member Author

Okay, I believe I've tracked down the problem -- caused by #49289, but I'm not entirely sure how to fix it. On stable 1.26, running rustc --crate-name foo foo/src/main.rs --emit=metadata will emit nothing. On beta 1.27, however, it does emit a libfoo.rmeta file. This is a problem in the Rust repository, as we have librustc and rustc-main both of which emit the same libfoo.rmeta file. This means that when linking the rmeta files into the sysroot, we only consider the latest created metadata in the deps Cargo directory (the rustc-main file), which leads to the "cannot find crate rustc" error I was seeing earlier.

This appears to have been an intentional change; #40109 wants the new behavior. I've filed rust-lang/cargo#5524 to track a warning being added to Cargo, and pushed up a commit that should fix it in this PR by renaming the rustc binary to rustc_binary.

The problem that was hit on CI is fixed in the latest pushed commit; I believe something changed in how Cargo reports crate names and renames - to _ so we were failing to detect rustdoc-tool-binary artifact that was generated.

@Mark-Simulacrum
Copy link
Member Author

This completed a basic test run locally so I'm going to go ahead an @bors r=alexcrichton

@bors
Copy link
Contributor

bors commented May 12, 2018

📌 Commit f9e3ed9 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 12, 2018
@Mark-Simulacrum
Copy link
Member Author

@bors p=1 -- I'd like to get the version bumped as soon as possible

@bors
Copy link
Contributor

bors commented May 13, 2018

🔒 Merge conflict

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 13, 2018
In rust-lang#49289, rustc was changed to emit metadata for binaries, which made
it so that the librustc.rmeta file created when compiling librustc was
overwritten by the rustc-main compilation. This commit renames the
rustc-main binary to avoid this problem.

rust-lang/cargo#5524 has also been filed to
see if Cargo can learn to warn on this situation instead of leaving it
for the user to debug.
@Mark-Simulacrum
Copy link
Member Author

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented May 17, 2018

📌 Commit a22af69 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 17, 2018
@bors
Copy link
Contributor

bors commented May 17, 2018

⌛ Testing commit a22af69 with merge 90463a6...

bors added a commit that referenced this pull request May 17, 2018
Switch to bootstrapping from 1.27

It's possible the Float trait could be removed from core, but I couldn't tell whether it was intended to be removed or not. @SimonSapin may be able to comment more here; we can presumably also do that in a follow up PR as this one is already quite large.
@bors
Copy link
Contributor

bors commented May 17, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 90463a6 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants