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

<object> is already defined as trait ... #21

Open
abrighton opened this issue Oct 26, 2015 · 4 comments
Open

<object> is already defined as trait ... #21

abrighton opened this issue Oct 26, 2015 · 4 comments

Comments

@abrighton
Copy link

Unidoc is giving me errors when a trait or class has a companion object.

For example:
RunId is already defined as object RunId
RunId is already defined as case class RunId

The project containing the class is a scala/scala.js shared "crossProject" in a multi-project build (scala-2.11.7) .
When I remove the shared project, the unidoc problems go away.
This seems to also be a problem with the sbt gh-pages plugin.

@julienrf
Copy link

I have the same problem. Is there any known workaround?

@taig
Copy link

taig commented Feb 7, 2017

Explicitly disabling the javascript modules should solve that:

unidocProjectFilter in ( ScalaUnidoc, unidoc ) :=
    inAnyProject -- inProjects( i18nJS, schemaJS )

@xerial
Copy link

xerial commented Feb 16, 2018

@taig Thanks. Explicitly removing JS projects worked for me. But I guess sbt-unidoc is including projects not mentioned in aggregate when building scaladoc.

@scottweaver
Copy link

I encountered the same issue whilst using the sbt-scala-crossproject plugin. @taig's approach works here as well. In this case, by disabling all but one of the versions.

lazy val root = project.in(file("."))
  .settings(
    autoAPIMappings := true,
    unidocProjectFilter in ( ScalaUnidoc, unidoc ) :=
      inAnyProject -- inProjects( models_2_11 )
  )
  .enablePlugins(ScalaUnidocPlugin)
  .aggregate(models_2_12)

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

No branches or pull requests

5 participants