GithubHelp home page GithubHelp logo

Comments (6)

hermanventer avatar hermanventer commented on June 9, 2024 1

It doesn't work with structs with generics.

See https://github.com/facebookexperimental/MIRAI/blob/main/documentation/Overview.md#entry-points

from mirai.

hermanventer avatar hermanventer commented on June 9, 2024

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.

planetoryd avatar planetoryd commented on June 9, 2024

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.

hermanventer avatar hermanventer commented on June 9, 2024

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.

planetoryd avatar planetoryd commented on June 9, 2024

It also doesn't work with tests. https://github.com/planetoryd/mirai_issue/blob/53f4884353344e6dac42e9a0bfe68023ec5cd7db/src/lib.rs#L32 (updated code)

from mirai.

hermanventer avatar hermanventer commented on June 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.