jena icon indicating copy to clipboard operation
jena copied to clipboard

Clean the build

Open afs opened this issue 1 year ago • 4 comments

Change

As far as practical, address the warnings raised by the maven build including hidden warnings about deprecated features.

  • Some warnings are not being suppressed in the maven build by @SuppressWarnrings("all") - it needs the specific warning category.
  • Need to @Deprecate implementations of deprecated interfaces.
  • Track down logging messages in tests and silence them where they are expected.

See also #2533.

Are you interested in contributing a pull request for this task?

Yes

afs avatar Aug 12 '24 11:08 afs

I stumbled upon the commit that you re-added -proc:none - which conflicted before with https://github.com/apache/jena/pull/2493#issuecomment-2143961015

Perhaps the option could go into a property which defaults to -proc:none but which can be overridden on the jmh module?

<!-- in main pom.xml -->
<properties>
  <compiler.proc>-proc:none</compiler.proc>
</properties>
...
<compilerArgs>
  <arg>${compiler.proc}</arg>
</compilerArgs>
<!-- in benchmark pom.xml -->
<properties>
  <compiler.proc></compiler.proc>
</properties>

if an effectively empty <arg /> causes warning/error, then perhaps a dummy arg (not sure which) could be used. Alternatively, the benchmark module could have its own compiler plugin section.

Aklakan avatar Aug 12 '24 13:08 Aklakan

It really would be helpful to have the build only output what is necessary because when new output occurs, it can get missed. The build output is currently about 6,500 lines.

I'm not sure setting the property will work - when does the substitution happen? The compiler plugin can't be declared in <build> in the top POM because then every module gets the compiler plugin.

Putting a configuration into the compiler plugin for jena-benchmarks-jmh seems the best choice - it's clearest.

What should the -proc setting be jena-benchmarks-jmh? -proc:full seems to work, -proc:only does not.

Other: Added to this PR.

afs avatar Aug 13 '24 15:08 afs

I suppose -proc:full is the future - but overall it seems it might be a pain because of different behavior with past and future Java versions, see: https://inside.java/2024/06/18/quality-heads-up/

Putting a configuration into the compiler plugin for jena-benchmarks-jmh seems the best choice - it's clearest.

I think so too. I am not sure about the exact implications with proc:full - in the worst case this module would need legacy profile for the java compiler without the -proc:full option. But this could be done as a separate PR.

Aklakan avatar Aug 13 '24 17:08 Aklakan

https://inside.java/2024/06/18/quality-heads-up/ :

As of the April 2024 JDK security updates, support for -proc:full has been backported to 17u (17.0.11) and 11u (11.0.23) for both Oracle JDK and OpenJDK distributions. Additionally, Oracle’s 8u release (8u411) also supports -proc:full.

For OpenJDK, no legacy profile is needed, only an up-to-date compiler for Java17.

We could set -processor* for jena-benchmarks-jmh.

I tried the POM setup in https://www.baeldung.com/java-microbenchmark-harness#start (briefly) but I found that it still needed -proc but that should work.

afs avatar Aug 14 '24 08:08 afs

Commits as listed above have been merged to main.

afs avatar Dec 29 '24 17:12 afs