Skip to content

Conversation

@lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Feb 10, 2024

No description provided.

sources: Seq[os.Path],
dataDirs: Seq[os.Path],
sourceRoot: os.Path
@Unroll sourceRoot: os.Path = null
Copy link
Member

Choose a reason for hiding this comment

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

Can you elaborate how the use of the unroll plugin changes the code? Will API users who freshly compile against the binary code, always use the new API? Are the backward-compatible stubs only for binary compat, or are they still public non-deprecated API?

Copy link
Member Author

Choose a reason for hiding this comment

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

@lefou it generates bincompat forwarder overloads. The plugin repo has some description and links to further discussion. I hope to get this into the Scala language via a SIP

https://github.com/com-lihaoyi/unroll

For now, the generated forwarders aren't hidden. It doesn't really matter, since it's just a forwarder, calling it does the same thing as calling the "real" definition. There's some discussion on how to hide them, but nothing really decided upon

Copy link
Member

Choose a reason for hiding this comment

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

Understood. Would be nice if there is an option to mark the forwarders as deprecated, since then, it's in the hand of the API user to hack around them and produce bytecode that may be more safe, if needed. But it's not needed here, I think.

build.sc Outdated
def scalacPluginIvyDeps =
super.scalacPluginIvyDeps() ++
Agg(Deps.acyclic) ++
Agg(ivy"com.lihaoyi::unroll-plugin:0.1.9") ++
Copy link
Member

Choose a reason for hiding this comment

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

We should move this into Deps.unroll or Deps.scalac.unroll.

@lihaoyi lihaoyi marked this pull request as draft February 10, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants