Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implicit helpers exposed via package not available with -Xsource:3 and Scala 3 #1949

Open
bjaglin opened this issue Mar 1, 2024 · 1 comment

Comments

@bjaglin
Copy link
Collaborator

bjaglin commented Mar 1, 2024

Exposed by https://github.com/bjaglin/scalafix-rules/actions/runs/8108465163/job/22161731871

[error] /home/runner/work/scalafix-rules/scalafix-rules/rules/src/main/scala/fix/RemoveSamePackageImport.scala:12:22: Implicit method XtensionCollectionLikeUI was found in a package prefix of the required type, which is not part of the implicit scope in Scala 3.
[error] For migration, add `import scala.meta.transversers.Api.XtensionCollectionLikeUI`.
[error] Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=fix.RemoveSamePackageImport.fix.pkgOpt
[error]     val pkgOpt = doc.tree.collect { case pkg: Pkg =>

We should investigate if there is a way to change the implicit structure to make that transparent.

@bjaglin
Copy link
Collaborator Author

bjaglin commented Aug 17, 2024

This likely comes from changes in implicit resolution:

Package prefixes no longer contribute to the implicit search scope of a type

@bjaglin bjaglin changed the title scalafix-core: implicit helpers not available with -Xsource:3 on 2.13.13 implicit helpers exposed via package not available with -Xsource:3 and Scala 3 Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant