about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2021-02-13Rollup merge of #82040 - GuillaumeGomez:ensure-src-link, r=CraftSpiderYuki Okushi-0/+6
Add test to prevent src link regression Fixes #80502. This PR is simply about adding a test to prevent a regression. cc `@bugadani` `@CraftSpider` r? `@camelid`
2021-02-13Rollup merge of #81995 - 0yoyoyo:fix-issue-81650-explicit-lifetime-error, ↵Yuki Okushi-0/+64
r=estebank Fix suggestion to introduce explicit lifetime Addresses #81650 Error message after fix: ``` error[E0311]: the parameter type `T` may not live long enough --> src/main.rs:25:11 | 24 | fn play_with<T: Animal + Send>(scope: &Scope, animal: T) { | -- help: consider adding an explicit lifetime bound...: `T: 'a +` 25 | scope.spawn(move |_| { | ^^^^^ | note: the parameter type `T` must be valid for the anonymous lifetime #2 defined on the function body at 24:1... --> src/main.rs:24:1 | 24 | fn play_with<T: Animal + Send>(scope: &Scope, animal: T) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...so that the type `[closure@src/main.rs:25:17: 27:6]` will meet its required lifetime bounds --> src/main.rs:25:11 | 25 | scope.spawn(move |_| { | ^^^^^ ```
2021-02-13Rollup merge of #81900 - vandenheuvel:organize_trait_tests, r=Mark-SimulacrumYuki Okushi-285/+285
Organize trait test files Organizes trait tests in folders where reasonable and removes name redundancies.
2021-02-12Rollup merge of #81911 - BoxyUwU:constgenericgaticefix, r=nikomatsakisDylan DPC-0/+71
GAT/const_generics: Allow with_opt_const_param to return GAT param def_id Fixes #75415 Fixes #79666 cc ```@lcnr``` I've absolutely no idea who to r? for this...
2021-02-12Rollup merge of #81506 - vo4:hwasan, r=nagisaDylan DPC-1/+20
HWAddressSanitizer support # Motivation Compared to regular ASan, HWASan has a [smaller overhead](https://source.android.com/devices/tech/debug/hwasan). The difference in practice is that HWASan'ed code is more usable, e.g. Android device compiled with HWASan can be used as a daily driver. # Example ``` fn main() { let xs = vec![0, 1, 2, 3]; let _y = unsafe { *xs.as_ptr().offset(4) }; } ``` ``` ==223==ERROR: HWAddressSanitizer: tag-mismatch on address 0xefdeffff0050 at pc 0xaaaad00b3468 READ of size 4 at 0xefdeffff0050 tags: e5/00 (ptr/mem) in thread T0 #0 0xaaaad00b3464 (/root/main+0x53464) #1 0xaaaad00b39b4 (/root/main+0x539b4) #2 0xaaaad00b3dd0 (/root/main+0x53dd0) #3 0xaaaad00b61dc (/root/main+0x561dc) #4 0xaaaad00c0574 (/root/main+0x60574) #5 0xaaaad00b6290 (/root/main+0x56290) #6 0xaaaad00b6170 (/root/main+0x56170) #7 0xaaaad00b3578 (/root/main+0x53578) #8 0xffff81345e70 (/lib64/libc.so.6+0x20e70) #9 0xaaaad0096310 (/root/main+0x36310) [0xefdeffff0040,0xefdeffff0060) is a small allocated heap chunk; size: 32 offset: 16 0xefdeffff0050 is located 0 bytes to the right of 16-byte region [0xefdeffff0040,0xefdeffff0050) allocated here: #0 0xaaaad009bcdc (/root/main+0x3bcdc) #1 0xaaaad00b1eb0 (/root/main+0x51eb0) #2 0xaaaad00b20d4 (/root/main+0x520d4) #3 0xaaaad00b2800 (/root/main+0x52800) #4 0xaaaad00b1cf4 (/root/main+0x51cf4) #5 0xaaaad00b33d4 (/root/main+0x533d4) #6 0xaaaad00b39b4 (/root/main+0x539b4) #7 0xaaaad00b61dc (/root/main+0x561dc) #8 0xaaaad00b3578 (/root/main+0x53578) #9 0xaaaad0096310 (/root/main+0x36310) Thread: T0 0xeffe00002000 stack: [0xffffc0590000,0xffffc0d90000) sz: 8388608 tls: [0xffff81521020,0xffff815217d0) Memory tags around the buggy address (one tag corresponds to 16 bytes): 0xfefcefffef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefcefffef90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefcefffefa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefcefffefb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefcefffefc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefcefffefd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefcefffefe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefcefffeff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0xfefceffff000: a2 a2 05 00 e5 [00] 00 00 00 00 00 00 00 00 00 00 0xfefceffff010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefceffff020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefceffff030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefceffff040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefceffff050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefceffff060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefceffff070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0xfefceffff080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Tags for short granules around the buggy address (one tag corresponds to 16 bytes): 0xfefcefffeff0: .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. =>0xfefceffff000: .. .. c5 .. .. [..] .. .. .. .. .. .. .. .. .. .. 0xfefceffff010: .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. See https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html#short-granules for a description of short granule tags Registers where the failure occurred (pc 0xaaaad00b3468): x0 e500efdeffff0050 x1 0000000000000004 x2 0000ffffc0d8f5a0 x3 0200efff00000000 x4 0000ffffc0d8f4c0 x5 000000000000004f x6 00000ffffc0d8f36 x7 0000efff00000000 x8 e500efdeffff0050 x9 0200efff00000000 x10 0000000000000000 x11 0200efff00000000 x12 0200effe000006b0 x13 0200effe000006b0 x14 0000000000000008 x15 00000000c00000cf x16 0000aaaad00a0afc x17 0000000000000003 x18 0000000000000001 x19 0000ffffc0d8f718 x20 ba00ffffc0d8f7a0 x21 0000aaaad00962e0 x22 0000000000000000 x23 0000000000000000 x24 0000000000000000 x25 0000000000000000 x26 0000000000000000 x27 0000000000000000 x28 0000000000000000 x29 0000ffffc0d8f650 x30 0000aaaad00b3468 ``` # Comments/Caveats * HWASan is only supported on arm64. * I'm not sure if I should add a feature gate or piggyback on the existing one for sanitizers. * HWASan requires `-C target-feature=+tagged-globals`. That flag should probably be set transparently to the user. Not sure how to go about that. # TODO * Need more tests. * Update documentation. * Fix symbolization. * Integrate with CI
2021-02-12Rollup merge of #81479 - osa1:issue24151, r=lcnrDylan DPC-7/+29
Allow casting mut array ref to mut ptr Allow casting mut array ref to mut ptr We now allow two new casts: - mut array reference to mut ptr. Example: let mut x: [usize; 2] = [0, 0]; let p = &mut x as *mut usize; We allow casting const array references to const pointers so not allowing mut references to mut pointers was inconsistent. - mut array reference to const ptr. Example: let mut x: [usize; 2] = [0, 0]; let p = &mut x as *const usize; This was similarly inconsistent as we allow casting mut references to const pointers. Existing test 'vector-cast-weirdness' updated to test both cases. Fixes #24151
2021-02-12Rollup merge of #79775 - jyn514:doctest, r=GuillaumeGomezDylan DPC-1/+1
Fix injected errors when running doctests on a crate named after a keyword Closes https://github.com/rust-lang/rust/issues/79771
2021-02-12Add test to prevent src link regressionGuillaume Gomez-0/+6
2021-02-12Add nll test0yoyoyo-0/+17
2021-02-12Rollup merge of #82011 - jyn514:warn-private-assoc-item, r=max-hellerYuki Okushi-5/+26
Fix private intra-doc warnings on associated items The issue was that the `kind, id` override was previously only being considered for the disambiguator check, not the privacy check. This uses the same ID for both. Fixes https://github.com/rust-lang/rust/issues/81981. r? ``@max-heller``
2021-02-12Rollup merge of #81990 - matsujika:suggest-mut-reference, r=estebankYuki Okushi-0/+56
Make suggestion of changing mutability of arguments broader Fix #81421 Previously rustc tries to emit the suggestion of changing mutablity unless `!trait_ref.has_infer_types_or_consts() && self.predicate_can_apply(obligation.param_env, trait_ref)` and this led to some false negatives to occur.
2021-02-12Rollup merge of #81831 - LeSeulArtichaut:81289-mut-arg, r=camelidYuki Okushi-1/+19
Don't display `mut` in arguments for functions documentation Fixes #81289 by reverting #80799, as requested in https://github.com/rust-lang/rust/pull/81328#issuecomment-766364413. Supersedes #81328. r? ``@camelid`` cc ``@jyn514``
2021-02-11Fix private intra-doc warnings on associated itemsJoshua Nelson-5/+26
The issue was that the `kind, id` override was previously only being considered for the disambiguator check, not the privacy check. This uses the same ID for both.
2021-02-11Fix injected errors when running doctests on a crate named after a keywordJoshua Nelson-1/+1
Unfortunately, this can't currently be tested. The problem is that we need the file to be compiled first to then be used as dependency, which cannot be done currently unfortunately in the rustdoc test suites. Example: ```rust // name this file "foo.rs" /// ``` /// let x = foo::foo(); /// ``` pub fn foo() {} ``` If you run `rustdoc --test foo.rs`, you'll get: ``` running 1 test test foo.rs - foo (line 1) ... FAILED failures: ---- foo.rs - foo (line 1) stdout ---- error[E0463]: can't find crate for `foo` --> foo.rs:0:1 | 2 | extern crate foo; | ^^^^^^^^^^^^^^^^^ can't find crate ``` If a test were possible, it would look something like ````rust #![crate_name = "mod"] #![crate_type = "lib"] //! ``` //! // NOTE: requires that the literal string 'mod' appears in the doctest for //! // the bug to appear //! assert_eq!(1, 1); //! ``` ````
2021-02-11Auto merge of #81760 - tmiasko:debug-borrow, r=pnkfelixbors-35/+32
Borrow builder only once in debug derive
2021-02-12Fix suggestion to introduce explicit lifetime0yoyoyo-0/+47
2021-02-11Make suggestion of changing mutability of arguments broaderHirochika Matsumoto-0/+56
2021-02-10resolve: Remove visibility hacks for enum variants and trait itemsVadim Petrochenkov-41/+69
Special treatment like this was necessary before `pub(restricted)` had been implemented and only two visibilities existed - `pub` and non-`pub`. Now it's no longer necessary and the desired behavior follows from `pub(restricted)`-style visibilities naturally assigned to enum variants and trait items.
2021-02-10Do not ICE on range patterns in function argumentsLeSeulArtichaut-1/+1
2021-02-10Add regression test for #81289LeSeulArtichaut-0/+18
2021-02-10Auto merge of #79804 - tmiasko:improper-ctypes-no-niche, r=pnkfelixbors-46/+147
Types with a hidden niche are not known to be non-null Fixes #79787.
2021-02-10Allow casting mut array ref to mut ptrÖmer Sinan Ağacan-7/+29
We now allow two new casts: - mut array reference to mut ptr. Example: let mut x: [usize; 2] = [0, 0]; let p = &mut x as *mut usize; We allow casting const array references to const pointers so not allowing mut references to mut pointers was inconsistent. - mut array reference to const ptr. Example: let mut x: [usize; 2] = [0, 0]; let p = &mut x as *const usize; This was similarly inconsistent as we allow casting mut references to const pointers. Existing test 'vector-cast-weirdness' updated to test both cases. Fixes #24151
2021-02-10Rollup merge of #81926 - henryboisdequin:fix-81907, r=estebankYuki Okushi-0/+3
add suggestion to use the `async_recursion` crate Closes #81907 CC `@estebank`
2021-02-10Rollup merge of #81925 - jesusprubio:add-long-explanation-e0547, ↵Yuki Okushi-1/+1
r=GuillaumeGomez Add long explanation for E0547 Helps with #61137
2021-02-10Rollup merge of #81466 - sasurau4:fix/enhance-sugget-mut-method-for-loop, ↵Yuki Okushi-0/+32
r=oli-obk Add suggest mut method for loop Part of #49839 This PR focus on [the comment case](https://github.com/rust-lang/rust/issues/49839#issuecomment-761930746)
2021-02-10Borrow builder only once in debug deriveTomasz Miąsko-35/+32
2021-02-09Organize trait test filesBram van den Heuvel-285/+285
2021-02-09add suggestion to use the `async_recursion` crateHenry Boisdequin-0/+3
2021-02-09Fix const generics in GATEllen-0/+71
2021-02-09Auto merge of #81384 - tmiasko:partial-ord, r=petrochenkovbors-1528/+76
Fix derived PartialOrd operators The derived implementation of `partial_cmp` compares matching fields one by one, stopping the computation when the result of a comparison is not equal to `Some(Equal)`. On the other hand the derived implementation for `lt`, `le`, `gt` and `ge` continues the computation when the result of a field comparison is `None`, consequently those operators are not transitive and inconsistent with `partial_cmp`. Fix the inconsistency by using the default implementation that fall-backs to the `partial_cmp`. This also avoids creating very deeply nested closures that were quite costly to compile. Fixes #81373. Helps with #81278, #80118.
2021-02-09Rollup merge of #81888 - ehuss:macro_rules-pp, r=petrochenkovDylan DPC-0/+19
Fix pretty printer macro_rules with semicolon. The pretty printer was not including the trailing semicolon for a macro_rules definition that used parenthesis or brackets, which results in invalid code. This adds the semicolon in those two cases.
2021-02-09Rollup merge of #81876 - osa1:issue81806, r=matthewjasperDylan DPC-0/+22
parser: Fix panic in 'const impl' recovery The panic happens when in recovery parsing a full `impl` (`parse_item_impl`) fails and we drop the `DiagnosticBuilder` for the recovery suggestion and return the `parse_item_impl` error. We now raise the original error "expected identifier found `impl`" when parsing the `impl` fails. Note that the regression test is slightly simplified version of the original repro in #81806, to make the error output smaller and more resilient to unrelated changes in parser error messages. Fixes #81806
2021-02-09Rollup merge of #80732 - spastorino:trait-inheritance-self2, r=nikomatsakisDylan DPC-79/+268
Allow Trait inheritance with cycles on associated types take 2 This reverts the revert of #79209 and fixes the ICEs that's occasioned by that PR exposing some problems that are addressed in #80648 and #79811. For easier review I'd say, check only the last commit, the first one is just a revert of the revert of #79209 which was already approved. This also could be considered part or the actual fix of #79560 but I guess for that to be closed and fixed completely we would need to land #80648 and #79811 too. r? `@nikomatsakis` cc `@Aaron1011`
2021-02-09Rollup merge of #72209 - Nemo157:lint-no-mangle-in-unsafe-code, r=nikomatsakisDylan DPC-20/+113
Add checking for no_mangle to unsafe_code lint fixes #72188 r? `@estebank`
2021-02-09./x.py test --blessTomasz Miąsko-1528/+16
2021-02-09Fix derived PartialOrd operatorsTomasz Miąsko-0/+60
The derived implementation of `partial_cmp` compares matching fields one by one, stopping the computation when the result of a comparison is not equal to `Some(Equal)`. On the other hand the derived implementation for `lt`, `le`, `gt` and `ge` continues the computation when the result of a field comparison is `None`, consequently those operators are not transitive and inconsistent with `partial_cmp`. Fix the inconsistency by using the default implementation that fall-backs to the `partial_cmp`. This also avoids creating very deeply nested closures that were quite costly to compile.
2021-02-08Fix pretty printer macro_rules with semicolon.Eric Huss-0/+19
2021-02-08Anonymize late bound regions on transitive bounds that define assoc typeSantiago Pastorino-0/+33
2021-02-08Rollup merge of #81828 - davidhewitt:capture-raw-format-strings, r=estebankMara Bos-2/+13
parse_format: treat r" as a literal This PR changes `format_args!` internal parsing machinery to treat raw strings starting `r"` as a literal. Currently `"` and `r#` are recognised as valid starting combinations for string literals, but `r"` is not. This was noticed when debugging https://github.com/rust-lang/rust/issues/67984#issuecomment-753413156 As well as fixing the behavior observed in that comment, this improves diagnostic spans for `r"` formatting strings.
2021-02-08Rollup merge of #81779 - geogriff:const-ptr-to-int-error, r=lcnrMara Bos-9/+36
improve error message for disallowed ptr-to-int casts in const eval Improves an error message as [suggested](https://github.com/rust-lang/rust/issues/80875#issuecomment-762754580) in #80875. Does the wording make enough sense? I tried to follow precedent for error message style while maintaining brevity. It seems like the rest of the `ConstEvalErrKind::NeedsRfc` error messages could be improved as well. I could give that a go if this approach works. Closes #80875
2021-02-08Rollup merge of #81356 - ehuss:libtest-filters, r=m-ou-seMara Bos-0/+24
libtest: allow multiple filters Libtest ignores any filters after the first. This changes it so that if multiple filters are passed, it will test against all of them. This also affects compiletest to do the same. Closes #30422
2021-02-08Rollup merge of #71531 - spastorino:move-treat-err-as-bug-tests-to-ui, r=oli-obkMara Bos-14/+45
Move treat err as bug tests to ui cc `@oli-obk`
2021-02-08Add long explanation for E0547Jesus Rubio-1/+1
2021-02-08Auto merge of #81313 - LeSeulArtichaut:revert-32558, r=jyn514bors-1/+1
Restore linking to itself in implementors section of trait page Reverts #32558 as proposed in [this Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Trait.20implementation.20self-links/near/223773273) r? `@jyn514` cc `@camelid`
2021-02-07HWASan supportTri Vo-1/+20
2021-02-08parser: Fix panic in 'const impl' recoveryÖmer Sinan Ağacan-0/+22
The panic happens when in recovery parsing a full `impl` (`parse_item_impl`) fails and we drop the `DiagnosticBuilder` for the recovery suggestion and return the `parse_item_impl` error. We now raise the original error "expected identifier found `impl`" when parsing the `impl` fails. Note that the regression test is slightly simplified version of the original repro in #81806, to make the error output smaller and more resilient to unrelated changes in parser error messages. Fixes #81806
2021-02-08Auto merge of #80962 - jhpratt:const_int_fn-stabilization, r=dtolnaybors-5/+0
Stabilize remaining integer methods as `const fn` This pull request stabilizes the following methods as `const fn`: - `i*::checked_div` - `i*::checked_div_euclid` - `i*::checked_rem` - `i*::checked_rem_euclid` - `i*::div_euclid` - `i*::overflowing_div` - `i*::overflowing_div_euclid` - `i*::overflowing_rem` - `i*::overflowing_rem_euclid` - `i*::rem_euclid` - `i*::wrapping_div` - `i*::wrapping_div_euclid` - `i*::wrapping_rem` - `i*::wrapping_rem_euclid` - `u*::checked_div` - `u*::checked_div_euclid` - `u*::checked_rem` - `u*::checked_rem_euclid` - `u*::div_euclid` - `u*::overflowing_div` - `u*::overflowing_div_euclid` - `u*::overflowing_rem` - `u*::overflowing_rem_euclid` - `u*::rem_euclid` - `u*::wrapping_div` - `u*::wrapping_div_euclid` - `u*::wrapping_rem` - `u*::wrapping_rem_euclid` These can all be implemented on the current stable (1.49). There are two unstable details: const likely/unlikely and unchecked division/remainder. Both of these are for optimizations, and are in no way required to make the methods function; there is no exposure of these details publicly. Per comments below, it seems best practice is to stabilize the intrinsics. As such, `intrinsics::unchecked_div` and `intrinsics::unchecked_rem` have been stabilized as `const` as part of this pull request as well. The methods themselves remain unstable. I believe part of the reason these were not stabilized previously was the behavior around division by 0 and modulo 0. After testing on nightly, the diagnostic for something like `const _: i8 = 5i8 % 0i8;` is similar to that of `const _: i8 = 5i8.rem_euclid(0i8);` (assuming the appropriate feature flag is enabled). As such, I believe these methods are ready to be stabilized as `const fn`. This pull request represents the final methods mentioned in #53718. As such, this PR closes #53718. `@rustbot` modify labels to +A-const-fn, +T-libs
2021-02-08Auto merge of #72603 - jsgf:extern-loc, r=nikomatsakisbors-0/+193
Implement `--extern-location` This PR implements `--extern-location` as a followup to #72342 as part of the implementation of #57274. The goal of this PR is to allow rustc, in coordination with the build system, to present a useful diagnostic about how to remove an unnecessary dependency from a dependency specification file (eg Cargo.toml). EDIT: Updated to current PR state. The location is specified for each named crate - that is, for a given `--extern foo[=path]` there can also be `--extern-location foo=<location>`. It supports ~~three~~ two styles of location: ~~1. `--extern-location foo=file:<path>:<line>` - a file path and line specification 1. `--extern-location foo=span:<path>:<start>:<end>` - a span specified as a file and start and end byte offsets~~ 1. `--extern-location foo=raw:<anything>` - a raw string which is included in the output 1. `--extern-location foo=json:<anything>` - an arbitrary Json structure which is emitted via Json diagnostics in a `tool_metadata` field. ~~1 & 2 are turned into an internal `Span`, so long as the path exists and is readable, and the location is meaningful (within the file, etc). This is used as the `Span` for a fix suggestion which is reported like other fix suggestions.~~ `raw` and `json` are for the case where the location isn't best expressed as a file and location within that file. For example, it could be a rule name and the name of a dependency within that rule. `rustc` makes no attempt to parse the raw string, and simply includes it in the output diagnostic text. `json` is only included in json diagnostics. `raw` is emitted as text and also as a json string in `tool_metadata`. If no `--extern-location` option is specified then it will emit a default json structure consisting of `{"name": name, "path": path}` corresponding to the name and path in `--extern name=path`. This is a prototype/RFC to make some of the earlier conversations more concrete. It doesn't stand on its own - it's only useful if implemented by Cargo and other build systems. There's also a ton of implementation details which I'd appreciate a second eye on as well. ~~**NOTE** The first commit in this PR is #72342 and should be ignored for the purposes of review. The first commit is a very simplistic implementation which is basically raw-only, presented as a MVP. The second implements the full thing, and subsequent commits are incremental fixes.~~ cc `@ehuss` `@est31` `@petrochenkov` `@estebank`
2021-02-07Implement Encoder for Diagnostic manuallyJeremy Fitzhardinge-51/+47
...so we can skip serializing `tool_metadata` if it hasn't been set. This makes the output a bit cleaner, and avoiding having to update a bunch of unrelated tests.
2021-02-07Add `--extern-loc` to augment unused crate dependency diagnosticsJeremy Fitzhardinge-38/+235
This allows a build system to indicate a location in its own dependency specification files (eg Cargo's `Cargo.toml`) which can be reported along side any unused crate dependency. This supports several types of location: - 'json' - provide some json-structured data, which is included in the json diagnostics in a `tool_metadata` field - 'raw' - emit the provided string into the output. This also appears as a json string in `tool_metadata`. If no `--extern-location` is explicitly provided then a default json entry of the form `"tool_metadata":{"name":<cratename>,"path":<cratepath>}` is emitted.