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

Rollup of 11 pull requests #74468

Merged
merged 36 commits into from
Jul 18, 2020
Merged

Rollup of 11 pull requests #74468

merged 36 commits into from
Jul 18, 2020

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

matklad and others added 30 commits July 17, 2020 07:23
This commit refactors the initial implementation to fit into std and
makes some other changes:

- use MaybeUninit internally in SyncOnceCell
- correctly impl Drop for lazy::Once
- port Lazy::take from once_cell from: matklad/once_cell#100

Co-Authored-By: Paul Dicker <[email protected]>
A follow-up to rust-lang#74406, this commit merely removes the `shell: bash`
lines where they are explicitly added in favor of setting defaults for
*all* "run" steps.

Signed-off-by: Kristofer Rye <[email protected]>
This will render the src/ci/exec-with-shell.py script more or less
useless, but we're going to replace that by just using the system bash
instead.

Signed-off-by: Kristofer Rye <[email protected]>
Also, promote defaults.run.shell from inside only the primary jobs to
the top level.

The src/ci/exec-with-shell.py wrapper script was formerly used to change
out the shell mid-job by intercepting a CI_OVERRIDE_SHELL environment
variable.  Now, instead, we just set `bash` as the global default across
all jobs, and we also delete the exec-with-shell.py script.

Signed-off-by: Kristofer Rye <[email protected]>
This commit stops linting against `Box` in `extern "C" fn`s for the
`improper_ctypes_definitions` lint - boxes are documented to be
FFI-safe.

Signed-off-by: David Wood <[email protected]>
Always install when the build succeeds

Fixes rust-lang#74431

Signed-off-by: Marc-Antoine Perennou <[email protected]>
…crum

 Add lazy initialization primitives to std

Follow-up to rust-lang#68198

Current RFC: rust-lang/rfcs#2788

Rebased and fixed up a few of the dangling comments. Some notes carried over from the previous PR:

