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

resolve: Block expansion of a derive container until all its derives are resolved #63867

Merged
merged 1 commit into from
Aug 29, 2019

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Aug 24, 2019

So, it turns out there's one more reason to block expansion of a #[derive] container until all the derives inside it are resolved, beside Copy (#63248).

The set of derive helper attributes registered by derives in the container also has to be known before the derives themselves are expanded, otherwise it may be too late (see #63468 (comment) and the #[stable_hasher]-related test failures in #63468).

So, we stop our attempts to unblock the container earlier, as soon as the Copy status is known, and just block until all its derives are resolved.
After all the derives are resolved we immediately go and process their helper attributes in the item, without delaying it until expansion of the individual derives.

Unblocks #63468
r? @matthewjasper (as a reviewer of #63248)
cc @c410-f3r

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 24, 2019
@petrochenkov
Copy link
Contributor Author

Crater found one regression from #63248 (#63628 (comment)), effect from this PR should be comparable.

@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Aug 25, 2019

📌 Commit ddf193d has been approved by matthewjasper

@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 Aug 25, 2019
@bors
Copy link
Contributor

bors commented Aug 26, 2019

⌛ Testing commit ddf193d with merge ede6512...

bors added a commit that referenced this pull request Aug 26, 2019
resolve: Block expansion of a derive container until all its derives are resolved

So, it turns out there's one more reason to block expansion of a `#[derive]` container until all the derives inside it are resolved, beside `Copy` (#63248).

The set of derive helper attributes registered by derives in the container also has to be known before the derives themselves are expanded, otherwise it may be too late (see #63468 (comment) and the `#[stable_hasher]`-related test failures in #63468).

So, we stop our attempts to unblock the container earlier, as soon as the `Copy` status is known, and just block until all its derives are resolved.
After all the derives are resolved we immediately go and process their helper attributes in the item, without delaying it until expansion of the individual derives.

Unblocks #63468
r? @matthewjasper (as a reviewer of #63248)
cc @c410-f3r
@bors
Copy link
Contributor

bors commented Aug 26, 2019

💔 Test failed - checks-azure

@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 Aug 26, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-aux of your PR failed (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.
2019-08-26T13:41:33.2100595Z 306 |         services: &BlobImageResources,
2019-08-26T13:41:33.2100661Z     |                    ^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn BlobImageResources`
2019-08-26T13:41:33.2100725Z 
2019-08-26T13:41:51.2543655Z    Compiling winit v0.16.2
2019-08-26T13:42:19.5339016Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:19.5346290Z    --> webrender/src/frame_builder.rs:111:37
2019-08-26T13:42:19.5350522Z     |
2019-08-26T13:42:19.5354787Z 111 |     #[cfg_attr(feature = "capture", serde(skip))] //TODO
2019-08-26T13:42:19.5362572Z     |
2019-08-26T13:42:19.5367128Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5367128Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5372073Z     = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:19.5374810Z 
2019-08-26T13:42:19.5379329Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:19.5404440Z     |
2019-08-26T13:42:19.5404440Z     |
2019-08-26T13:42:19.5404625Z 216 |     #[cfg_attr(any(feature = "capture", feature = "replay"), serde(skip))]
2019-08-26T13:42:19.5404925Z     |
2019-08-26T13:42:19.5405470Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5405470Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5405676Z     = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:19.5405782Z 
2019-08-26T13:42:19.5411643Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:19.5420254Z     |
2019-08-26T13:42:19.5420254Z     |
2019-08-26T13:42:19.5424669Z 336 |     #[cfg_attr(feature = "serde", serde(skip))]
2019-08-26T13:42:19.5433096Z     |
2019-08-26T13:42:19.5436823Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5436823Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5441515Z     = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:19.5444441Z 
2019-08-26T13:42:19.5500642Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:19.5502075Z     |
2019-08-26T13:42:19.5502075Z     |
2019-08-26T13:42:19.5502144Z 443 |     #[cfg_attr(feature = "serde", serde(skip))]
2019-08-26T13:42:19.5502510Z     |
2019-08-26T13:42:19.5502909Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5502909Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5503008Z     = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:19.5503248Z 
2019-08-26T13:42:19.5503315Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:19.5504121Z     |
2019-08-26T13:42:19.5504121Z     |
2019-08-26T13:42:19.5504372Z 447 |     #[cfg_attr(feature = "serde", serde(skip))]
2019-08-26T13:42:19.5504499Z     |
2019-08-26T13:42:19.5504735Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5504735Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5504824Z     = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:19.5504868Z 
2019-08-26T13:42:19.5544197Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:19.5553795Z    |
2019-08-26T13:42:19.5553795Z    |
2019-08-26T13:42:19.5557976Z 65 |     #[cfg_attr(feature = "capture", serde(skip))] //TODO
2019-08-26T13:42:19.5567921Z    |
2019-08-26T13:42:19.5573134Z    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5573134Z    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5576886Z    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:19.5580261Z 
2019-08-26T13:42:19.5613452Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:19.5614007Z      |
2019-08-26T13:42:19.5614007Z      |
2019-08-26T13:42:19.5614067Z 2157 |     #[cfg_attr(feature = "capture", serde(skip))]
2019-08-26T13:42:19.5614227Z      |
2019-08-26T13:42:19.5614523Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5614523Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5614609Z      = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:19.5614676Z 
2019-08-26T13:42:19.5614749Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:19.5615084Z      |
2019-08-26T13:42:19.5615084Z      |
2019-08-26T13:42:19.5615161Z 2219 |     #[cfg_attr(feature = "capture", serde(skip))] //TODO
2019-08-26T13:42:19.5615394Z      |
2019-08-26T13:42:19.5615657Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5615657Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5615765Z      = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:19.5615813Z 
2019-08-26T13:42:19.5770351Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:19.5781473Z    |
2019-08-26T13:42:19.5781473Z    |
2019-08-26T13:42:19.5786338Z 60 |     #[cfg_attr(feature = "replay", serde(default = "FrameId::first"))]
2019-08-26T13:42:19.5795941Z    |
2019-08-26T13:42:19.5800873Z    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5800873Z    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.5805759Z    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:19.5808404Z 
2019-08-26T13:42:19.5976158Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:19.5986186Z     |
2019-08-26T13:42:19.5986186Z     |
2019-08-26T13:42:19.5990648Z 496 |     #[cfg_attr(all(feature = "serde", any(feature = "capture", feature = "replay")), serde(skip))]
2019-08-26T13:42:19.5999240Z     |
2019-08-26T13:42:19.6004994Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.6004994Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.6009575Z     = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:19.6012625Z 
2019-08-26T13:42:19.6043205Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:19.6048077Z     --> webrender/src/tiling.rs:1202:62
2019-08-26T13:42:19.6053529Z      |
2019-08-26T13:42:19.6057661Z 1202 |     #[cfg_attr(any(feature = "capture", feature = "replay"), serde(default = "FrameProfileCounters::new", skip))]
2019-08-26T13:42:19.6066923Z      |
2019-08-26T13:42:19.6072289Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.6072289Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.6076838Z      = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:19.6079254Z 
2019-08-26T13:42:19.6138622Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:19.6139092Z     --> webrender/src/tiling.rs:1228:35
2019-08-26T13:42:19.6139783Z      |
2019-08-26T13:42:19.6139868Z 1228 |     #[cfg_attr(feature = "serde", serde(skip))]
2019-08-26T13:42:19.6140035Z      |
2019-08-26T13:42:19.6140425Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.6140425Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:19.6140542Z      = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:20.2244432Z warning: use of deprecated item 'try': use the `?` operator instead
2019-08-26T13:42:20.2249976Z    --> webrender/src/clip.rs:176:1
2019-08-26T13:42:20.2256365Z     |
2019-08-26T13:42:20.2261876Z 176 | / bitflags! {
---
2019-08-26T13:42:21.9654528Z     |
2019-08-26T13:42:21.9654672Z 713 |             let mut cbox: FT_BBox = mem::uninitialized();
2019-08-26T13:42:21.9654829Z     |                                     ^^^^^^^^^^^^^^^^^^
2019-08-26T13:42:21.9654963Z 
2019-08-26T13:42:35.8837508Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:35.8839300Z    --> webrender/src/frame_builder.rs:111:37
2019-08-26T13:42:35.8839688Z     |
2019-08-26T13:42:35.8839868Z 111 |     #[cfg_attr(feature = "capture", serde(skip))] //TODO
2019-08-26T13:42:35.8840244Z     |
2019-08-26T13:42:35.8840775Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.8840775Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.8840996Z     = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:35.8841156Z 
2019-08-26T13:42:35.8877149Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:35.8878551Z     |
2019-08-26T13:42:35.8878551Z     |
2019-08-26T13:42:35.8878795Z 216 |     #[cfg_attr(any(feature = "capture", feature = "replay"), serde(skip))]
2019-08-26T13:42:35.8879175Z     |
2019-08-26T13:42:35.8879677Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.8879677Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.8879925Z     = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:35.8880105Z 
2019-08-26T13:42:35.8923698Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:35.8924539Z     |
2019-08-26T13:42:35.8924539Z     |
2019-08-26T13:42:35.8924679Z 336 |     #[cfg_attr(feature = "serde", serde(skip))]
2019-08-26T13:42:35.8924963Z     |
2019-08-26T13:42:35.8925532Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.8925532Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.8925717Z     = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:35.8925830Z 
2019-08-26T13:42:35.8940428Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:35.8941703Z     |
2019-08-26T13:42:35.8941703Z     |
2019-08-26T13:42:35.8941841Z 443 |     #[cfg_attr(feature = "serde", serde(skip))]
2019-08-26T13:42:35.8942117Z     |
2019-08-26T13:42:35.8942495Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.8942495Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.8942698Z     = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:35.8942837Z 
2019-08-26T13:42:35.8947592Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:35.8948896Z     |
2019-08-26T13:42:35.8948896Z     |
2019-08-26T13:42:35.8949095Z 447 |     #[cfg_attr(feature = "serde", serde(skip))]
2019-08-26T13:42:35.8949432Z     |
2019-08-26T13:42:35.8949859Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.8949859Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.8950273Z     = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:35.8950417Z 
2019-08-26T13:42:35.9063528Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:35.9064480Z    |
2019-08-26T13:42:35.9064480Z    |
2019-08-26T13:42:35.9064620Z 65 |     #[cfg_attr(feature = "capture", serde(skip))] //TODO
2019-08-26T13:42:35.9064871Z    |
2019-08-26T13:42:35.9065266Z    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9065266Z    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9065438Z    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:35.9065543Z 
2019-08-26T13:42:35.9091460Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:35.9092935Z      |
2019-08-26T13:42:35.9092935Z      |
2019-08-26T13:42:35.9093091Z 2157 |     #[cfg_attr(feature = "capture", serde(skip))]
2019-08-26T13:42:35.9093656Z      |
2019-08-26T13:42:35.9094236Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9094236Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9094438Z      = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:35.9094586Z 
2019-08-26T13:42:35.9101502Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:35.9102588Z      |
2019-08-26T13:42:35.9102588Z      |
2019-08-26T13:42:35.9102891Z 2219 |     #[cfg_attr(feature = "capture", serde(skip))] //TODO
2019-08-26T13:42:35.9103420Z      |
2019-08-26T13:42:35.9104076Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9104076Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9104642Z      = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:35.9104780Z 
2019-08-26T13:42:35.9316447Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:35.9318271Z    |
2019-08-26T13:42:35.9318271Z    |
2019-08-26T13:42:35.9318506Z 60 |     #[cfg_attr(feature = "replay", serde(default = "FrameId::first"))]
2019-08-26T13:42:35.9318882Z    |
2019-08-26T13:42:35.9319430Z    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9319430Z    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9319697Z    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:35.9319858Z 
2019-08-26T13:42:35.9530161Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:35.9531273Z     |
2019-08-26T13:42:35.9531273Z     |
2019-08-26T13:42:35.9531694Z 496 |     #[cfg_attr(all(feature = "serde", any(feature = "capture", feature = "replay")), serde(skip))]
2019-08-26T13:42:35.9532448Z     |
2019-08-26T13:42:35.9533316Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9533316Z     = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9533813Z     = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:35.9534111Z 
2019-08-26T13:42:35.9601915Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:35.9602448Z     --> webrender/src/tiling.rs:1202:62
2019-08-26T13:42:35.9602816Z      |
2019-08-26T13:42:35.9602983Z 1202 |     #[cfg_attr(any(feature = "capture", feature = "replay"), serde(default = "FrameProfileCounters::new", skip))]
2019-08-26T13:42:35.9603579Z      |
2019-08-26T13:42:35.9603993Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9603993Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9604243Z      = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:35.9604683Z 
2019-08-26T13:42:35.9611061Z error[E0658]: the attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future
2019-08-26T13:42:35.9611684Z     --> webrender/src/tiling.rs:1228:35
2019-08-26T13:42:35.9611747Z      |
2019-08-26T13:42:35.9611826Z 1228 |     #[cfg_attr(feature = "serde", serde(skip))]
2019-08-26T13:42:35.9611993Z      |
2019-08-26T13:42:35.9612271Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9612271Z      = note: for more information, see https://github.com/rust-lang/rust/issues/29642
2019-08-26T13:42:35.9612372Z      = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
2019-08-26T13:42:36.5937293Z warning: use of deprecated item 'try': use the `?` operator instead
2019-08-26T13:42:36.5937670Z    --> webrender/src/clip.rs:176:1
2019-08-26T13:42:36.5938791Z     |
2019-08-26T13:42:36.5938880Z 176 | / bitflags! {
---
2019-08-26T13:42:38.4490856Z 
2019-08-26T13:42:44.9755895Z error: aborting due to 12 previous errors
2019-08-26T13:42:44.9756058Z 
2019-08-26T13:42:44.9757311Z For more information about this error, try `rustc --explain E0658`.
2019-08-26T13:42:45.1965990Z error: Could not compile `webrender`.
2019-08-26T13:43:02.2096952Z error: aborting due to 12 previous errors
2019-08-26T13:43:02.2097902Z 
2019-08-26T13:43:02.2099024Z For more information about this error, try `rustc --explain E0658`.
2019-08-26T13:43:02.2099024Z For more information about this error, try `rustc --explain E0658`.
2019-08-26T13:43:02.4469629Z error: Could not compile `webrender`.
2019-08-26T13:43:02.4470638Z To learn more, run the command again with --verbose.
2019-08-26T13:43:02.4496799Z thread 'main' panicked at 'tests failed for https://github.com/servo/webrender', src/tools/cargotest/main.rs:86:9
2019-08-26T13:43:02.4497392Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-08-26T13:43:02.4497518Z 
2019-08-26T13:43:02.4497518Z 
2019-08-26T13:43:02.4497557Z 
2019-08-26T13:43:02.4498118Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/cargotest" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "/checkout/obj/build/ct"
2019-08-26T13:43:02.4498275Z expected success, got: exit code: 101
2019-08-26T13:43:02.4498323Z 
2019-08-26T13:43:02.4498374Z 
2019-08-26T13:43:02.4507400Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/test/run-fail/pretty src/test/run-pass-valgrind/pretty src/tools/cargo src/tools/cargotest
2019-08-26T13:43:02.4507568Z Build completed unsuccessfully in 2:06:56
2019-08-26T13:43:02.4556894Z Makefile:50: recipe for target 'check-aux' failed
2019-08-26T13:43:02.4557669Z make: *** [check-aux] Error 1
2019-08-26T13:43:02.4567592Z   local time: Mon Aug 26 13:43:02 UTC 2019
2019-08-26T13:43:02.5023206Z   network time: Mon, 26 Aug 2019 13:43:02 GMT
2019-08-26T13:43:02.5023410Z == end clock drift check ==
2019-08-26T13:43:02.5023410Z == end clock drift check ==
2019-08-26T13:43:04.0877747Z ##[error]Bash exited with code '2'.
2019-08-26T13:43:04.0923843Z ##[section]Starting: Upload CPU usage statistics
2019-08-26T13:43:04.0937893Z ==============================================================================
2019-08-26T13:43:04.0938012Z Task         : Bash
2019-08-26T13:43:04.0938100Z Description  : Run a Bash script on macOS, Linux, or Windows

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)

@petrochenkov
Copy link
Contributor Author

The job x86_64-gnu-aux of your PR failed (raw log).

Ah, right, MarkDeriveHelpers needs to run after the item is cfg-expanded.

@petrochenkov petrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 26, 2019
…are resolved

Also mark derive helpers as known as a part of the derive container's expansion instead of expansion of the derives themselves which may happen too late.
@petrochenkov
Copy link
Contributor Author

I've moved the helper attribute marking to a slightly later point.

@petrochenkov petrochenkov added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 26, 2019
@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Aug 28, 2019

📌 Commit ec45b87 has been approved by matthewjasper

@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 Aug 28, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 29, 2019
resolve: Block expansion of a derive container until all its derives are resolved

So, it turns out there's one more reason to block expansion of a `#[derive]` container until all the derives inside it are resolved, beside `Copy` (rust-lang#63248).

The set of derive helper attributes registered by derives in the container also has to be known before the derives themselves are expanded, otherwise it may be too late (see rust-lang#63468 (comment) and the `#[stable_hasher]`-related test failures in rust-lang#63468).

So, we stop our attempts to unblock the container earlier, as soon as the `Copy` status is known, and just block until all its derives are resolved.
After all the derives are resolved we immediately go and process their helper attributes in the item, without delaying it until expansion of the individual derives.

Unblocks rust-lang#63468
r? @matthewjasper (as a reviewer of rust-lang#63248)
cc @c410-f3r
bors added a commit that referenced this pull request Aug 29, 2019
Rollup of 7 pull requests

Successful merges:

 - #63867 (resolve: Block expansion of a derive container until all its derives are resolved)
 - #63880 (Validation: check raw wide pointer metadata)
 - #63914 (ty: use Align for ReprOptions pack and align.)
 - #63941 (rustbuild: allow disabling deny(warnings) for bootstrap)
 - #63949 (Fix build src/libtest)
 - #63984 (Update rust-installer to limit memory use)
 - #63992 (Small improvement for Ord implementation of integers)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Aug 29, 2019

⌛ Testing commit ec45b87 with merge 7445622...

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.

4 participants