On 2017-05-17 17:14, Erik Joelsson wrote:
Hah, that seems like a reasonable solution to me. The index page
generation shouldn't be heavy enough to be a problem here.
It's not the generation in itself, it's its dependencies that are heavy,
compared to plain docs-jdk-specs.
But, most use cases will build -api, -specs and -index at the same time
anyway, so it's probably not a big deal. Otherwise, we'll have to deal
with it later.
/Magnus
Looks good.
/Erik
On 2017-05-17 15:44, Magnus Ihse Bursie wrote:
On 2017-05-17 13:27, Erik Joelsson wrote:
I realize the dilemma. The clean solution is to define yet another
top level target for just this file. It's also possible that this
race will never cause problems, I don't know for sure.
Here's an updated version:
http://cr.openjdk.java.net/~ihse/JDK-8180426-use-css-for-bundle-index-page/webrev.02
According to our credo, I prefer:
* not to introduce races
* not to duplicate work
* make sure a make target delivers everything that's needed
* ... even if the above in the end results in executing more build logic
So I've removed the copying from specs and only kept it at the index,
but then in Main.gmk I made specs depend on index. This will be safe,
and if, in the future, it turns out to be to burdensome for
developers just wanting to make specs, we'll have to break out the
resource copying from the index target.
I also shortened the "index" related variables even more.
/Magnus
/Erik
On 2017-05-17 12:41, Magnus Ihse Bursie wrote:
On 2017-05-17 11:23, Erik Joelsson wrote:
Looks ok. Note that adding the global resources copy targets to
two different top level targets may cause race conditions in rare
cases depending on OS and file system.
Do you propose that I solve it in a different way? I was thinking
of moving the copy of resources to only the "index" which feels
more "top-level" than the "specs" target, to avoid this
duplication. But this also has the unfortunate effect that
docs-jdk-specs no longer creates correctly working specs. Seems to
be no good way out of this. :-(
/Magnus
/Erik
On 2017-05-17 10:16, Magnus Ihse Bursie wrote:
In JDK-8180208, a new top-level index.html for the entire docs
image was created.
This should use the common jdk-default.css file, which should
move out of the specs directory.
Here is an example how the generated page looks like:
http://cr.openjdk.java.net/~ihse/demo-docs-index-with-default-css/
Bug: https://bugs.openjdk.java.net/browse/JDK-8180426
WebRev:
http://cr.openjdk.java.net/~ihse/JDK-8180426-use-css-for-bundle-index-page/webrev.01
/Magnus