Skip to content

Change OSGi BSN to org.jspecify.annotations or org.jspecify#569

Closed
chrisrueger wants to merge 1 commit into
jspecify:mainfrom
chrisrueger:osgi-change-bsn
Closed

Change OSGi BSN to org.jspecify.annotations or org.jspecify#569
chrisrueger wants to merge 1 commit into
jspecify:mainfrom
chrisrueger:osgi-change-bsn

Conversation

@chrisrueger

@chrisrueger chrisrueger commented Jul 17, 2024

Copy link
Copy Markdown
Contributor

This is a proposal based on discussion in #428 (comment)

I'm not convince of BSN org.jspecify.jspecify. The second jspecify is superfluous. Since Maven uses two parts to identify an artifact by groupId and artifactId OSGI uses a single identifier the BSN only.
E.g. com.acme:acme-api -> com.acme.api or org.foo:foo -> org.foo as decribed in Apache Felix Maven Bundle Plugin (BND) doc
What's next with jspecify? Further annotations in the current bundle then org.jspecify.annotations is a good candidate. Or something like an uber jar for all kinds of things then org.jspecify is fine.

I liked the proposal by @bjmi org.jspecify.annotations

  • It transports the intention of the bundle in its current state - which is about "annotations".

But what about just org.jspecify ?

There is also the proposal to just use org.jspecify

  • currently it seems that the module-info.java uses org.jspecify

module org.jspecify {

If this should be kept, then it also makes sense to use the same for the OSGi BSN / Bundle-SymbolicName

This PR should serve to decide which one to use.

@chrisrueger chrisrueger changed the title Change OSGi BSN to org.jspecify.annotations Change OSGi BSN to org.jspecify.annotations or org.jspecify Jul 17, 2024
@wmdietl

wmdietl commented Jul 17, 2024

Copy link
Copy Markdown
Collaborator

Earlier discussion.

@cpovirk

cpovirk commented Jul 17, 2024

Copy link
Copy Markdown
Collaborator

Sorry, I see now that not only does the Felix doc suggest "org.jspecify" but that so too does one doc I cited earlier. (I had missed the section of that doc that gave actual recommendations in favor of the section that (as I theorized at the time) was demonstrating how to override those recommendations when necessary.) And sadly, that convention was not mentioned by the recommendations I had dug up.

It is very possible that "org.jspecify" would be better, but I unfortunately didn't give this discussion time to develop after merging the original OSGi PR, and I pushed the release to Maven in the meantime. While we could immediately release a 1.0.1 with the change, I think it will be simplest at this point to stick with what we have, partially (but not exclusively) because that it's still not 100% clear to me which approach (if either) is most conventional. (I do suspect that it would be "org.jspecify," but I think this is minor enough that it's not worth blocking on.) Sorry again for not giving time for this discussion. I do appreciate the link you dug up about the convention.

@cpovirk cpovirk closed this Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants