Skip to content

Commit 97264ae

Browse files
committed
[#349] Add a FAQ_ICEORYX_DEVS.md
1 parent f2735b7 commit 97264ae

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

FAQ_ICEORYX_DEVS.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Frequently Asked Questions - iceoryx Developer Edition
2+
3+
## Tests marked with `#[should_panic]` attribute do not panic in release builds
4+
5+
This usually happens when the panic is triggert via a `debug_assert` macro.
6+
This macro is not active when the `-C debug-assertions` flag is not set, which
7+
is the case for release builds.
8+
To fix this problem, just add a `#[cfg(debug_assertions)]` to the test.
9+
10+
```rs
11+
#[test]
12+
#[should_panic]
13+
#[cfg(debug_assertions)]
14+
fn accessing_uninitialized_foo_fails() {
15+
// ...
16+
}
17+
```
18+
19+
## The bazel build fails with an error mentioning `crate_index`, `manifest` and `Cargo.toml`
20+
21+
The error looks similar to this:
22+
23+
```ascii
24+
An error occurred during the fetch of repository 'crate_index'
25+
...
26+
Error computing the main repository mapping: no such package '@@crate_index//'
27+
...
28+
Error: Some manifests are not being tracked. Please add the following labels to the `manifests` key: {
29+
"//iceoryx2-foo/bar:Cargo.toml",
30+
}
31+
```
32+
33+
It seems a new crate is added to the root `Cargo.toml` and bazel is complaining
34+
that it is not added to the `WORKSPACE.bazel` file for the `crate_index` target.

0 commit comments

Comments
 (0)