- [ ] Naming. I'm ok to just roll with the `Sync` prefix like `SyncLazy` for now, but [have a personal preference for `Atomic`](rust-lang/rfcs#2788 (comment)) like `AtomicLazy`.
- [x] [Poisoning](rust-lang/rfcs#2788 (comment)). It seems like there's [some regret around poisoning in other `std::sync` types that we might want to just avoid upfront for `std::lazy`, especially if that would align with a future `std::mutex` that doesn't poison](https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/parking_lot.3A.3AMutex.20in.20std/near/190331199). Personally, if we're adding these types to `std::lazy` instead of `std::sync`, I'd be on-board with not worrying about poisoning in `std::lazy`, and potentially deprecating `std::sync::Once` and `lazy_static` in favour of `std::lazy` down the track if it's possible, rather than attempting to replicate their behavior. cc @Amanieu @sfackler.
- [ ] [Consider making`SyncOnceCell::get` blocking](matklad/once_cell#92). There doesn't seem to be consensus in the linked PR on whether or not that's strictly better than the non-blocking variant.

In general, none of these seem to be really blocking an initial unstable merge, so we could possibly kick off a FCP if y'all are happy?

cc @matklad @pitdicker have I missed anything, or were there any other considerations that have come up since we last looked at this?
…sakis

Compare tagged/niche-filling layout and pick the best one

Finishes up rust-lang#71045, and so fixes rust-lang#63866.

cc @eddyb
r? @nikomatsakis (since @eddyb wrote the first commit)
…roalbini

ci: Set `shell: bash` as a default, remove duplicates

A follow-up to rust-lang#74406, this commit merely removes the `shell: bash` lines where they were added in favor of setting defaults for *all* "run" steps in the jobs that run the tests.

The changes in rust-lang#74406 were needed because of an upstream change to the `windows-2019` GitHub Actions image. Previously, the configuration worked fine without specifying `shell: bash`, but for some reason this broke with a new change that was deployed today. The preceding PR was a hotfix to get CI passing, but there was a slightly less duplicative way to specify the default shell for the jobs, which was to set the `defaults.run` option.

This change applies to the `pr`, `try`, `auto`, and `auto-fallible` jobs, which are derived from the YAML-anchor `base-ci-job`.  I did not apply these changes to the `master`, `try-success`, `try-failure`, `auto-success`, or `auto-failure` jobs because they have only a few steps.

cc/r? @Mark-Simulacrum
bootstrap.py: patch RPATH on NixOS to handle the new zlib dependency.

This is a stop-gap until rust-lang#74420 is resolved (assuming we'll patch beta to statically link zlib).

However, I've been meaning to rewrite the NixOS support we have in `bootstrap.py` for a while now, and had to in order to cleanly add zlib as a dependency (the second commit is a relatively small delta in functionality, compared to the first).

Previously, we would extract the `ld-linux.so` path from the output of `ldd /run/current-system/sw/bin/sh`, which assumes a lot. On top of that we didn't use any symlinks, which meant if the user ran  GC (`nix-collect-garbage`), e.g. after updating their system, their `stage0` binaries would suddenly be broken (i.e. referring to files that no longer exist).
We were also using `patchelf` directly, assuming it can be found in `$PATH` (which is not necessarily true).

My new approach relies on using `nix-build` to get the following "derivations" (packages, more or less):
* `stdenv.cc.bintools`, which has a `nix-support/dynamic-linker` file containing the path to `ld-linux.so`
  * reading this file is [the canonical way to run `patchelf --set-interpreter`](https://github.com/NixOS/nixpkgs/search?l=Nix&q=%22--set-interpreter+%24%28cat+%24NIX_CC%2Fnix-support%2Fdynamic-linker%29%22)
* `patchelf` (so that the user doesn't need to have it installed)
* `zlib`, for the `libz.so` dependency of `libLLVM-*.so` (until rust-lang#74420 is resolved, presumably)

This is closer to how software is built on Nix, but I've tried to keep it as simple as possible (and not add e.g. a `stage0.nix` file).
Symlinks to each of those dependencies are kept in `stage0/.nix-deps`, which prevents GC from invalidating `stage0` binaries.

r? @nagisa cc @Mark-Simulacrum @oli-obk @davidtwco
@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 18, 2020
@eddyb
Copy link
Member

eddyb commented Jul 18, 2020

Run src/ci/scripts/install-awscli.sh
Reading package lists...
Building dependency tree...
Reading state information...
Package python3-setuptools is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

@bors retry

@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 Jul 18, 2020
@bors
Copy link
Contributor

bors commented Jul 18, 2020

⌛ Testing commit cae9c50 with merge 658e2656d59953c2b380fcb1226c8c31d87158e9...

@bors
Copy link
Contributor

bors commented Jul 18, 2020

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 18, 2020
@eddyb
Copy link
Member

eddyb commented Jul 18, 2020

thread 'test_frequency::prop_frequency_indexed' panicked at '[quickcheck] TEST FAILED (runtime error). Arguments: (CsvData { data: [[[]], [[]], [[239, 187, 191]], [[]], [[]]] })
Error: "assertion failed: `(left == right)`\n  left: `[(\"(NULL)\", 4)]`,\n right: `[(\"(NULL)\", 3), (\"\\u{feff}\", 1)]`"', D:\a\rust\rust\src\libstd\macros.rs:13:23


failures:
    test_frequency::prop_frequency_indexed

This doesn't look spurious.

@eddyb
Copy link
Member

eddyb commented Jul 18, 2020

Wait, that's quickcheck, so it's possible it's a buggy test. cc @BurntSushi

@bors retry

@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 Jul 18, 2020
@bors
Copy link
Contributor

bors commented Jul 18, 2020

⌛ Testing commit cae9c50 with merge 7d31ffc...

@Manishearth
Copy link
Member Author

@eddyb yeah that's a known bug in the crate, I filed it earlier. FEFF causes problems

@alex
Copy link
Member

alex commented Jul 18, 2020

(BurntSushi/xsv#227 for the record)

@bors
Copy link
Contributor

bors commented Jul 18, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: Manishearth
Pushing 7d31ffc to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 18, 2020
@bors bors merged commit 7d31ffc into rust-lang:master Jul 18, 2020
@Manishearth Manishearth deleted the rollup-5nhvz80 branch July 19, 2020 14:01
@mati865
Copy link
Contributor

mati865 commented Jul 20, 2020

@Mark-Simulacrum
Copy link
Member

Identified as #74069 (Compare tagged/niche-filling layout and pick the best one), perf in #74592, revert at #74611

@nnethercote
Copy link
Contributor

Identified as #74069 (Compare tagged/niche-filling layout and pick the best one), perf in #74592, revert at #74611

Just to clarify: @Mark-Simulacrum and I are confident that #74069 was the only perf regression in this rollup.

@Mark-Simulacrum
Copy link
Member

This PR turned out to be performance-neutral. See results of investigation here #74716 (comment); the revert of #74069 (Compare tagged/niche-filling layout and pick the best one) is being undone in #74802.

@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup 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.