Giter Club home page Giter Club logo

Comments (2)

davidlattimore avatar davidlattimore commented on May 20, 2024

Thanks for trying Rerast and sorry it's giving such an unhelpful error message. When you say "occasionally" - does it succeed if you rerun the same command on the same source, or is it consistent until you've edited the source? When it happens, can you confirm that "cargo check" succeeds?

I'm assuming the project is one that you can't share? If that's the case, I might need to do an overhaul of the error reporting to try to get the message to be more helpful. Although I should probably do that anyway. I can't find 'Unexpected character' in either the rerast source, nor the rustc source, so I'm not sure where it's coming from.

from rerast.

davidlattimore avatar davidlattimore commented on May 20, 2024

Woohoo, I just reproduced this and then was able to figure out what was happening. Rerast calls "cargo check" in order to get the rustc command lines needed in order to build the local targets, when doing this, rerast acts as a wrapper around the compiler and prints out the command line as a JSON string which is then picked up and read by the parent rerast process. However if there are multiple build targets - e.g. if there are integration tests - cargo will run the "compiler" (rerast) multiple times in parallel. The outputs were getting interleaved resulting in corrupted JSON. The fix is simple - add -j 0 to the cargo check command line in order to not run things in parallel. I'll also improve the error reporting if/when we do get JSON parse errors. Fix should be in the next release. Sorry for the delay and thanks again for the report.

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.