Eric Huss 9a7fadf6bd Fix metabuild compile errors with --message-format=json.
If an error occurs while compiling a metabuild target with
`--message-format=json`, it would panic because it was unable to serialize
`Target`. This change makes it so that it places a fake "metabuild.rs" string in
the `src_path` in this situation.

I'm very unhappy with this solution, but I'm unable to think of something
better. Changing `src_path` to an `Option` (or something) would break existing
tools. I tried implementing something that resets the `src_path` to the correct
path in the target dir after the workspace is configured, but it felt very
brittle – you have to fix up after all dependencies are downloaded, and there's
not a good way to ensure that happens correctly.

This adds a `with_json_contains_unordered` to help with tests.
2018-12-17 19:55:16 -08:00
..
2018-12-06 20:18:35 +01:00
2018-12-06 20:18:35 +01:00
2018-12-06 20:18:35 +01:00
2018-12-08 03:19:47 -08:00