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

scaladoc warning: Flag -project set repeatedly #7487

Open
aalleexxeeii opened this issue Feb 1, 2024 · 3 comments
Open

scaladoc warning: Flag -project set repeatedly #7487

aalleexxeeii opened this issue Feb 1, 2024 · 3 comments
Labels

Comments

@aalleexxeeii
Copy link

steps

Task doc executed in Scala 3 projects with Scala versions other than 3.0.0* generates warning: Flag -project set repeatedly

problem

Probably this string comparison causes it. Maybe, the semantic version comparison should have been performed instead?

expectation

no warning

notes

@OndrejSpanel
Copy link

OndrejSpanel commented Mar 27, 2024

The warning is annoying and confusing. Please escalate. The code in question is not commented and I am unclear what its intention is:

          val projectName = name.value
          if (ScalaArtifacts.isScala3(sv)) {
            val project = if (config == Compile) projectName else s"$projectName-$config"
            if (scalaVersion.value.startsWith("3.0.0")) {
              Seq("-project", project)
            } else {
              compileOptions ++ Seq("-project", project)
            }
          } else compileOptions

@SethTisue
Copy link
Member

history: #6234, #6499

this might interest @adpi2?

@SethTisue
Copy link
Member

SethTisue commented Mar 27, 2024

Probably this string comparison causes it. Maybe, the semantic version comparison should have been performed instead?

Hard to be sure, but from the discussion on #6499, it looks to me like special-casing 3.0.0 in particular was probably intentional? Because it's already inside an isScala3 check. cc @pikinier20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants