Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lolgab
Copy link
Member

@lolgab lolgab commented Mar 16, 2025

Scala Native supports ServiceProvider which allows loading implementations for interfaces using reflection. To avoid bloating binaries with all available implementations, Scala Native requires to set at build time the implementations that are used.
This PR adds support for it in Mill.

Pull Request: #4736

@lolgab lolgab marked this pull request as ready for review March 16, 2025 15:10
@lolgab lolgab requested review from lefou and lihaoyi March 17, 2025 08:01
@lihaoyi
Copy link
Member

lihaoyi commented Mar 17, 2025

Could you flesh out the scaladoc? What is this Map[String, Seq[String]] datastructure and what do the various elements in that map mean?

@lolgab lolgab requested a review from lihaoyi March 17, 2025 11:08
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Out of curiosity. Are the typical files under META-INF still relevant?

@lolgab
Copy link
Member Author

lolgab commented Mar 17, 2025

Looks good to me.

Out of curiosity. Are the typical files under META-INF still relevant?

Yes, they are :)
This is a feature to contain binary sizes avoid avoid bundling all possible implementations in a binary.

@lolgab lolgab merged commit f8b6c83 into com-lihaoyi:main Mar 17, 2025
29 of 33 checks passed
@lolgab lolgab deleted the nativeServiceProviders branch March 17, 2025 18:07
lolgab added a commit to lolgab/mill that referenced this pull request Mar 17, 2025
…4736)

Scala Native supports `ServiceProvider` which allows loading
implementations for interfaces using reflection. To avoid bloating
binaries with all available implementations, Scala Native requires to
set at build time the implementations that are used.
This PR adds support for it in Mill.

Pull Request: com-lihaoyi#4736
@lefou lefou added this to the 0.13.0 milestone Mar 17, 2025
lihaoyi pushed a commit that referenced this pull request Jul 21, 2025
…kport #4736) (#4744)

Scala Native supports `ServiceProvider` which allows loading
implementations for interfaces using reflection. To avoid bloating
binaries with all available implementations, Scala Native requires to
set at build time the implementations that are used. This PR adds
support for it in Mill.

Pull Request: #4744

Co-authored-by: Tobias Roeser <[email protected]>
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.

3 participants