Re: javadoc and scaladoc for new layers API

2024-05-13 Thread Steve Lawrence
I think it can done by adding something like this to the unidocSettings in 
build.sbt:


  ScalaUnidoc / unidoc / unidocAllSources := (ScalaUnidoc / unidoc / 
unidocAllSources).value.map {

  sources =>
  sources.filter { source =>
source.toString.contains("/api/")
  }
  }

So it gets all the sources that unidoc will use and filters it to only include 
files that have "/api/" in them. The filter probably needs to be a bit different 
so it doesn't filter out the UDF and scala API. But something along those lines 
should probably work. We already do something similar for JavaDoc in the same 
setting, which probably needs to be tweaked too.


You'll also need to add the "runtime1" subproject to the "unidocProjectFilter" 
setting so unidoc looks at it for potential sources.


Another thing to consider is the GenJavaDoc plugin, which converts scala files 
to java when generating javadoc. I *think* the public layer API is all Java so 
we shouldn't have to worry about it, but if that's not the case we'll probably 
need to enable that plugin for runtime1. I'm not sure if that will cause issues, 
so hopefully it's not needed.


On 2024-05-13 01:47 PM, Mike Beckerle wrote:
There's some discussion of unmanagedSourceDirectories being a way of doing this 
online.


Ultimately, I'd like all packages with "api" in their names, to get their 
scaladoc and javadoc generated and included.

I have no idea if this is feasible.

On Mon, May 13, 2024 at 1:38 PM Mike Beckerle > wrote:



The new layers API defines classes in daffodil-runtime1
org.apache.daffodil.runtime1.layers.api, specifically classes Layer and
ChecksumLayer.

I'd like the scaladoc from these to be published. Right now it's just the
scaladoc for sapi and udf, and looking at the doc for sbt-unidoc I did not
spot a way to control what scaladoc/javadoc at smaller than a whole module
granularity.

Any suggestions on how to get just this one package from runtime1 to have
its scaladoc published.

-mike





Re: javadoc and scaladoc for new layers API

2024-05-13 Thread Mike Beckerle
There's some discussion of unmanagedSourceDirectories being a way of doing
this online.

Ultimately, I'd like all packages with "api" in their names, to get their
scaladoc and javadoc generated and included.
I have no idea if this is feasible.

On Mon, May 13, 2024 at 1:38 PM Mike Beckerle  wrote:

>
> The new layers API defines classes in daffodil-runtime1 
> org.apache.daffodil.runtime1.layers.api,
> specifically classes Layer and ChecksumLayer.
>
> I'd like the scaladoc from these to be published. Right now it's just the
> scaladoc for sapi and udf, and looking at the doc for sbt-unidoc I did not
> spot a way to control what scaladoc/javadoc at smaller than a whole module
> granularity.
>
> Any suggestions on how to get just this one package from runtime1 to have
> its scaladoc published.
>
> -mike
>
>