-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more helpful error message if section size is larger than slab size
- Loading branch information
Showing
12 changed files
with
122 additions
and
22 deletions.
There are no files selected for viewing
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: 1 addition & 1 deletion
2
..._fail/copper_runtime/invalid_file_path.rs → ...ail/copper_runtime/invalid_config_path.rs
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,6 +1,6 @@ | ||
use cu29_derive::copper_runtime; | ||
|
||
#[copper_runtime(config = "/path/to/config.ron")] | ||
#[copper_runtime(config = "path/to/config.ron")] | ||
struct MyApplicationStruct; | ||
|
||
fn main() {} |
7 changes: 7 additions & 0 deletions
7
core/cu29_derive/tests/compile_fail/copper_runtime/invalid_config_path.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
error: The configuration file `path/to/config.ron` does not exist. Please provide a valid path. | ||
--> tests/compile_fail/copper_runtime/invalid_config_path.rs:3:1 | ||
| | ||
3 | #[copper_runtime(config = "path/to/config.ron")] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in the attribute macro `copper_runtime` (in Nightly builds, run with -Z macro-backtrace for more info) |
7 changes: 0 additions & 7 deletions
7
core/cu29_derive/tests/compile_fail/copper_runtime/invalid_file_path.stderr
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
core/cu29_derive/tests/compile_fail/copper_runtime/invalid_logging_config.rs
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
use cu29_derive::copper_runtime; | ||
|
||
#[copper_runtime(config = "config/invalid_logging_config.ron")] | ||
struct MyApplicationStruct; | ||
|
||
fn main() {} |
8 changes: 8 additions & 0 deletions
8
core/cu29_derive/tests/compile_fail/copper_runtime/invalid_logging_config.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: Section size (2 MiB) cannot be larger than slab size (1 MiB). Adjust the parameters accordingly. | ||
context:None | ||
--> tests/compile_fail/copper_runtime/invalid_logging_config.rs:3:1 | ||
| | ||
3 | #[copper_runtime(config = "config/invalid_logging_config.ron")] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in the attribute macro `copper_runtime` (in Nightly builds, run with -Z macro-backtrace for more info) |
4 changes: 2 additions & 2 deletions
4
core/cu29_derive/tests/compile_fail/cu_msg/invalid_file_path.rs
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,5 +1,5 @@ | ||
use cu29_derive::gen_cumsg; | ||
use cu29_derive::gen_cumsgs; | ||
|
||
gen_cumsg!("invalid/path/to/config.ron"); | ||
gen_cumsgs!("invalid/path/to/config.ron"); | ||
|
||
fn main() {} |
13 changes: 6 additions & 7 deletions
13
core/cu29_derive/tests/compile_fail/cu_msg/invalid_file_path.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,8 +1,7 @@ | ||
error[E0432]: unresolved import `cu29_derive::gen_cumsg` | ||
--> tests/compile_fail/cu_msg/invalid_file_path.rs:1:5 | ||
error: The configuration file `invalid/path/to/config.ron` does not exist. Please provide a valid path. | ||
--> tests/compile_fail/cu_msg/invalid_file_path.rs:3:1 | ||
| | ||
1 | use cu29_derive::gen_cumsg; | ||
| ^^^^^^^^^^^^^--------- | ||
| | | | ||
| | help: a similar name exists in the module: `gen_cumsgs` | ||
| no `gen_cumsg` in the root | ||
3 | gen_cumsgs!("invalid/path/to/config.ron"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in the macro `gen_cumsgs` (in Nightly builds, run with -Z macro-backtrace for more info) |
5 changes: 5 additions & 0 deletions
5
core/cu29_derive/tests/compile_fail/cu_msg/invalid_logging_config.rs
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
use cu29_derive::gen_cumsgs; | ||
|
||
gen_cumsgs!("config/invalid_logging_config.ron"); | ||
|
||
fn main() {} |
8 changes: 8 additions & 0 deletions
8
core/cu29_derive/tests/compile_fail/cu_msg/invalid_logging_config.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: Section size (2 MiB) cannot be larger than slab size (1 MiB). Adjust the parameters accordingly. | ||
context:None | ||
--> tests/compile_fail/cu_msg/invalid_logging_config.rs:3:1 | ||
| | ||
3 | gen_cumsgs!("config/invalid_logging_config.ron"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in the macro `gen_cumsgs` (in Nightly builds, run with -Z macro-backtrace for more info) |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
( | ||
tasks: [ | ||
( | ||
id: "task0", | ||
type: "tasks::ExampleSrc", | ||
), | ||
( | ||
id: "task1", | ||
type: "tasks::ExampleTask", | ||
), | ||
( | ||
id: "task2", | ||
type: "tasks::ExampleSink", | ||
), | ||
], | ||
cnx: [ | ||
(src: "task0", dst: "task1", msg: "i32"), | ||
(src: "task1", dst: "task2", msg: "i32"), | ||
], | ||
monitor: (type: "ExampleMonitor"), | ||
logging: ( | ||
section_size_mib: 2, | ||
slab_size_mib: 1, | ||
enable_task_logging: true | ||
) | ||
) |
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