Skip to content

Conversation

@ninjasource
Copy link

@ninjasource ninjasource commented Nov 12, 2019

#65419 -- Attempting to run an async fn after completion mentions generators
Not yet ready for review - work in progress
Just need to run the tests on a proper build server

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @zackmdavis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

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

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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-11-12T02:22:21.0502107Z ##[command]git remote add origin https://github.com/rust-lang/rust 2019-11-12T02:22:21.0718543Z ##[command]git config gc.auto 0 2019-11-12T02:22:21.0806225Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader 2019-11-12T02:22:21.0863139Z ##[command]git config --get-all http.proxy 2019-11-12T02:22:21.1009080Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66321/merge:refs/remotes/pull/66321/merge --- 2019-11-12T02:28:48.3816682Z Compiling serde_json v1.0.40 2019-11-12T02:28:50.4411822Z Compiling tidy v0.1.0 (/checkout/src/tools/tidy) 2019-11-12T02:29:02.2765116Z Finished release [optimized] target(s) in 1m 32s 2019-11-12T02:29:02.2839485Z tidy check 2019-11-12T02:29:02.9052583Z tidy error: /checkout/src/librustc_mir/transform/generator.rs:1093: line longer than 100 chars 2019-11-12T02:29:02.9097390Z tidy error: /checkout/src/librustc_mir/transform/const_prop.rs:92: TODO is deprecated; use FIXME 2019-11-12T02:29:03.2062835Z tidy error: /checkout/src/librustc/mir/mod.rs:9: line longer than 100 chars 2019-11-12T02:29:03.2062968Z tidy error: /checkout/src/librustc/mir/mod.rs:9: TODO is deprecated; use FIXME 2019-11-12T02:29:03.2082001Z tidy error: /checkout/src/librustc/mir/mod.rs:3024: TODO is deprecated; use FIXME 2019-11-12T02:29:05.1586589Z Found 485 error codes 2019-11-12T02:29:05.1586731Z Found 0 error codes with no tests 2019-11-12T02:29:05.1586781Z Done! 2019-11-12T02:29:05.1586829Z some tidy checks failed 2019-11-12T02:29:05.1586829Z some tidy checks failed 2019-11-12T02:29:05.1586882Z 2019-11-12T02:29:05.1586912Z 2019-11-12T02:29:05.1587846Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" 2019-11-12T02:29:05.1588020Z 2019-11-12T02:29:05.1588048Z 2019-11-12T02:29:05.1588103Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy 2019-11-12T02:29:05.1588253Z Build completed unsuccessfully in 0:01:36 2019-11-12T02:29:05.1588253Z Build completed unsuccessfully in 0:01:36 2019-11-12T02:29:05.1635687Z == clock drift check == 2019-11-12T02:29:05.1664909Z local time: Tue Nov 12 02:29:05 UTC 2019 2019-11-12T02:29:05.2351591Z network time: Tue, 12 Nov 2019 02:29:05 GMT 2019-11-12T02:29:05.2351779Z == end clock drift check == 2019-11-12T02:29:06.6262033Z 2019-11-12T02:29:06.6326284Z ##[error]Bash exited with code '1'. 2019-11-12T02:29:06.6359427Z ##[section]Starting: Checkout 2019-11-12T02:29:06.6361174Z ============================================================================== 2019-11-12T02:29:06.6361229Z Task : Get sources 2019-11-12T02:29:06.6361276Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories. 

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)

@ninjasource ninjasource force-pushed the async-fn-resume-after-completion branch from b585d99 to 238e604 Compare November 12, 2019 16:32
@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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-11-12T16:33:04.9649557Z ##[command]git remote add origin https://github.com/rust-lang/rust 2019-11-12T16:33:04.9843691Z ##[command]git config gc.auto 0 2019-11-12T16:33:04.9940351Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader 2019-11-12T16:33:05.0017566Z ##[command]git config --get-all http.proxy 2019-11-12T16:33:05.0160465Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66321/merge:refs/remotes/pull/66321/merge --- 2019-11-12T16:39:36.6586527Z Compiling serde_json v1.0.40 2019-11-12T16:39:38.5359901Z Compiling tidy v0.1.0 (/checkout/src/tools/tidy) 2019-11-12T16:39:50.6123575Z Finished release [optimized] target(s) in 1m 33s 2019-11-12T16:39:50.6205709Z tidy check 2019-11-12T16:39:51.2871936Z tidy error: /checkout/src/librustc_mir/transform/generator.rs:1093: line longer than 100 chars 2019-11-12T16:39:51.2921572Z tidy error: /checkout/src/librustc_mir/transform/const_prop.rs:92: TODO is deprecated; use FIXME 2019-11-12T16:39:51.5867946Z tidy error: /checkout/src/librustc/mir/mod.rs:9: line longer than 100 chars 2019-11-12T16:39:51.5868795Z tidy error: /checkout/src/librustc/mir/mod.rs:9: TODO is deprecated; use FIXME 2019-11-12T16:39:51.5886699Z tidy error: /checkout/src/librustc/mir/mod.rs:3024: TODO is deprecated; use FIXME 2019-11-12T16:39:53.5033318Z Found 485 error codes 2019-11-12T16:39:53.5033580Z Found 0 error codes with no tests 2019-11-12T16:39:53.5033625Z Done! 2019-11-12T16:39:53.5033936Z some tidy checks failed 2019-11-12T16:39:53.5033936Z some tidy checks failed 2019-11-12T16:39:53.5033980Z 2019-11-12T16:39:53.5034025Z 2019-11-12T16:39:53.5034894Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" 2019-11-12T16:39:53.5035018Z 2019-11-12T16:39:53.5035161Z 2019-11-12T16:39:53.5038816Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy 2019-11-12T16:39:53.5039695Z Build completed unsuccessfully in 0:01:37 2019-11-12T16:39:53.5039695Z Build completed unsuccessfully in 0:01:37 2019-11-12T16:39:53.5084676Z == clock drift check == 2019-11-12T16:39:53.5091289Z local time: Tue Nov 12 16:39:53 UTC 2019 2019-11-12T16:39:53.6057998Z network time: Tue, 12 Nov 2019 16:39:53 GMT 2019-11-12T16:39:53.6061508Z == end clock drift check == 2019-11-12T16:39:54.9471259Z 2019-11-12T16:39:54.9544162Z ##[error]Bash exited with code '1'. 2019-11-12T16:39:54.9578440Z ##[section]Starting: Checkout 2019-11-12T16:39:54.9580924Z ============================================================================== 2019-11-12T16:39:54.9581011Z Task : Get sources 2019-11-12T16:39:54.9581065Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories. 

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)

@ninjasource ninjasource changed the title Async fn resume after completion - WIP [WIP] Async fn resume after completion Nov 12, 2019
@ninjasource
Copy link
Author

ninjasource commented Nov 13, 2019

Hi, this is my first rust compiler PR so I may need a little guidance. Been following the excellent documentation up to this point.

Just a few questions:

  1. Is it OK to reference the GeneratorKind struct from hir inside mir? Seems wrong somehow.
  2. In src/librustc_mir/transform/generator.rs:1083 should I write unit tests that check that the correct panic blocks have been created in the mir output or are run_fail tests adequate since the check the same thing anyway?
  3. I have set the rust edition on the compiler flags for the async tests (compile-flags: --edition 2018). Is this a bad idea and will this be an issue when the rust edition changes in the future?

There are more questions in the FIXME comments in the code itself. I will remove them once I have figured out what to do about them.

Thanks, David.

@gilescope
Copy link
Contributor

Looks reasonable to me.
r? @Centril

@rust-highfive rust-highfive assigned Centril and unassigned zackmdavis Nov 13, 2019
@Centril Centril 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 Nov 14, 2019
@bors
Copy link
Collaborator

bors commented Nov 14, 2019

☔ The latest upstream changes (presumably #66233) made this pull request unmergeable. Please resolve the merge conflicts.

@Centril
Copy link
Contributor

Centril commented Nov 14, 2019

@rust-highfive rust-highfive assigned oli-obk and unassigned Centril Nov 14, 2019
@JohnCSimon
Copy link
Member

JohnCSimon commented Nov 24, 2019

Ping from triage:
@ninjasource - this PR has some merge conflicts and can you please address the change request or mark it off as completed?
Thanks.

@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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-11-25T01:07:36.6141952Z ##[command]git remote add origin https://github.com/rust-lang/rust 2019-11-25T01:07:36.6360344Z ##[command]git config gc.auto 0 2019-11-25T01:07:36.6428082Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader 2019-11-25T01:07:36.6492954Z ##[command]git config --get-all http.proxy 2019-11-25T01:07:36.6623905Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66321/merge:refs/remotes/pull/66321/merge 

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)

