-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about versionning ? #1159
Comments
FMPOV: |
Here some maven tooling about checking API break : (without maven integration : https://github.com/lvc/japi-compliance-checker) |
The Mule CoAP Connector uses Californium and Mule. Mule has a rather slow Java upgrade cycle because of the large installed base. (Mule 4, that abandons java 7 and uses java 8 only, is just released in 2018). So, backward compatibility with Java 8 is desirable here. |
From my side I don't plan large recoding towards java 11 language features.
|
#1146 (comment) reveals there is a kind of ambiguity about what we call "API". Because of my experience in eclipse plugin development, my naive understanding was that every public/protected stuff is part of the API. This is not exactly true as in eclipse plugin development, you can hide package from the API. (e.g. my.package.internal could be exclude from the API) So in our case, we don't have this kind of naming convention, so as a user how could I know what is API and what is not ? |
FMPOV, the API is somehow unsharp. I would go for include some obvious stuff, frequently used. But exclude the stuff, which is only used when patching the sources. I would consider this list as API: |
This idea disturbing me a little 🤔 Maybe we can clean packages, moving all what we don't consider as part of the API in "internal" naming package and start a |
I try to explain a little why I'm disturbed by this idea. My feeling is that the benefits of semantic versioning is that when you integrate a component semantically versionned you know exactly what to expect.
If we can not provide a clear API perimeter, I'm not sure using semantic versioning make sense 🤔 |
FMPOV, we can do it "academically", with extra packages (and a lot of work). Or "pragmatically", consider, what is used by users of the library without patching the source. And even if we're wrong, we could then "fix" an API break on "demand" (some work). Over the last months (even years), only the "String/byte[]" PSK-identity break was blamed, the most other stuff seems to haven't hurt too much. |
I don't understand what you call "patching source"... "Being pragmatical", what I understand here is no guarantee, just best effort. By the way what you call the "academically" way, is the only "pragmatic" way that allow so many eclipse bundles with so many versions work together.
This is clearly a false dilemma. |
An example would be the added "final" for a protected Handshaker field. Though I don't see, that some can implement/inject his own Implementation (at least, if not the DTLSConnector is derived and a lot of stuff is reimplemented, that's what I would call patching). So I don't think, that someone gets affected by that change. |
Let me guess, there are also "many working on that" and not only "with". |
Either spending time "clarifying the API" or "fixing Bugs" is a false dilemma? |
Yes, It seems to me this is a necessary but not sufficient condition. My point is this is not just an "academic" position. You said :
This sounds like : do you prefer a "not buggy application" or "semantic versioning" ? About the cost, with tooling and moving "not part of the API" class in Anyway again, If the conclusion of this discussion is : we don't want to invest time on checking API, I'm OK with that. I just prefer to increment the major version to be clear about that. |
Everybody, FMPOV there is truth in all arguments you have brought up so far :-) That said, the EDP does not dictate what is to be considered public API, i.e. we are free to define which packages we consider public and which we consider private. There is no automatism that says that every public (in a Java sense) class/method is to be considered public API. I believe that we should make a conscious decision for each package and mark them accordingly. This might lead to situations where we need to introduce changes in a less invasive way, e.g. by means of overloaded methods or copied code. But the rules are clear, we follow semantic versioning. You have been putting a lot of work into Cf 2.0.0 during the last three years, so I would not expect too many such issues showing up in the first place. Where they do, we can decide on how to handle them, i.e. as described above or by means of starting work on a 3.0.0 version. |
Please, just start with introducing one of your proposed tools, if they allow to exclude some stuff from the check. With that, every PR must pass this, and I guess, if a API is violated according this test, the change will be either withdrawn, or concluded as being not part of the public API and therefore added to the excluded stuff. Personally I don't want to spent my time into clarify the API now ahead or API checking tools. |
I'm currently playing with it as this will at least useful for revision version. |
I create a PR which introduces API check tooling (revapi) : #1168 |
The Release 2.5 is upcoming. My impression of that past month was, that is time to switch to Californium 3.0 in order to get rid of the "deprecations". One question which is left open: |
Good question, unfortunately I haven't good answer ... My guess is the older JVM we support the more our library can be reused. Another question which could maybe help to decide, why could be the benefits to be based on Java 8 or 11 ? |
With java 11 it's easier to use the new cipher stuff. |
I opened an issue to talk about this on Leshan project. (eclipse-leshan/leshan#924) |
Do you think this is possible to provides code which is compatible with Java7 (or 8 if needed) and only require java 11 when new cipher is used ? (I guess this is pretty much the way you do now ?) |
My feeling is just, that it takes more and more time to build and test with java 7, java 8 and java 11 (and java 15). |
But If we focus java 11 we lost Android support ? I probably missed something but if we target java 7 (or 8), also supporting more recent one should not be a big deal as generally java is more or less backward compatibility. (but I suppose you face concrete issue which make this idea not so true?) If the idea above ☝️ is to expensive, because we multiply java version to test, maybe a trade-off could be to target a minimal java version for android + check java compatibility for only one java LTS support. (e.g target java 7 + compatibility check for java11, or target java 8 + compatibility check for java 11) |
That's the downside,
It's just my impression, that it gets harder and harder to build with that. And I'm not sure, how many are really still using these versions.
That may be the outcome :-). |
Here is java release roadmap : Java 8 will be supported for a long time (2026/2030) If Java 8 is OK for android(which is not clear to me) and if we really want to support only one JDK, java 8 could be the best choice. |
I'm asking myself how animal-sniffer could be able to support android java 8 support and especially desugaring. |
I had a look over the links. For me, it looks for java 8 as base. (But, again, even if java 8 is the base, I will focus on my own tests on executing it with java 11.) |
I would like know what kind of guarantee (or best effort) we will(want to) try to achieve about versioning.
My general expectation is :
About supported java version, it seems obvious to me that we should not change it for revision increment and we could change it for major. For minor I don't know ? 🤔
Eclipse defines constraints which are pretty much what I exposed above but I guess this is mainly for eclipse bundle targeting eclipse platform.
Here is some documentation about Evolving Java-based APIs
I know eclipse provide API Tools to ensure there is no API break but If I remember well this is Eclipse bundle oriented.
I don't know if there is the same kind of tool that we could use to ensure we don't break API (for revision and minor increment)
The text was updated successfully, but these errors were encountered: