Skip to content

scaladoc issues "Flag -classpath set repeatedly" warning, when classpath is set only once #22875

Open
@arixmkii

Description

@arixmkii
Contributor

Compiler version

3.6.4

Minimized code

A.scala

class A

B.scala

class B extends A

Project setup:

tree
.
├── a
│   └── A.scala
├── b
│   └── B.scala
└── o

4 directories, 2 files

Output

pushd a ; scalac A.scala ; popd

pushd b ; scalac -classpath ../a B.scala ; popd

scaladoc -d o -project b -classpath a b/B.tasty
Flag -classpath set repeatedly
1 warning found

Expectation

No warning issued by scaladoc as classpath is only set once in the command line

Activity

arixmkii

arixmkii commented on Mar 26, 2025

@arixmkii
ContributorAuthor

It actually could be minimized into

A.scala

class A

and then

scalac A.scala

mkdir -p o

scaladoc -d o -classpath /dev/null A.tasty
Flag -classpath set repeatedly
1 warning found
arixmkii

arixmkii commented on Mar 26, 2025

@arixmkii
ContributorAuthor

Reproduced with 3.7.0-rc1

~/Downloads/scala3-3.7.0-RC1-aarch64-apple-darwin/bin/scaladoc -d o -classpath /dev/null A.tasty
Flag -classpath set repeatedly
1 warning found
added and removed
stat:needs triageEvery issue needs to have an "area" and "itype" label
on Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Gedochao@arixmkii

        Issue actions

          `scaladoc` issues "Flag -classpath set repeatedly" warning, when classpath is set only once · Issue #22875 · scala/scala3