@ninjasource ninjasource force-pushed the async-fn-resume-after-completion branch from 99565e1 to 0b1e532 Compare November 25, 2019 13:00
@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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-11-25T13:01:14.7197506Z ##[command]git remote add origin https://github.com/rust-lang/rust 2019-11-25T13:01:14.7211609Z ##[command]git config gc.auto 0 2019-11-25T13:01:15.7186308Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader 2019-11-25T13:01:15.7232305Z ##[command]git config --get-all http.proxy 2019-11-25T13:01:15.7235260Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66321/merge:refs/remotes/pull/66321/merge --- 2019-11-25T13:09:27.8806178Z Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros) 2019-11-25T13:09:42.1907955Z error[E0433]: failed to resolve: use of undeclared type or module `hir` 2019-11-25T13:09:42.1909234Z --> src/librustc/mir/mod.rs:419:20 2019-11-25T13:09:42.1909911Z | 2019-11-25T13:09:42.1910306Z 419 | ExplicitUnsafe(hir::HirId), 2019-11-25T13:09:42.1914048Z 2019-11-25T13:09:42.1930529Z error[E0433]: failed to resolve: use of undeclared type or module `hir` 2019-11-25T13:09:42.1931016Z --> src/librustc/mir/mod.rs:480:27 2019-11-25T13:09:42.1931374Z | 2019-11-25T13:09:42.1931374Z | 2019-11-25T13:09:42.1931787Z 480 | impl From<Mutability> for hir::Mutability { 2019-11-25T13:09:42.1932395Z 2019-11-25T13:09:42.1937301Z error[E0433]: failed to resolve: use of undeclared type or module `hir` 2019-11-25T13:09:42.1937762Z --> src/librustc/mir/mod.rs:483:32 2019-11-25T13:09:42.1938144Z | --- 2019-11-25T13:09:42.1941653Z 2019-11-25T13:09:42.2170840Z error[E0433]: failed to resolve: use of undeclared type or module `hir` 2019-11-25T13:09:42.2171463Z --> src/librustc/mir/mod.rs:1688:14 2019-11-25T13:09:42.2171847Z | 2019-11-25T13:09:42.2172278Z 1688 | pub asm: hir::InlineAsmInner, 2019-11-25T13:09:42.2173172Z 2019-11-25T13:09:42.2308914Z error[E0433]: failed to resolve: use of undeclared type or module `hir` 2019-11-25T13:09:42.2309182Z --> src/librustc/mir/mod.rs:2049:20 2019-11-25T13:09:42.2309395Z | 2019-11-25T13:09:42.2309395Z | 2019-11-25T13:09:42.2309618Z 2049 | pub lint_root: hir::HirId, 2019-11-25T13:09:42.2309948Z 2019-11-25T13:09:42.2376083Z error[E0433]: failed to resolve: use of undeclared type or module `hir` 2019-11-25T13:09:42.2376355Z --> src/librustc/mir/mod.rs:2174:39 2019-11-25T13:09:42.2376561Z | 2019-11-25T13:09:42.2376561Z | 2019-11-25T13:09:42.2377017Z 2174 | Generator(DefId, SubstsRef<'tcx>, hir::Movability), 2019-11-25T13:09:42.2377359Z 2019-11-25T13:09:42.2480938Z error[E0433]: failed to resolve: use of undeclared type or module `hir` 2019-11-25T13:09:42.2481227Z --> src/librustc/mir/mod.rs:2726:18 2019-11-25T13:09:42.2481412Z | 2019-11-25T13:09:42.2481412Z | 2019-11-25T13:09:42.2481632Z 2726 | BorrowPacked(hir::HirId), 2019-11-25T13:09:42.2481987Z 2019-11-25T13:09:42.2498836Z error[E0433]: failed to resolve: use of undeclared type or module `hir` 2019-11-25T13:09:42.2499108Z --> src/librustc/mir/mod.rs:2743:30 2019-11-25T13:09:42.2499291Z | 2019-11-25T13:09:42.2499291Z | 2019-11-25T13:09:42.2499526Z 2743 | pub unsafe_blocks: Lrc<[(hir::HirId, bool)]>, 2019-11-25T13:09:42.2499860Z 2019-11-25T13:09:51.0012831Z error[E0277]: the trait bound `hir::GeneratorKind: ty::fold::TypeFoldable<'_>` is not satisfied 2019-11-25T13:09:51.0013775Z --> src/librustc/mir/mod.rs:90:68 2019-11-25T13:09:51.0014257Z | 2019-11-25T13:09:51.0014257Z | 2019-11-25T13:09:51.0014796Z 90 | #[derive(Clone, RustcEncodable, RustcDecodable, Debug, HashStable, TypeFoldable)] 2019-11-25T13:09:51.0015779Z | | 2019-11-25T13:09:51.0016312Z | the trait `ty::fold::TypeFoldable<'_>` is not implemented for `hir::GeneratorKind` 2019-11-25T13:09:51.0016829Z | in this macro invocation 2019-11-25T13:09:51.0017383Z | 2019-11-25T13:09:51.0017383Z | 2019-11-25T13:09:51.0017899Z ::: src/librustc/ty/fold.rs:47:5 2019-11-25T13:09:51.0018303Z | 2019-11-25T13:09:51.0018772Z 47 | fn fold_with<F: TypeFolder<'tcx>>(&self, folder: &mut F) -> Self { 2019-11-25T13:09:51.0019322Z | ---------------------------------------------------------------- required by `ty::fold::TypeFoldable::fold_with` 2019-11-25T13:09:51.0019722Z | 2019-11-25T13:09:51.0020246Z = note: required because of the requirements on the impl of `ty::fold::TypeFoldable<'_>` for `std::option::Option<hir::GeneratorKind>` 2019-11-25T13:09:51.0116359Z error[E0277]: the trait bound `hir::GeneratorKind: ty::fold::TypeFoldable<'_>` is not satisfied 2019-11-25T13:09:51.0117254Z --> src/librustc/mir/mod.rs:90:68 2019-11-25T13:09:51.0117687Z | 2019-11-25T13:09:51.0117687Z | 2019-11-25T13:09:51.0118213Z 90 | #[derive(Clone, RustcEncodable, RustcDecodable, Debug, HashStable, TypeFoldable)] 2019-11-25T13:09:51.0119196Z | | 2019-11-25T13:09:51.0119742Z | the trait `ty::fold::TypeFoldable<'_>` is not implemented for `hir::GeneratorKind` 2019-11-25T13:09:51.0120291Z | in this macro invocation 2019-11-25T13:09:51.0121225Z | 2019-11-25T13:09:51.0121225Z | 2019-11-25T13:09:51.0121742Z ::: src/librustc/ty/fold.rs:52:5 2019-11-25T13:09:51.0122070Z | 2019-11-25T13:09:51.0122453Z 52 | fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool { 2019-11-25T13:09:51.0122921Z | ------------------------------------------------------------------- required by `ty::fold::TypeFoldable::visit_with` 2019-11-25T13:09:51.0123232Z | 2019-11-25T13:09:51.0123672Z = note: required because of the requirements on the impl of `ty::fold::TypeFoldable<'_>` for `std::option::Option<hir::GeneratorKind>` 2019-11-25T13:09:51.0123827Z 2019-11-25T13:09:51.5069278Z error[E0283]: type annotations needed: cannot resolve `std::boxed::Box<mir::AggregateKind<'_>>: serialize::serialize::Decodable` 2019-11-25T13:09:51.5069782Z ::: /checkout/src/libserialize/serialize.rs:304:18 2019-11-25T13:09:51.5069962Z | 2019-11-25T13:09:51.5069962Z | 2019-11-25T13:09:51.5070205Z 304 | fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>; 2019-11-25T13:09:51.5070517Z | ------- required by this bound in `serialize::serialize::Decodable::decode` 2019-11-25T13:09:51.5071082Z ::: <::core::macros::builtin::RustcDecodable macros>:1:1 2019-11-25T13:09:51.5071485Z | 2019-11-25T13:09:51.5071485Z | 2019-11-25T13:09:51.5071714Z 1 | ($ item : item) => { } 2019-11-25T13:09:51.5071981Z | ---------------------- in this expansion of `#[derive(RustcDecodable)]` 2019-11-25T13:09:51.5072382Z | 2019-11-25T13:09:51.5072633Z 2118 | #[derive(Clone, RustcEncodable, RustcDecodable, HashStable, PartialEq)] 2019-11-25T13:09:51.5072934Z | ^^^^^^^^^^^^^^ in this macro invocation 2019-11-25T13:09:51.5072968Z --- 2019-11-25T13:10:00.3998295Z local time: Mon Nov 25 13:10:00 UTC 2019 2019-11-25T13:10:00.9185552Z network time: Mon, 25 Nov 2019 13:10:00 GMT 2019-11-25T13:10:00.9187037Z == end clock drift check == 2019-11-25T13:10:02.0136505Z 2019-11-25T13:10:02.0189568Z ##[error]Bash exited with code '1'. 2019-11-25T13:10:02.0211226Z ##[section]Starting: Checkout 2019-11-25T13:10:02.0212609Z ============================================================================== 2019-11-25T13:10:02.0212669Z Task : Get sources 2019-11-25T13:10:02.0212704Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories. 

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)

