Giter Club home page Giter Club logo

Comments (4)

davidlattimore avatar davidlattimore commented on May 18, 2024

Thanks for the report. I tried your rule exactly as written and it worked for me. Initially however I wasn't getting any matches. After some investigation, it seems that the code that does a sort of local "cargo clean" isn't working any more, so it wasn't attempting to match any code at all. Could you try doing a "cargo clean" before running your rule and see if that helps?

If cargo clean doesn't help, could you supply some code that you think should be matched but isn't?

For background, when you run cargo rerast, it runs "cargo check", but with rerast as the compiler. If cargo thinks everything has already been built/checked, it never calls rerast. So I have a stage that queries cargo to determine bits of the local crate that can be built, then asks cargo to clean those artifacts. That way when it runs cargo check, it'll rerun the "compiler" (rerast) for those targets.

Not sure what might be wrong with it, but I'll have a look this evening.

from rerast.

davidlattimore avatar davidlattimore commented on May 18, 2024

Oh, and regarding the use of return, yep that's the way to do it. I should probably expand the README to cover this case. Actually, perhaps I should add a new section to the documentation with a larger number of sample rules. You can if you prefer replace the last line of your rule with unreachable!() - that's what I do in my tests that have return types.

from rerast.

kornelski avatar kornelski commented on May 18, 2024

Thanks! It turned out it was PEBKAC. I've been testing on cc-rs, where only uses of try! are in a module that is compiled only conditionally, not on my platform.

More examples in the README would be super helpful.

from rerast.

davidlattimore avatar davidlattimore commented on May 18, 2024

Cool. Glad you tracked it down and thanks for using rerast. I've raised #10 to resolve the issue I mentioned above. I'll also try to have a look at the other issues you raised. Thanks for the reports!

from rerast.

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.