Giter VIP home page Giter VIP logo

Comments (5)

eed3si9n avatar eed3si9n commented on July 4, 2024 1

My recommendation is to report it as-is esp with the stacktrace.

from sbt.

eed3si9n avatar eed3si9n commented on July 4, 2024

@OndrejSpanel Even without the full reproduction, could you generally describe what is happening? Can it happen with typing compile into sbt shell?
Could you also copy-paste full stack trace to Gist, if it's available? From the error message, it seems like the error is coming from Scala 3, not sbt:
https://github.com/scala/scala3/blob/06ffc8c02aa9a152765f88b49e44d8c759f1284a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala#L1271-L1277

from sbt.

OndrejSpanel avatar OndrejSpanel commented on July 4, 2024

Yes, it happens with compile, when using Java 17 or 21 and when there are errors in my code.

Exception is shown just below [info] compiling and above any errors coming from my project. If there are no errors, no exception is shown. Also, not all errors cause it to appear, but I have one which reproduced it anytime so far.

the error is coming from Scala 3, not sbt:

That may well be, but the thing it is reporting the java9-rt-ext-eclipse_adoptium_21_0_3\rt.jar is some stuff SBT is generating, is it not?

Could you also copy-paste full stack trace to Gist, if it's available?

Luckily it is easy to reproduce in my project.

I was able to attach the debugger to sbt and here is the callstack: https://gist.github.com/OndrejSpanel/df207819ccc5cfe845356e357f964db4

The top is:

assertFailed:8, Scala3RunTime$ (scala.runtime)
classSymbol:1277, ClassfileParser$innerClasses$ (dotty.tools.dotc.core.classfile)
classNameToSymbol:320, ClassfileParser (dotty.tools.dotc.core.classfile)
getClassSymbol:1365, ClassfileParser (dotty.tools.dotc.core.classfile)
getClassSymbol:1326, ClassfileParser$ConstantPool (dotty.tools.dotc.core.classfile)
getSuperClass:176, ClassfileParser$AbstractConstantPool (dotty.tools.dotc.core.classfile)
parseParents$1:380, ClassfileParser (dotty.tools.dotc.core.classfile)
parseClass:395, ClassfileParser (dotty.tools.dotc.core.classfile)

from sbt.

eed3si9n avatar eed3si9n commented on July 4, 2024

the java9-rt-ext-eclipse_adoptium_21_0_3\rt.jar is some stuff SBT is generating, is it not?

Yea, but it's just a copy of rt.jar so we can pass it to scalac. If you could reproduce it just by using command line Scala 3 that might be more definite, but if the stacktrace comes from the compiler, it's usually a compiler or compiler bridge issue.

from sbt.

OndrejSpanel avatar OndrejSpanel commented on July 4, 2024

OK. Now what? I guess as it is now it is not in a good shape to be reported as Scala 3 issue. Do you have any advice on minimizing this? The project is quite large, how can I find what parts are likely to be necessary?

from sbt.

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.