forked from eclipse-iceoryx/iceoryx2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[eclipse-iceoryx#349] Add a FAQ_ICEORYX_DEVS.md
- Loading branch information
1 parent
f2735b7
commit 97264ae
Showing
1 changed file
with
34 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Frequently Asked Questions - iceoryx Developer Edition | ||
|
||
## Tests marked with `#[should_panic]` attribute do not panic in release builds | ||
|
||
This usually happens when the panic is triggert via a `debug_assert` macro. | ||
This macro is not active when the `-C debug-assertions` flag is not set, which | ||
is the case for release builds. | ||
To fix this problem, just add a `#[cfg(debug_assertions)]` to the test. | ||
|
||
```rs | ||
#[test] | ||
#[should_panic] | ||
#[cfg(debug_assertions)] | ||
fn accessing_uninitialized_foo_fails() { | ||
// ... | ||
} | ||
``` | ||
|
||
## The bazel build fails with an error mentioning `crate_index`, `manifest` and `Cargo.toml` | ||
|
||
The error looks similar to this: | ||
|
||
```ascii | ||
An error occurred during the fetch of repository 'crate_index' | ||
... | ||
Error computing the main repository mapping: no such package '@@crate_index//' | ||
... | ||
Error: Some manifests are not being tracked. Please add the following labels to the `manifests` key: { | ||
"//iceoryx2-foo/bar:Cargo.toml", | ||
} | ||
``` | ||
|
||
It seems a new crate is added to the root `Cargo.toml` and bazel is complaining | ||
that it is not added to the `WORKSPACE.bazel` file for the `crate_index` target. |