@ninjasource
Copy link
Author

Ping from triage:
@ninjasource - this PR has some merge conflicts and can you please address the change request or mark it off as completed?
Thanks.

Hi John,
Sorted out the conflict now, thanks.

@ninjasource ninjasource reopened this Nov 26, 2019
@ninjasource ninjasource changed the title [WIP] Async fn resume after completion Async fn resume after completion Nov 26, 2019
@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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-11-26T01:32:19.8581263Z ##[command]git remote add origin https://github.com/rust-lang/rust 2019-11-26T01:32:19.8757016Z ##[command]git config gc.auto 0 2019-11-26T01:32:19.8824480Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader 2019-11-26T01:32:19.8878858Z ##[command]git config --get-all http.proxy 2019-11-26T01:32:19.9016888Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66321/merge:refs/remotes/pull/66321/merge --- 2019-11-26T02:25:51.6653183Z .................................................................................................... 1600/9294 2019-11-26T02:25:55.9157701Z .................................................................................................... 1700/9294 2019-11-26T02:26:08.0023417Z ................................i................................................................... 1800/9294 2019-11-26T02:26:14.4464829Z .................................................................................................... 1900/9294 2019-11-26T02:26:27.1362539Z .................iiiii.............................................................................. 2000/9294 2019-11-26T02:26:35.9897974Z .................................................................................................... 2200/9294 2019-11-26T02:26:38.1380626Z .................................................................................................... 2300/9294 2019-11-26T02:26:42.7207140Z .................................................................................................... 2400/9294 2019-11-26T02:27:01.4969744Z .................................................................................................... 2500/9294 --- 2019-11-26T02:29:23.6184512Z .................i...............i.................................................................. 4800/9294 2019-11-26T02:29:32.8555719Z .................................................................................................... 4900/9294 2019-11-26T02:29:38.0106261Z .................................................................................................... 5000/9294 2019-11-26T02:29:45.7649375Z ...............F.................................................................................... 5100/9294 2019-11-26T02:29:52.1895809Z .........................ii.ii...........i.......................................................... 5200/9294 2019-11-26T02:30:00.1647193Z .................................................................................................... 5400/9294 2019-11-26T02:30:09.6478546Z .................................................................................................... 5500/9294 2019-11-26T02:30:15.9071216Z .......i............................................................................................ 5600/9294 2019-11-26T02:30:21.4980666Z .................................................................................................... 5700/9294 2019-11-26T02:30:21.4980666Z .................................................................................................... 5700/9294 2019-11-26T02:30:31.0028648Z .............................................................................................ii...i. 5800/9294 2019-11-26T02:30:42.2545447Z .ii...........i..................................................................................... 5900/9294 2019-11-26T02:30:58.5891497Z .................................................................................................... 6100/9294 2019-11-26T02:31:02.0461767Z .................................................................................................... 6200/9294 2019-11-26T02:31:02.0461767Z .................................................................................................... 6200/9294 2019-11-26T02:31:14.3777938Z ................i..ii............................................................................... 6300/9294 2019-11-26T02:31:31.5886798Z ....................................................................................i............... 6500/9294 2019-11-26T02:31:33.5316800Z .................................................................................................... 6600/9294 2019-11-26T02:31:35.4765079Z ...........................................................................i........................ 6700/9294 2019-11-26T02:31:37.8091018Z .................................................................................................... 6800/9294 --- 2019-11-26T02:35:52.6757345Z failures: 2019-11-26T02:35:52.6757857Z 2019-11-26T02:35:52.6758571Z ---- [ui] ui/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs stdout ---- 2019-11-26T02:35:52.6758772Z 2019-11-26T02:35:52.6759227Z error: error pattern ' thread 'main' panicked at '`async fn` resumed after panic'' not found! 2019-11-26T02:35:52.6759903Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-65419/issue-65419-async-fn-resume-after-panic/a" 2019-11-26T02:35:52.6760126Z stdout: 2019-11-26T02:35:52.6760502Z ------------------------------------------ 2019-11-26T02:35:52.6760691Z 2019-11-26T02:35:52.6760691Z 2019-11-26T02:35:52.6761364Z ------------------------------------------ 2019-11-26T02:35:52.6761684Z stderr: 2019-11-26T02:35:52.6761978Z ------------------------------------------ 2019-11-26T02:35:52.6762365Z thread 'main' panicked at 'explicit panic', /checkout/src/test/ui/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs:13:5 2019-11-26T02:35:52.6762521Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. 2019-11-26T02:35:52.6762900Z thread 'main' panicked at '`async fn` resumed after panicking', /checkout/src/test/ui/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs:12:16 2019-11-26T02:35:52.6763299Z ------------------------------------------ 2019-11-26T02:35:52.6763446Z 2019-11-26T02:35:52.6763545Z 2019-11-26T02:35:52.6763644Z --- 2019-11-26T02:35:52.6816182Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22 2019-11-26T02:35:52.6816500Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. 2019-11-26T02:35:52.6830549Z 2019-11-26T02:35:52.6830846Z 2019-11-26T02:35:52.6834349Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always" 2019-11-26T02:35:52.6835148Z 2019-11-26T02:35:52.6835280Z 2019-11-26T02:35:52.6848775Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test 2019-11-26T02:35:52.6848848Z Build completed unsuccessfully in 0:57:53 2019-11-26T02:35:52.6848848Z Build completed unsuccessfully in 0:57:53 2019-11-26T02:35:52.6896409Z == clock drift check == 2019-11-26T02:35:52.6914177Z local time: Tue Nov 26 02:35:52 UTC 2019 2019-11-26T02:35:52.7217248Z network time: Tue, 26 Nov 2019 02:35:52 GMT 2019-11-26T02:35:52.7220846Z == end clock drift check == 2019-11-26T02:35:53.4961119Z 2019-11-26T02:35:53.5048738Z ##[error]Bash exited with code '1'. 2019-11-26T02:35:53.5087540Z ##[section]Starting: Checkout 2019-11-26T02:35:53.5089742Z ============================================================================== 2019-11-26T02:35:53.5089797Z Task : Get sources 2019-11-26T02:35:53.5089846Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories. 

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)

