Giter Club home page Giter Club logo

Comments (6)

rfindler avatar rfindler commented on August 19, 2024

from redex.

rfindler avatar rfindler commented on August 19, 2024

I got an offline messages from someone else suggesting I should elaborate a little bit. It may be that you're running outside of DrRacket / with errortrace turned off for performance reasons. And redex code seems to benefit more than other code for doing that so that makes sense as a default. Redex, however, has a bunch of code to cooperate with errortrace so that the source locations are helpful when errortrace is turned on. So my recommendation would be to temporarily turn it back on to get a source location for the error when things like this happen. If running in DrRacket isn't convenient for some reason, then a command line invocation like this one:

racket -l errortrace -l racket/base -e '(require (submod "x.rkt" test))'

where "x.rkt" is replaced with your filename should also do the trick.

(If there is a situation where using errortrace like that still gives a bad source location, that's a bug (and fixable), so please send me something to reproduce it so I can find it (it is okay if it is a lot of code; that won't matter for this kind of bug, I believe.)

from redex.

nikomatsakis avatar nikomatsakis commented on August 19, 2024

@rfindler I'm currently using raco outside of dr-racket because it's running on a server without X11 enabled. I can certainly try enabling errortrace; is the -l option something I can also pass to raco?

from redex.

rfindler avatar rfindler commented on August 19, 2024

You'd need to use a command-line like the racket one I posted, I believe. raco test runs test submodules, and so that's why there is the require there. There may be a more convenient way to do this, but I'm not sure what it is. I don't see an argument to raco test that turns errortrace on (but adding one does seem like a good idea).

If you're running in CI or something like that, you might want to leave errortrace out of it and use errortrace only for debugging locally on your machine, tho.

from redex.

nikomatsakis avatar nikomatsakis commented on August 19, 2024

OK, next time I get an error like this, I will give it a try, thanks.

I am wondering: how hard would it be for the where/error failure message to include more information? That would already be enough a lot of the time.

from redex.

nikomatsakis avatar nikomatsakis commented on August 19, 2024

OK, I tried it, and it worked! Thanks.

from redex.

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.