Skip to content

Scala 2: skip mixing in IsInstantiable if mixed in already#5384

Merged
adkian-sifive merged 5 commits into
mainfrom
adkian-sifive/scala2-instantiablemacro-mixin-check
May 30, 2026
Merged

Scala 2: skip mixing in IsInstantiable if mixed in already#5384
adkian-sifive merged 5 commits into
mainfrom
adkian-sifive/scala2-instantiablemacro-mixin-check

Conversation

@adkian-sifive

@adkian-sifive adkian-sifive commented May 27, 2026

Copy link
Copy Markdown
Member

Summary

The @instantiable annotation on non-Modules is deprecated in Chisel 7 and won't be supported in Chisel 8 and Scala 3. This change will help transition away from it by allowing user code to cross compile when it has both the annotation and an explicit IsInstantiable mixin

Release Notes

User code can now have both the @instantiable annotation and an explicit IsInstantiable mixin in Scala 2 and Scala 3

Development notes

  • AI tool(s) used: Claude Code + Claude Opus 4.7

@adkian-sifive adkian-sifive added the Internal Internal change, does not affect users, will be included in release notes label May 27, 2026

@jackkoenig jackkoenig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @INSTANTIABLE annotation is deprecated in Chisel 7 and won't be supported in Chisel 8 and Scala 3. This change will help transition away from it by allowing user code to cross compile when it has both the annotation and an explicit IsInstantiable mixin

The annotation itself isn't deprecated, but using it on non-Modules is. We'll probably go ahead and deprecated it in Scala 3 though.

PR looks good other than the one comment

Comment thread macros/src/main/scala-2/chisel3/internal/InstantiableMacro.scala Outdated
Comment thread macros/src/main/scala-2/chisel3/internal/InstantiableMacro.scala
@adkian-sifive adkian-sifive merged commit d3ce5e8 into main May 30, 2026
28 checks passed
@adkian-sifive adkian-sifive deleted the adkian-sifive/scala2-instantiablemacro-mixin-check branch May 30, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Internal Internal change, does not affect users, will be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants