Re: Removing jsr305

Vampire <[email protected]> Fri, 13 Oct 2023 23:35:39 +0200
Newsgroups gmane.editors.jedit.devel
Message-ID <[email protected]>
Hi

Where did you actually see that problem and what exactly?

I checked in Java 11 and Java 21 and in both there are only things within `javax.annotation.processing`.
In the jsr350 JAR are only things in `javax.annotation`, `javax.annotation.meta`,  and `javax.annotation.concurrent`, so there should not be a split-package problem there.

I also quickly tried in a play project and it works like a charm.
jsr305 jar to the module path, a "requires transitive ..." clause to the module info, and all compiles just fine without complaint with both, Java 11 and Java 21.

Besides that, it is imho anyway questionable whether jEdit should be made a JPMS module.
Which advantages do you see?
If we would start from scratch, it would maybe make sense.
And if we would have a clear definition of what Plugin API is and what not,
it would probably also be great to enforce this restriction by default.

So unless we really want to define a clear Plugin API and forbid plugins to use anything else by default, it would maybe make sense.

But even then, as I wrote above it should not be much of a problem to continue using the jsr305 annotations.
And it would probably even be preferable, as typically tools support these annotations,
but will not support the custom copies you made.

What do you think?

Cheers
Björn




Am 11.10.2023 21:24, schrieb Matthieu Casanova:
> Hey,
> years ago I added the google jsr305 library (annotations like Nonnull, Nullable) which is mostly a helper for IDE and documentation.
> Unfortunately that JSR was never aprooved which was not a problem until Java released the module system :
>
> Because those annotations were in javax package it caused problems when activating the module system introduced in Java 9 because javax is of course part of JRE so another library cannot provide the same package.
> So basically I created the same annotations in
>
> org.jedit.annotation package.
>
> Matthieu
>
>
>
>
>

-- 
-----------------------------------------------
jEdit Developers' List
[email protected]
https://lists.sourceforge.net/lists/listinfo/jedit-devel