-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(hydroflow_lang): improve diagnostics by re-spanning
#root
(#…
…1280) Inspired by fixing the spans in `demux_enum` in #1271 * re-span `#root` to `op_span` for better diagnostics * use better span `func.inputs` in `demux` and `demux_enum` * clippy fixups in `source_json`, `source_stdin` * fix #1201 (for the most part)
- Loading branch information
1 parent
6ba72c5
commit 70a3f9e
Showing
17 changed files
with
99 additions
and
171 deletions.
There are no files selected for viewing
15 changes: 4 additions & 11 deletions
15
hydroflow/tests/compile-fail/surface_demux_badclosure.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 9 additions & 14 deletions
23
hydroflow/tests/compile-fail/surface_demuxenum_port_missing.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 2 additions & 12 deletions
14
hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_1.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 2 additions & 12 deletions
14
hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_2.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.rs.ignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 4 additions & 11 deletions
15
hydroflow/tests/compile-fail/surface_partition_badclosure.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
error: Closure provided to `partition(..)` must have two arguments: the first argument is the item, and for named ports the second argument must contain a Rust 'slice pattern' to determine the port names and order. For example, the second argument could be `[foo, bar, baz]` for ports `foo`, `bar`, and `baz`. | ||
--> tests/compile-fail/surface_partition_badclosure.rs:5:56 | ||
| | ||
5 | my_partition = source_iter(0..10) -> partition(|[a, b, c]| { | ||
| ________________________________________________________^ | ||
6 | | match item % 3 { | ||
7 | | 0 => a, | ||
8 | | 1 => b, | ||
9 | | 2 => c, | ||
10 | | } | ||
11 | | }); | ||
| |_________^ | ||
--> tests/compile-fail/surface_partition_badclosure.rs:5:57 | ||
| | ||
5 | my_partition = source_iter(0..10) -> partition(|[a, b, c]| { | ||
| ^^^^^^^^^ |
12 changes: 5 additions & 7 deletions
12
hydroflow/tests/compile-fail/surface_source_interval_badarg.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.