Git Product home page Git Product logo

pretty-stacktraces's People

Contributors

alexarchambault avatar barkingbad avatar kacperfkorban avatar romanowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pretty-stacktraces's Issues

Cannot disambiguate frames for apply-invoked functions

Calling function by name.apply(...) generate the same bytecode as name(...), but generated TASTY tree contains additional level of nested $anonfun. Can be problematic while disambiguating such functions called inside of another lambda.

StacktracesInspector.inspectStackTrace unconditionally prints error to stdout

If a tasty file of an incompatible version is passed to the inspectStackTrace method, the error message is uncondittionally printed to stderr. There's no way to suspend it. The method should indeed return error but it should not pollute stderr without user's knowledge.
In the case below, the "Runner.tasty" file was built with scala 3.0.2, while the script is using 3.1.0.
Repro

// using scala "3.1.0"
// using lib "org.virtuslab::pretty-stacktraces:0.0.1-M1"

import org.virtuslab.stacktraces.core.StacktracesInspector
import java.io.File
import scala.util.Try

@main def main = {
  val ex = new Exception("")
  val e =  ex.getStackTrace.head
  Try{StacktracesInspector.inspectStackTrace(e, new File("/tmp/runner_3.jar_sources3392797399715882651/scala/cli/runner/Runner.tasty"))}
}

Expected:
No output

Actual:
Prints

error while loading Typeable$package$,
class file scala/reflect/Typeable$package.class is broken, reading aborted with class dotty.tools.tasty.UnpickleException
TASTy signature has wrong version.
 expected: {majorVersion: 28, minorVersion: 0}
 found   : {majorVersion: 28, minorVersion: 1}

This TASTy file was produced by a more recent, forwards incompatible release.
To read this TASTy file, please upgrade your tooling.
The TASTy file was produced by Scala 3.1.0-bin-nonbootstrapped.
error while loading Quotes$package$,
class file scala/quoted/Quotes$package.class is broken, reading aborted with class dotty.tools.tasty.UnpickleException
TASTy signature has wrong version.
 expected: {majorVersion: 28, minorVersion: 0}
 found   : {majorVersion: 28, minorVersion: 1}

This TASTy file was produced by a more recent, forwards incompatible release.
To read this TASTy file, please upgrade your tooling.
The TASTy file was produced by Scala 3.1.0-bin-nonbootstrapped.
error while loading Expr$,
class file scala/quoted/runtime/Expr.class is broken, reading aborted with class dotty.tools.tasty.UnpickleException
TASTy signature has wrong version.
 expected: {majorVersion: 28, minorVersion: 0}
 found   : {majorVersion: 28, minorVersion: 1}

This TASTy file was produced by a more recent, forwards incompatible release.
To read this TASTy file, please upgrade your tooling.
The TASTy file was produced by Scala 3.1.0-bin-nonbootstrapped.

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.