Giter Club home page Giter Club logo

Comments (5)

ForbesLindesay avatar ForbesLindesay commented on May 22, 2024

Stack trace manipulation isn't very well specified (hopefully this will change), and it's fraught with performance issues (which is unlikely to change any time soon). As such it shouldn't be part of the spec. Incidentally if you're using the latest version of Q you can control how much stack trace info will be kept by using Q.longStackJumpLimit. You should set it to 0 in production, and be aware that very large numbers will cause serious memory issues for long promise chains. I think it defaults to about 2

from promises-spec.

domenic avatar domenic commented on May 22, 2024

@ForbesLindesay for the record on Q: 0.8.5 onward has had one-level "long" stack tracing, with the ability to control it only introduced in the unreleased Q 0.9. It's defaulting to 1 right now, since I still haven't written the code to stitch together multiple jumps, but hopefully before 0.9 is released multiple levels will be allowed with a default of maybe 5.

But yes, I agree that this isn't something we can really specify or mandate, for performance reasons if nothing else.

Although, maybe coming up with a standard for long traces generally would be good? Maybe not within scope of Promises/A+, but standardizing on "From previous event:" or similar would be nice!

from promises-spec.

ForbesLindesay avatar ForbesLindesay commented on May 22, 2024

Would be interesting to see if two libraries that both did long stack traces (with several jumps) could be made to inter-operate nicely to produce the full long stack trace from both libraries.

from promises-spec.

domenic avatar domenic commented on May 22, 2024

^ oh woah, interesting idea.

from promises-spec.

ForbesLindesay avatar ForbesLindesay commented on May 22, 2024

I don't know of any other libraries that do it though.

from promises-spec.

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.