Skip to content

Annotations don't appear to unpickle correctly idk #10198

Closed
@djspiewak

Description

@djspiewak

The error I get is as follows:

[error] undefined: new simulacrum.noop # 1982310: TermRef(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),module simulacrum),noop),<init>) at sbt-api
[warn] sbt-api: Unhandled type class dotty.tools.dotc.core.Types$$anon$7 : <error undefined: new simulacrum.noop # 1982310: TermRef(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),module simulacrum),noop),<init>) at sbt-api>

You can reproduce this by attempting to build Cats Effect series/2.x branch against Cats 2.3.0-M1 removing the withDottyCompat on the dependencies. We originally thought this was because simulacrum-scalafix was being stripped from the Cats POM, but I removed that in this PR, published locally, and still see the above.

Just to push even further, I explicitly added "org.typelevel" %% "simulacrum-scalafix-annotations" % "0.5.1" % Provided to the core libraryDependencies and it appears to have gotten further. I think I also have to add it to laws, but you see where this is going. It just generally appears that annotations, defined in Scala and published against Dotty, when used by an upstream project, do not correctly parse on the downstream project unless the annotation library is a direct dependency.

This is probably fixable by removing % Provided in the Cats build, but then simulacrum-scalafix is on everyone's classpath randomly.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions