Comments (6)
It doesn't work with structs with generics.
See https://github.com/facebookexperimental/MIRAI/blob/main/documentation/Overview.md#entry-points
from mirai.
The issue with the environmental variable seems real. cargo will rebuild things when it detects changes in compiler flags, but it happily ignores MIRAI_FLAGS. That is probably fixable.
By default, MIRAI will only show you diagnostics for source locations rooted in the crate being built. That is a very much a feature. I am none too sure what you are trying to do here, so I can't say off hand whether this is an issue that needs fixing. Can you add some details in the form of an actual project that I can debug?
from mirai.
https://github.com/planetoryd/mirai_issue/blob/master/src/lib.rs
It doesn't work with structs with generics.
I just found another issue, it suppresses diagnostics if with print_function_names
, which I think is inconsistent
hash@hash-pc /s/mirai_issue (master)> cargo clean
hash@hash-pc /s/mirai_issue (master)> MIRAI_FLAGS="--diag=paranoid" cargo mirai
Compiling proc-macro2 v1.0.67
Compiling unicode-ident v1.0.12
Compiling syn v1.0.109
Checking mirai-annotations v1.12.0
Compiling quote v1.0.33
Compiling contracts v0.6.3
Checking mirai_issue v0.1.0 (/space/mirai_issue)
warning: provably false verification condition
--> src/lib.rs:7:5
|
7 | verify!(false);
| ^^^^^^^^^^^^^^
warning: provably false verification condition
--> src/lib.rs:14:9
|
14 | verify!(false)
| ^^^^^^^^^^^^^^
warning: `mirai_issue` (lib) generated 2 warnings
Finished dev [unoptimized + debuginfo] target(s) in 3.78s
hash@hash-pc /s/mirai_issue (master)> cargo clean
hash@hash-pc /s/mirai_issue (master)> MIRAI_FLAGS="--print_function_names --diag=paranoid" cargo mirai
Compiling proc-macro2 v1.0.67
Compiling unicode-ident v1.0.12
Compiling syn v1.0.109
Checking mirai-annotations v1.12.0
Compiling quote v1.0.33
Compiling contracts v0.6.3
Checking mirai_issue v0.1.0 (/space/mirai_issue)
src/lib.rs:6:1: 6:17 (#0): /mirai_issue/working()->()
src/lib.rs:13:5: 13:30 (#0): /mirai_issue/Empty::without_generics()->()
src/lib.rs:21:5: 21:27 (#0): /mirai_issue/Gen::<T>::with_generics()->()
Finished dev [unoptimized + debuginfo] target(s) in 3.82s
from mirai.
print_function_names is a very specialized use of MIRAI. Also, printing diagnostics does not seem universally expected and would not be welcomed by the principal users of the feature.
from mirai.
It also doesn't work with tests. https://github.com/planetoryd/mirai_issue/blob/53f4884353344e6dac42e9a0bfe68023ec5cd7db/src/lib.rs#L32 (updated code)
from mirai.
It also doesn't work with tests. https://github.com/planetoryd/mirai_issue/blob/53f4884353344e6dac42e9a0bfe68023ec5cd7db/src/lib.rs#L32 (updated code)
See #1239
from mirai.
Related Issues (20)
- Environment variable MIRAI_FLAGS or MIRAI_LOG do not work HOT 2
- MIRAI fails analysing: error: could not compile <bin> HOT 2
- feature request: Annotating traits for attaching tags HOT 3
- question: propagation through closure containing tagged values HOT 14
- suggestion: add example + usage in the README HOT 1
- Memory Usage for rebuild_std.sh HOT 3
- Question: Foreign contracts HOT 6
- Add JSON structure reporting HOT 1
- MIRAI only sees one member of a workspace HOT 4
- Compiler unexpectedly panicked when execute `cargo mirai`
- How to pass `--cfg` to mirai? HOT 1
- Does the behavior of add_tag!() and does_not_have_tag!() be affected by type and clone()? HOT 1
- Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT
- Is it possible for it to work with async code
- OOM during cargo mirai project analysis
- MacOS Mirai errors HOT 1
- Panic while compiling `libm` HOT 3
- Panic on `std::f64::<impl f64>::log2` HOT 1
- Compilation issues on older versions of crates
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mirai.