TastyInspector.inspectTastyFilesInJar doesn't inspect jar
See original GitHub issueCompiler 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:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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).
Yes, this was fixed by #13254