Closed berezovskyi closed 3 years ago
I guess, but it's API breaking. The pattern as oslc4{lang}-client back when Lyo was intended to support multiple languages. Might be better to leave it a lone.
Now, the REAL problem is not a pesky package name but that the old client uses namespace org.eclipse.lyo.client
that we'd really want for the new client and I suspect Jim just added oslc4j in both places as a simplest workaround possible. I don't like that but I don't have an immediate solution. Better ideas are welcome, if I like it I promise your initiative won't be punished (ie I will do the work). @isccarrasco your suggestions and from your colleagues at Koneksys are welcome too!
Another thing I am really not happy about is that all exceptions and resource classes were duplicated and now we'll have to deprecate them twice (strange that we are releasing classes that were never released before as deprecated right from the start). I see no need for that. I think we can easily extract them into a common package that both the new and old client would depend on this common package.
Finally, the reason I am raising this is because we will be stuck with it all the way till 5.0.
P.S. An answer to the Jim's reply he posted while I was drafting it: 4.0.0 is not yet released so no API breakage is there. Anyone who depends on SNAPSHOT does that at their own risk 🤷♂️ Finally, I don't want to add a new package with the name that follows oslc4{lang}-client
exactly becase that's the old convention.
I'm ok with your suggestion.
Regarding package namespace suggestions, I will go first with 3 non-ideal suggestions:
org.eclipse.lyo.client.oslc
namespace is there, we don't touch it but all new client code to org.eclipse.lyo.client
and call it LyoClient
instead of OslcClient
. I think this is the idea I like most.next
, vnext
, v4
. Not bad but the problem is that we'd have to move new code again in 5.0 so I am not happy with 2 breaking changes.So, the final suggestion:
oslc-java-client
stays with the same name, package namespace (org.eclipse.lyo.client.oslc
), and a bumped version 4.0 but with all classes under client.oslc
and client.jazz
deprecated.oslc4j-client
is renamed to lyo-client
and org.eclipse.lyo.oslc4j.client
code is moved to org.eclipse.lyo.client
. Note that oslc
is missing at the end and this is how we avoid clashes technically. Also, classes are renamed from OslcClientXYZ
to LyoClientXYZ
; this is how we signal to developers which classes to use.client.exception
and client.resources
are moved into two differnt packages (read below why) and previously discussed deprecations are made to client.resources
because lyo-domains
is preferred.oslc-java-client
depends on lyo-client-base
(where I will move client.exception
code) and oslc-java-client-resources
(where client.resources
will go). However, lyo-client
will only depend on lyo-client-base
and users will be advised to depend on lyo-domains
BUT they will be able to also load oslc-java-client-resources
if really needed.Haha, the third non-ideal solution got lost along the way :)
One final suggestion is to make a 4.0.0.M2 release before that to provide a temporary but reliable workaround for all the SNAPSHOT code out there.
I prefer Oslc over Lyo prefix because it has stronger functional cohesion. Lyo is a project while OSLC is a technical architecture and standard. The API is for the standard, not the project. You can drop the 4j, its obvious its java. That might make the old and new easier to distinguish.
oslc-client is fine with me too
are we in agreement over the rest of the points?
Just discussed with Jad and OKed. With Jim's change the final plan is:
oslc-java-client
stays with the same name, package namespace (org.eclipse.lyo.client.oslc
), and a bumped version 4.0 but with all classes under client.oslc
and client.jazz
deprecated.oslc4j-client
is renamed to oslc-client
and org.eclipse.lyo.oslc4j.client
code is moved to org.eclipse.lyo.client
. Note that oslc
is missing at the end and this is how we avoid clashes technically. Also, classes are renamed from OslcClientXYZ
to LyoClientXYZ
; this is how we signal to developers which classes to use.client.exception
and client.resources
are moved into two differnt packages (read below why) and previously discussed deprecations are made to client.resources
because lyo-domains
is preferred.oslc-java-client
depends on oslc-client-base
(where I will move client.exception
code) and oslc-java-client-resources
(where client.resources
will go). However, lyo-client
will only depend on lyo-client-base
and users will be advised to depend on lyo-domains
BUT they will be able to also load oslc-java-client-resources
if really needed.
Rationale: we are trying to have all projects be named lyo-xyz and drop OSLC4J. I am also constantly confused with which of them is new and which is old.
Action plan
oslc-java-client
stays with the same name, package namespace (org.eclipse.lyo.client.oslc
), and a bumped version 4.0 but with all classes underclient.oslc
andclient.jazz
deprecated.oslc4j-client
is renamed tooslc-client
andorg.eclipse.lyo.oslc4j.client
code is moved toorg.eclipse.lyo.client
. Note thatoslc
is missing at the end and this is how we avoid clashes technically.Also, classes are renamed fromdropped because of disagreement over the package nameOslcClientXYZ
toLyoClientXYZ
; this is how we signal to developers which classes to use.client.exception
andclient.resources
are moved into two differnt packages (read below why) and previously discussed deprecations are made toclient.resources
becauselyo-domains
is preferred. NB! Check the steps taken in https://github.com/eclipse/lyo.domains/pull/20oslc-java-client
depends onoslc-client-base
(where I will moveclient.exception
code) andoslc-java-client-resources
(whereclient.resources
will go). However,lyo-client
will only depend onlyo-client-base
and users will be advised to depend onlyo-domains
BUT they will be able to also loadoslc-java-client-resources
if really needed.