@oli-obk
Copy link
Contributor

oli-obk commented Nov 28, 2019

Hmm... I don't actually know how to run wasm tests. I don't even know who to ping. You can ask on zulip in the #compiler stream or on discord in the #compiler channel

@ninjasource
Copy link
Author

Thanks @oli-obk, I got a response from @eddyb on Zulip and managed to run the ui tests against the wasm32-unknown-unknown target. The tests ran to completion but a third of all the tests failed so maybe you can't run them like this. Despite this I think that its worth giving the auto merge another go. I took a look at the other async tests and they all used edition:2018 instead of the compiler flags I used so I recon that that will fix the problem. I updated my tests to use edition:2018.

@eddyb
Copy link
Member

eddyb commented Nov 29, 2019

@bors r=oli-obk

@bors
Copy link
Collaborator

bors commented Nov 29, 2019

📌 Commit 6531ba8 has been approved by oli-obk

@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 Nov 29, 2019
@bors
Copy link
Collaborator

bors commented Nov 29, 2019

⌛ Testing commit 6531ba8 with merge a1132b3...

bors added a commit that referenced this pull request Nov 29, 2019
…r=oli-obk Async fn resume after completion #65419 -- Attempting to run an async fn after completion mentions generators Not yet ready for review - work in progress Just need to run the tests on a proper build server
@rust-highfive
Copy link
Contributor

