Skip to content

Conversation

@eejbyfeldt
Copy link
Contributor

@eejbyfeldt eejbyfeldt commented Dec 14, 2025

If ones removes the line Compile / doc / sources := Nil, from the build and run sbt doc one get warnings like:

[warn] -- Warning: modules/deriving/src/main/scala/shapeless3/deriving/kinds.scala:66:7
[warn] 66 |  type Kind[M <: Mirror, O <: Up] = (M of O) { type Kind = self.type }
[warn]    |       ^
[warn]    |       Couldn't resolve a member for the given link query: Mirror

Based on the dicussion in scala/scala3#20028 my understanding is that this means that scaldoc can not resolve the existing link.

The reason I want to fix this is that it will also show up for users implementing custom Kinds. E.g in some private project where I extends Kind I get warnings like this in my scaladoc:

[warn] -- Warning: modules/deriving/src/main/scala/shapeless3/deriving/kinds.scala:66:7
[warn] Couldn't resolve a member for the given link query: Mirror

(the error changed slighlty in the latest Scala 3 version). Since I don't think this is solvable for a user I suggest that we just make the links absolute which seems to solve the warnings.

If ones removes the line `Compile / doc / sources := Nil,` from the
build and run `sbt doc` one get warnings like:
```
[warn] -- Warning: modules/deriving/src/main/scala/shapeless3/deriving/kinds.scala:66:7
[warn] 66 |  type Kind[M <: Mirror, O <: Up] = (M of O) { type Kind = self.type }
[warn]    |       ^
[warn]    |       Couldn't resolve a member for the given link query: Mirror
```
Based on the dicussion in scala/scala3#20028
my understanding is that this means that scaldoc can not resolve the
existing link.

The reason I want to fix this is that it will also show up for users
implementing custom `Kinds`. E.g in some private project where I extends
Kind I get warnings like this in my scaladoc:
```
[warn] -- Warning: modules/deriving/src/main/scala/shapeless3/deriving/kinds.scala:66:7
[warn] Couldn't resolve a member for the given link query: Mirror
```
(the error changed slighlty in the latest Scala 3 version). Since I
don't think this is solvable for a user I suggest that we just make the
links absolute which seems to solve the warnings.
@joroKr21
Copy link
Member

Would also remove that line? Not sure why it's there:

Compile / doc / sources := Nil

@eejbyfeldt
Copy link
Contributor Author

Sure. Removed it in the latest commit. There are also warnings like

warn] -- Warning: modules/deriving/src/main/scala/shapeless3/deriving/annotation.scala:222:6 
[warn] 222 |trait AllAnnotations[T] extends Serializable:
[warn]     |      ^
[warn]     |Couldn't resolve a member for the given link query: shapeless.Annotations

where we in the docs we want to link to something in shapeless2. Not sure what the correct fix is there.

@joroKr21
Copy link
Member

where we in the docs we want to link to something in shapeless2. Not sure what the correct fix is there.

The correct fix would be to not use a link I guess since it won't work anyway - just use format as code

@joroKr21 joroKr21 merged commit 2e3cc7b into typelevel:main Dec 15, 2025
6 checks passed
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