scala / scala3

The Scala 3 compiler, also known as Dotty.
https://dotty.epfl.ch
Apache License 2.0
5.88k stars 1.06k forks source link

Multiple -d in scaladoc #12968

Closed BarkingBad closed 3 years ago

BarkingBad commented 3 years ago

Passing -d flag makes scaladoc throw warning about -d set multiple times. Probably comes from default values passed from sbt

SethTisue commented 3 years ago

It isn't clear to me this qualifies as a bug. sbt doesn't expect the user to pass -d directly; rather, it expects the user to customize Compile / doc / target.

(Also, wondering: is this any different than the Scala 2 behavior?)

vincenzobaz commented 3 years ago

Hi @SethTisue, @BarkingBad is helping me with a scaladoc tutorial and example setup and I complained about this warning. I used the -d flag instead of Compile / doc / target because it is shown in the documentation, here.

So probably this is a documentation bug rather than an implementation one :)

BarkingBad commented 3 years ago

Thanks Seth, you pointed me to the root of the problem I think. This is the line where is aggregated target value and scalacOptions value

The question is, if one wants to put the docs in the separate directory different than target/api and pass the -d option to the scalacOptions should we hide the warning for that option, or leave it as a reminder that one is overriding the target default one

dwijnand commented 3 years ago

The point is that if one wants that they should redefine Compile / doc / target, not pass the -d option. So I think there's no behavioural change to do here - but perhaps that doc page can make that clearer.

BarkingBad commented 3 years ago

Yeah, I will update the docs then