The job test-various of your PR failed (pretty log, 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-11-29T05:02:39.1291314Z failures: 2019-11-29T05:02:39.1312274Z 2019-11-29T05:02:39.1313387Z ---- [ui] ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs stdout ---- 2019-11-29T05:02:39.1313693Z 2019-11-29T05:02:39.1314453Z error: error pattern ' thread 'main' panicked at '`async fn` resumed after completion'' not found! 2019-11-29T05:02:39.1314721Z status: exit code: 101 2019-11-29T05:02:39.1315367Z command: "/node-v9.2.0-linux-x64/bin/node" "/checkout/src/etc/wasm32-shim.js" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion/a.wasm" 2019-11-29T05:02:39.1316094Z ------------------------------------------ 2019-11-29T05:02:39.1316285Z 2019-11-29T05:02:39.1316698Z ------------------------------------------ 2019-11-29T05:02:39.1316919Z stderr: 2019-11-29T05:02:39.1316919Z stderr: 2019-11-29T05:02:39.1317346Z ------------------------------------------ 2019-11-29T05:02:39.1317564Z RuntimeError: unreachable 2019-11-29T05:02:39.1317990Z at __rust_start_panic (wasm-function[74]:1) 2019-11-29T05:02:39.1318466Z at rust_panic (wasm-function[69]:39) 2019-11-29T05:02:39.1318974Z at _ZN3std9panicking20rust_panic_with_hook17hac22899b3ad8c003E (wasm-function[64]:327) 2019-11-29T05:02:39.1319557Z at _ZN3std9panicking18continue_panic_fmt17h2ed3c020db1eed81E (wasm-function[63]:151) 2019-11-29T05:02:39.1320025Z at rust_begin_unwind (wasm-function[62]:3) 2019-11-29T05:02:39.1320530Z at _ZN4core9panicking9panic_fmt17h2bb1cac5224c3c71E (wasm-function[92]:54) 2019-11-29T05:02:39.1321040Z at _ZN4core9panicking5panic17hb0a26625597c3cedE (wasm-function[90]:62) 2019-11-29T05:02:39.1321610Z at _ZN44issue_65419_async_fn_resume_after_completion8executor8block_on17hf16744be17ddedb5E (wasm-function[12]:138) 2019-11-29T05:02:39.1322172Z at _ZN44issue_65419_async_fn_resume_after_completion4main17h3b2d8c640557c458E (wasm-function[0]:48) 2019-11-29T05:02:39.1322892Z at _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h3304a47c52e9820eE (wasm-function[2]:25) 2019-11-29T05:02:39.1323677Z at _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17hb0517212f4a7a6e1E (wasm-function[52]:8) 2019-11-29T05:02:39.1324279Z at _ZN3std9panicking3try7do_call17h5f71630b133d918eE (wasm-function[61]:20) 2019-11-29T05:02:39.1324762Z at __rust_maybe_catch_panic (wasm-function[73]:5) 2019-11-29T05:02:39.1325292Z at _ZN3std2rt19lang_start_internal17h83f04431ca309805E (wasm-function[70]:250) 2019-11-29T05:02:39.1325722Z at main (wasm-function[1]:46) 2019-11-29T05:02:39.1326166Z at Object.<anonymous> (/checkout/src/etc/wasm32-shim.js:20:20) 2019-11-29T05:02:39.1326431Z at Module._compile (module.js:641:30) 2019-11-29T05:02:39.1326621Z at Object.Module._extensions..js (module.js:652:10) 2019-11-29T05:02:39.1326799Z at Module.load (module.js:560:32) 2019-11-29T05:02:39.1326992Z at tryModuleLoad (module.js:503:12) 2019-11-29T05:02:39.1327553Z ------------------------------------------ 2019-11-29T05:02:39.1327752Z 2019-11-29T05:02:39.1327894Z 2019-11-29T05:02:39.1328670Z ---- [ui] ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs stdout ---- 2019-11-29T05:02:39.1328670Z ---- [ui] ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs stdout ---- 2019-11-29T05:02:39.1328900Z 2019-11-29T05:02:39.1329396Z error: error pattern ' thread 'main' panicked at '`async fn` resumed after panicking'' not found! 2019-11-29T05:02:39.1329649Z status: exit code: 101 2019-11-29T05:02:39.1330294Z command: "/node-v9.2.0-linux-x64/bin/node" "/checkout/src/etc/wasm32-shim.js" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic/a.wasm" 2019-11-29T05:02:39.1331348Z ------------------------------------------ 2019-11-29T05:02:39.1331537Z 2019-11-29T05:02:39.1331958Z ------------------------------------------ 2019-11-29T05:02:39.1332171Z stderr: 2019-11-29T05:02:39.1332171Z stderr: 2019-11-29T05:02:39.1332566Z ------------------------------------------ 2019-11-29T05:02:39.1332800Z RuntimeError: unreachable 2019-11-29T05:02:39.1333197Z at __rust_start_panic (wasm-function[83]:1) 2019-11-29T05:02:39.1333686Z at rust_panic (wasm-function[78]:39) 2019-11-29T05:02:39.1334174Z at _ZN3std9panicking20rust_panic_with_hook17hac22899b3ad8c003E (wasm-function[73]:327) 2019-11-29T05:02:39.1334754Z at _ZN3std9panicking11begin_panic17hd1d73f4b2ad7b927E (wasm-function[0]:49) 2019-11-29T05:02:39.1335553Z at _ZN39issue_65419_async_fn_resume_after_panic3foo28_$u7b$$u7b$closure$u7d$$u7d$17h42442869546dcd9cE.llvm.1707079713334101718 (wasm-function[10]:33) 2019-11-29T05:02:39.1336242Z at _ZN80_$LT$std..future..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17hc3eb648ba76fb974E (wasm-function[9]:12) 2019-11-29T05:02:39.1336818Z at _ZN3std9panicking3try7do_call17he6aa5a54cef84856E.llvm.15597571472058960050 (wasm-function[1]:76) 2019-11-29T05:02:39.1337355Z at __rust_maybe_catch_panic (wasm-function[82]:5) 2019-11-29T05:02:39.1337906Z at _ZN39issue_65419_async_fn_resume_after_panic4main17h6022587208e370edE (wasm-function[13]:104) 2019-11-29T05:02:39.1338626Z at _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h20e354da0afff9a4E (wasm-function[6]:25) 2019-11-29T05:02:39.1339384Z at _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17hb0517212f4a7a6e1E (wasm-function[60]:8) 2019-11-29T05:02:39.1340231Z at _ZN3std9panicking3try7do_call17h5f71630b133d918eE (wasm-function[70]:20) 2019-11-29T05:02:39.1340894Z at __rust_maybe_catch_panic (wasm-function[82]:5) 2019-11-29T05:02:39.1341394Z at _ZN3std2rt19lang_start_internal17h83f04431ca309805E (wasm-function[79]:250) 2019-11-29T05:02:39.1341848Z at main (wasm-function[14]:46) 2019-11-29T05:02:39.1342333Z at Object.<anonymous> (/checkout/src/etc/wasm32-shim.js:20:20) 2019-11-29T05:02:39.1342586Z at Module._compile (module.js:641:30) 2019-11-29T05:02:39.1342890Z at Object.Module._extensions..js (module.js:652:10) 2019-11-29T05:02:39.1343115Z at Module.load (module.js:560:32) 2019-11-29T05:02:39.1343324Z at tryModuleLoad (module.js:503:12) 2019-11-29T05:02:39.1344468Z ------------------------------------------ 2019-11-29T05:02:39.1344866Z 2019-11-29T05:02:39.1345008Z 2019-11-29T05:02:39.1345489Z ---- [ui] ui/async-await/issues/issue-65419/issue-65419-generator-resume-after-completion.rs stdout ---- 2019-11-29T05:02:39.1345489Z ---- [ui] ui/async-await/issues/issue-65419/issue-65419-generator-resume-after-completion.rs stdout ---- 2019-11-29T05:02:39.1345688Z 2019-11-29T05:02:39.1346115Z error: error pattern 'generator resumed after completion' not found! 2019-11-29T05:02:39.1346339Z status: exit code: 101 2019-11-29T05:02:39.1346970Z command: "/node-v9.2.0-linux-x64/bin/node" "/checkout/src/etc/wasm32-shim.js" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/issues/issue-65419/issue-65419-generator-resume-after-completion/a.wasm" 2019-11-29T05:02:39.1347633Z ------------------------------------------ 2019-11-29T05:02:39.1347829Z 2019-11-29T05:02:39.1348204Z ------------------------------------------ 2019-11-29T05:02:39.1348434Z stderr: 2019-11-29T05:02:39.1348434Z stderr: 2019-11-29T05:02:39.1348811Z ------------------------------------------ 2019-11-29T05:02:39.1349185Z RuntimeError: unreachable 2019-11-29T05:02:39.1362037Z at __rust_start_panic (wasm-function[64]:1) 2019-11-29T05:02:39.1364209Z at rust_panic (wasm-function[59]:39) 2019-11-29T05:02:39.1364868Z at _ZN3std9panicking20rust_panic_with_hook17hac22899b3ad8c003E (wasm-function[54]:327) 2019-11-29T05:02:39.1365313Z at _ZN3std9panicking18continue_panic_fmt17h2ed3c020db1eed81E (wasm-function[53]:151) 2019-11-29T05:02:39.1365635Z at rust_begin_unwind (wasm-function[52]:3) 2019-11-29T05:02:39.1365960Z at _ZN4core9panicking9panic_fmt17h2bb1cac5224c3c71E (wasm-function[82]:54) 2019-11-29T05:02:39.1366310Z at _ZN4core9panicking5panic17hb0a26625597c3cedE (wasm-function[80]:62) 2019-11-29T05:02:39.1366682Z at _ZN45issue_65419_generator_resume_after_completion4main17h2cd563fc458fa343E (wasm-function[3]:15) 2019-11-29T05:02:39.1367074Z at _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h31e34ece10dc7b36E (wasm-function[0]:25) 2019-11-29T05:02:39.1367495Z at _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17hb0517212f4a7a6e1E (wasm-function[42]:8) 2019-11-29T05:02:39.1367862Z at _ZN3std9panicking3try7do_call17h5f71630b133d918eE (wasm-function[51]:20) 2019-11-29T05:02:39.1368180Z at __rust_maybe_catch_panic (wasm-function[63]:5) 2019-11-29T05:02:39.1368647Z at _ZN3std2rt19lang_start_internal17h83f04431ca309805E (wasm-function[60]:250) 2019-11-29T05:02:39.1368965Z at main (wasm-function[4]:46) 2019-11-29T05:02:39.1369268Z at Object.<anonymous> (/checkout/src/etc/wasm32-shim.js:20:20) 2019-11-29T05:02:39.1369380Z at Module._compile (module.js:641:30) 2019-11-29T05:02:39.1369484Z at Object.Module._extensions..js (module.js:652:10) 2019-11-29T05:02:39.1369570Z at Module.load (module.js:560:32) 2019-11-29T05:02:39.1369665Z at tryModuleLoad (module.js:503:12) 2019-11-29T05:02:39.1369749Z at Function.Module._load (module.js:495:3) 2019-11-29T05:02:39.1370097Z ------------------------------------------ 2019-11-29T05:02:39.1370163Z 2019-11-29T05:02:39.1370219Z 2019-11-29T05:02:39.1370256Z --- 2019-11-29T05:02:39.1372197Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22 2019-11-29T05:02:39.1372326Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. 2019-11-29T05:02:39.1382863Z 2019-11-29T05:02:39.1382949Z 2019-11-29T05:02:39.1390079Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-wasm32-unknown-unknown" "--mode" "ui" "--target" "wasm32-unknown-unknown" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--nodejs" "/node-v9.2.0-linux-x64/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options -Lnative=/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--llvm-version" "9.0.0-rust-1.41.0-dev\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always" 2019-11-29T05:02:39.1390882Z 2019-11-29T05:02:39.1390939Z 2019-11-29T05:02:39.1410443Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target wasm32-unknown-unknown src/test/run-make src/test/ui src/test/compile-fail src/test/mir-opt src/test/codegen-units src/libcore 2019-11-29T05:02:39.1410629Z Build completed unsuccessfully in 1:21:43 2019-11-29T05:02:39.1410629Z Build completed unsuccessfully in 1:21:43 2019-11-29T05:02:39.1456544Z == clock drift check == 2019-11-29T05:02:39.1471992Z local time: Fri Nov 29 05:02:39 UTC 2019 2019-11-29T05:02:39.4440675Z network time: Fri, 29 Nov 2019 05:02:39 GMT 2019-11-29T05:02:39.4445118Z == end clock drift check == 2019-11-29T05:02:40.7439090Z 2019-11-29T05:02:40.7559469Z ##[error]Bash exited with code '1'. 2019-11-29T05:02:40.7611298Z ##[section]Starting: Checkout 2019-11-29T05:02:40.7613428Z ============================================================================== 2019-11-29T05:02:40.7613527Z Task : Get sources 2019-11-29T05:02:40.7613634Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories. 

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)

@bors
Copy link
Collaborator

bors commented Nov 29, 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 Nov 29, 2019
// be talking about `async fn`s instead.

// run-fail
// error-pattern: thread 'main' panicked at '`async fn` resumed after completion'
Copy link
Contributor

Choose a reason for hiding this comment

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

So... the error is RuntimeError: unreachable. Check whether any tests check for that error pattern, or if there are any wasm panic tests and how to check them. I think it would also be OK to just add // ignore-wasm to these tests if there's no way to specify different error patterns for different platforms

Copy link
Contributor

Choose a reason for hiding this comment

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

(Assuming that the ignore-wasm comment is how this is done.) Search for it in the test suite, if it exists, that's it, if not, find out how to disable tests on wasm by searching for "wasm"

Copy link
Contributor

Choose a reason for hiding this comment

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

The reason it's OK to disable the tests on wasm is that here we only want to see a specific panic message. We have tests to see that panicking in general works, so assuming panicking works and the tests work on most platforms, there's basically no way they'd be broken on wasm. Wasn't just generally doesn't show the panic message, but that's not something you need to solve in this PR

@eddyb
Copy link
Member

eddyb commented Nov 29, 2019

cc @rust-lang/wg-wasm See #66321 (comment) - is it possible to get panic messages from wasm, during testing? I assume unreachable is what happens instead of unwinding, but perhaps there's a way to get the message out?

@ninjasource
Copy link
Author

ninjasource commented Nov 29, 2019

Thanks @oli-obk and @eddyb. I have added // ignore-wasm and // ignore-emscripten to the unit tests. The only other run-fail unit test I found in ui is src/test/ui/test-panic-abort.rs which has the following flags:

// compile-flags: --test -Cpanic=abort -Zpanic_abort_tests // run-flags: --test-threads=1 // run-fail // check-run-results // exec-env:RUST_BACKTRACE=0 // ignore-wasm no panic or subprocess support // ignore-emscripten no panic or subprocess support 

If my latest checkin fails then can I suggest that the tests be moved back to src/test/run-fail. These tests are probably configured to run with the appropriate compiler flags and who-knows-what-else.

@Pauan
Copy link

Pauan commented Nov 29, 2019

@eddyb For raw Wasm I'm not aware of anything, but for Wasm running in JS environments there is console_error_panic_hook. This works by using std::panic::set_hook.

So maybe you could use std::panic::set_hook only during the tests to retrieve the panic message?

@oli-obk
Copy link
Contributor

oli-obk commented Nov 29, 2019

This is a bit out of scope for this PR and already tracked in #62556 . Thanks for the extra details, I'll add them to the issue

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 29, 2019

📌 Commit 851492c has been approved by oli-obk

@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 Nov 29, 2019
@bors
Copy link
Collaborator

bors commented Nov 29, 2019

⌛ Testing commit 851492c with merge 25d8a94...

bors added a commit that referenced this pull request Nov 29, 2019
…r=oli-obk Async fn resume after completion #65419 -- Attempting to run an async fn after completion mentions generators Not yet ready for review - work in progress Just need to run the tests on a proper build server
@bors
Copy link
Collaborator

bors commented Nov 29, 2019

☀️ Test successful - checks-azure
Approved by: oli-obk
Pushing 25d8a94 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 29, 2019
@bors bors merged commit 851492c into rust-lang:master Nov 29, 2019
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. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.