question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't execute scaladoc for `publishLocal`

See original GitHub issue

steps

publishLocal always runs Scaladoc. I cannot think of any case where this is useful, I’m open to ideas.

problem

  1. Slows down publishLocal. 1.1. Relevant for sbt plugins. 1.2. Relevant for source dependencies (where jars are used for dependencies). 1.3. Relevant for any user that wants to test jars locally (pretty common in enterprises).

expectation

publishLocal does not execute Scaladoc.

Is this a welcome contribution?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:9
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
chescommented, May 7, 2020

It should be treated as the name suggest, a publishing step, so I think it makes sense to keep Scaladoc in there. The reason you might want to publish things locally could be for rehearsal of actual publishing

I can agree with this, for a piece of anecdata, today I had publishing fail for one cross version of one module in a build, because scaladoc caused scalac to fail (not just a bad link, a more fun scala.reflect.internal.FatalError: bad constant pool tag, but I digress—the details are not relevant here).

Is that a common enough case to block a default of a common workflow? Maybe not. Would I have a publishLocal step in a CI environment just to fail and prevent incomplete remote publishing in a case like this? I wouldn’t have considered it before, but now I actually might, unless sbt someday supports atomic multi-module publishing when aggregating.

So none of this is to say that there would be no value in a form of “light mode” or intuitive setting like skipDoc in publishLocal, but I do like the confidence that comes with publishLocal and publishM2 staying close to “full fidelity” by default.

2reactions
mkurzcommented, Mar 5, 2020

Setting

publishArtifact in (Compile, packageDoc) := false

will also prevent docs from being published when using publish. This is maybe not what you want (?)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable sbt subproject doc generation - scala - Stack Overflow
I'm using the excellent sbt-unidoc plugin to create a single, unified scaladoc API for the entire library (macro + core combined). Unfortunately ...
Read more >
Error when running sbt docker:publishLocal - Lagom
Hi, in our lagom project when we execute sbt docker:publishLocal we get ... doc) Scaladoc generation failed [error] (Docker / publishLocal) ...
Read more >
sbt/sbt-native-packager - Gitter
I'm trying to use sbt docker:publishLocal with a play framework project, using an alpine-based image and running into the above issue.
Read more >
How to publish without generating doc? - Google Groups
Normally, run 'last doc' to see error detail, but I wouldn't expect you to need to do that with ... Scaladoc$$anonfun$1$$anonfun$apply$4.apply(Doc.scala:46)
Read more >
Command-line options - Scala CLI
Control if Scala CLI should use default options for scaladoc, ... publish , publish local ... [Internal] Don't actually run the REPL, just...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found