question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TastyInspector.inspectTastyFilesInJar doesn't inspect jar

See original GitHub issue

Compiler version

3.0.0-RC1

Minimized code

I took the code from some files in tests directory.

The only difference is that test files from dotty repo extract jars somehow from classpath. I tried to run it against local jars.

import scala.quoted.*
import scala.tasty.inspector.*

@main def Test = {
  val inspector = new Inspector {
    def inspect(using Quotes)(tastys: List[Tasty[quotes.type]]): Unit = {
      println("Size:" + tastys.size.toString)
      for tasty <- tastys do
        tasty.ast.show(using quotes.reflect.Printer.TreeStructure)
    }
  }

  val jar = "$any_jar_with_tasty" // for example `cs fetch org.scala-lang:scala3-compiler_3.0.0-RC1:3.0.0-RC1 | grep scala3-compiler`
  TastyInspector.inspectTastyFilesInJar(jar)(inspector)
}

Output

Size: 0

Expectation

scala3-compiler has tasty files so there should be some Tasty passed into inspect

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
joderskycommented, Jun 16, 2021

Should I create a new issue? I can confirm that under Scala 3.0.0, the tasty inspector only finds tasty files in jars if they are at the top level (i.e. their zip file entry does not contain a slash).

0reactions
nicolasstuckicommented, Aug 24, 2021

Yes, this was fixed by #13254

Read more comments on GitHub >

github_iconTop Results From Across the Web

Viewing the Contents of a JAR File
This command will display the JAR file's table of contents to stdout. You can optionally add the verbose option, v, to produce additional...
Read more >
Viewing the contents of a JAR file - Stack Overflow
I can't seem to view the contents of a JAR file, I tried it using various decompilers, but doesn't seem to work on...
Read more >
Viewing Contents of a JAR File | Baeldung
Reviewing the jar Command​​ The jar command is pretty convenient to use if our system has a JDK installed. However, sometimes, we want...
Read more >
lampepfl/dotty: The Scala 3 compiler, also known as ... - GitHub
The Scala 3 compiler, also known as Dotty. Contribute to lampepfl/dotty development by creating an account on GitHub.
Read more >
Inspecting and extracting JAR files from the command line
This post guides you through how to inspect and extract JAR files from the command line.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found