Skip to content

Commit

Permalink
Acknowledge TASTY as known ClassFile attribute in ijar
Browse files Browse the repository at this point in the history
Currently producing `ijar` using Scala 3 produces the following warnings:
```
ijar: skipping unknown attribute: "TASTY".
```

TASTY is a Scala 3 specific ClassFile attribute and informs that for given `.class` file there is also emmited as `.tasty` file (these were handled in #12529). It can be consumed in the same way as currently handled `Scala` and `ScalaSig` attributes.
Handling that should remove redundant warnings

Here's example on how this attribute is emmited:
https://github.com/scala/scala3/blob/91ef92159c628eaeab8311dc82bed7ed4fe03c63/compiler/src/dotty/tools/backend/jvm/CodeGen.scala#L92-L110

Closes #24165.

PiperOrigin-RevId: 693863203
Change-Id: If811be3a725251b9c9db8ac2c92245fa58bdbfc8
  • Loading branch information
WojciechMazur authored and copybara-github committed Nov 6, 2024
1 parent ecd2967 commit 78afd0b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions third_party/ijar/classfile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1560,9 +1560,8 @@ void HasAttrs::ReadAttrs(const u1 *&p) {
attr_name == "RuntimeInvisibleParameterAnnotations") {
attributes.push_back(
ParameterAnnotationsAttribute::Read(p, attribute_name));
} else if (attr_name == "Scala" ||
attr_name == "ScalaSig" ||
attr_name == "ScalaInlineInfo" ||
} else if (attr_name == "Scala" || attr_name == "ScalaSig" ||
attr_name == "ScalaInlineInfo" || attr_name == "TASTY" ||
attr_name == "TurbineTransitiveJar") {
// These are opaque blobs, so can be handled with a general
// attribute handler
Expand Down

0 comments on commit 78afd0b

Please sign in to comment.