Skip to content

Decide final package name #1

Closed
Closed

Description

@kevinb9n

Some considerations:

  • Should it be under any existing known organization, or register a new domain and use reverse-domain naming, or just stake out a new top-level package?

  • Should the idea of being annotations-only be built into the name?

  • Should it be a "boring" prosaic descriptive name, or something more codenamey?

  • Finally, what should be the dang name :-)

Activity

  1. kevinb9n commented on Sep 20, 2018

    @kevinb9n
    CollaboratorAuthor

    Some considerations:

    • Should it be under any existing known organization, or register a new domain and use reverse-domain naming, or just stake out a new top-level package?

    My feeling is definitely not under an existing org, which can bite us on perception of generality. I don't personally know a reason to care between the other two (e.g., who really cared between org.junit and junit?).

    • Should the idea of being annotations-only be built into the name?

    My feeling is no; let .annotations be a subpackage, just in case. Also source files don't feel like they belong in a top-level package anyway.

    • Should it be a "boring" prosaic descriptive name, or something more codenamey?

    I (and Google) tend to prefer the prosaic.

    • Finally, what should be the dang name :-)

    I do like the suggestion of codeanalysis brought up by JetBrains at our last meeting. It seems to capture the right subject matter to me.

  2. amaembo commented on Sep 25, 2018

    @amaembo
    Collaborator

    I'm for codeanalysis unless there's trademark clash or something.

  3. cushon commented on Sep 26, 2018

    @cushon
    Collaborator

    or register a new domain and use reverse-domain naming, or just stake out a new top-level package?

    +1 to a new top-level package, possibly with a domain. Having an associated domain to host the documentation might be nice.

    let .annotations be a subpackage, just in case

    What examples do we have of non-annotation artifacts so far? I don't see a need to rule that out, but it might still be helpful to enumerate them.

    One example could be utilities like the CF's NullnessUtil#castNonNull.

    I do like the suggestion of codeanalysis brought up by JetBrains at our last meeting. It seems to capture the right subject matter to me.

    It seemed like the front-runner when I set up the temporary repository :)

    One other idea: org.annotations

  4. donnerpeter commented on Sep 26, 2018

    @donnerpeter
    Collaborator

    I'd prefer not to use concatenated words without any visible separator like codeanalysis which IMHO are hard to read. We could camel-hump or snake-case them, but not sure that'd look nice either.

    My personal favorite was at.annotations, org.annotations looks also good.

  5. kevin1e100 commented on Feb 27, 2019

    @kevin1e100
    Collaborator

    Couple more to throw out: coda, canal, and codex, which are mostly plays on "code analysis".

  6. kevinb9n commented on Jun 26, 2019

    @kevinb9n
    CollaboratorAuthor

    Resummarizing key decisions:

    1. Whether to use reverse-domain naming.
    • I personally have never seen it as a very important convention.
    1. What top-level package name to choose.
    • It should be about the topic area (improving code correctness), not an implementation detail of what kind of content we currently expect to have (e.g. annotations).
    • Google strongly prefers generic descriptive (read: boring) names that aren't vulnerable to trademark issues.
    • If multiple words, I think the established convention for package names is to run them together, no caps, no underscores. This may be a reason to avoid multiple words.
    1. What subpackage of our TLP to use for annotations?
    • Both because we may have other small libraries in the future, and because putting anything directly in your TLP is just weird.
    • "annotations" seems like the obvious choice
    1. Do nullness annotations go in a further subpackage of that?
    • I think we'll probably never have more than 25 annotations in this package, and will probably be far short of that for a long time. I think a subpackage would be overstructuring.

    Putting it all together, I've been defaulting to codeanalysis.annotations for some time. The run-together words are something of an issue ("co-dean-alys-is"?), but I'm not sure how much of a problem. I will also acknowledge that saying "this is the code analysis annotations project" doesn't exactly inspire a warm and fuzzy feeling.

  7. donnerpeter commented on Jul 2, 2019

    @donnerpeter
    Collaborator

    For me, run-together words seem non-beautiful, but I'm not even a native speaker. If it's OK for those, then why not. I also like abbreviated suggestions by @kevin1e100

  8. sewe commented on Aug 8, 2019

    @sewe
    Collaborator

    Whether to use reverse-domain naming.

    AFAICT, the publishing requirements for Maven Central state that your groupId must be your reverse domain name (IIRC, groupIds like junit or commons-lang are exceptions from the days of Maven 1):

    groupId: the top level namespace level for your project starting with the reverse domain name

    Assuming the above requirement is strict, I would prefer that the package also be a reverse-domain name, to ensure that the groupId is a prefix of the package. Everything else is just confusing. (FYI, Eclipse Code Recommenders has a heuristic that tries to guess a groupId from the package, precisely because this is such a common convention.)

  9. cpovirk commented on Aug 8, 2019

    @cpovirk
    Collaborator

    Reverse-domain naming has probably saved people from a lot of conflicts between util packages over the years, but I grant that there's probably not going to be another codeanalysis package that's widely used. I think we could get away with it; I'd just rather we not be seen as setting a precedent that reverse-domain naming is unnecessary in general.

    That said, we own codeanalysis.info. The reverse-domain package info.codeanalysis is only a little longer, it still avoids tying us to any one company, and it sounds like it would play better with some tools' heuristics. As another example (in addition to the one that @sewe described), we had a weird problem with Dagger's top-level dagger package inside Google [edit: see post-submit discussion on internal CL 108276453]. It wasn't hard to fix -- if you understood what the problem was (the error wasn't clear) and you knew how to fix it. Oh, and the Google Java Style Guide used to require a specific order for packages in imports, which required special configuration in at least one IDE every time a new top-level package appeared. It looks like Android is still this way.

    Again, I don't anticipate many problems, and I expect them to be minor, but we have at least a few anecdotes now about tools that assume a "normal" package structure, and it sounds like we'll have to use reverse-domain for our Maven artifact, so maybe we should be putting the burden of proof on the top-level package?

  10. kevinb9n commented on Feb 27, 2020

    @kevinb9n
    CollaboratorAuthor

    Per mailing list discussions, the project is being named jspecify. We are registering jspecify.dev and (I think) jspecify.org.

    This would give us the choice of the package names

    jspecify.annotations
    org.jspecify.annotations
    dev.jspecify.annotations

  11. cpovirk commented on Mar 2, 2020

    @cpovirk
    Collaborator

    We got both jspecify.dev and jspecify.org. (They don't point anywhere useful yet, but I'm on it.)

    I ran a quick search over Google's depot to estimate how much more common org is than dev as a top-level package name. It ratio looks close to 100:1, for what that's worth.

  12. cpovirk commented on Apr 15, 2020

    @cpovirk
    Collaborator

    I wasn't around for many of the early discussions about the package name, but I want to make at least a weak case in favor of the "overstructuring" of putting the nullness-specific annotations in a subpackage:

    One question that we've considered (such as briefly in this text and at slightly more length in some comment threads) is how much of our specification should go in Javadoc versus how much should go in some separate document. If we decide that we want to put a lot of the spec into Javadoc, then where would it go? Neither @Nullable nor @NullAnnotated nor any other single annotation will be the ideal place for treatment of all the questions we'll need to answer -- substitution rules, glossary entries, etc.

    Maybe this is primarily an argument in favor of writing a separate spec, rather than squeezing everything into Javadoc. But if we do want the information in Javadoc, then it seems like it would fit best in a package-info file for a package specific to nullness.

  13. cpovirk commented on Apr 20, 2020

    @cpovirk
    Collaborator

    (While I believe it's possible to include arbitrary .html files in the output of Javadoc, I suspect that they aren't as easily visible from IDEs, etc. Then again, I'm unsure how easily visible rendered package-info files are from IDEs :))

  14. 3 remaining items

  15. kevin1e100 commented on Apr 30, 2020

    @kevin1e100
    Collaborator

    I guess I'd be partial to dropping the trailing s to save a letter, otherwise LGTM

  16. lazaroclapp commented on Apr 30, 2020

    @lazaroclapp
    Collaborator

    Vote in favor of org., no opinion on the s.

  17. abreslav commented on May 1, 2020

    @abreslav

    org. looks good, no opinion on the s.

  18. cpovirk commented on May 7, 2020

    @cpovirk
    Collaborator

    Slight preference for including the s:

    • I like differentiating from java.lang.annotation, since, as you note, that one doesn't include annotations.
      • [edit: Err, wait: It totally does contain annotations (and some supporting enums). That said, it also contains the interface Annotation itself, along with some exception types, so it's true that it's more general than just annotations.]
    • While I have only a small preference when it comers to the package name, I have a slightly larger preference for the jar (and maybe artifact?) name. I guess it feels better to me to have a jar "of annotations" than a jar "of annotation?" And if we use plural for the jar, then I think it makes sense to follow suit for the artifact, package, and module. See also ~2x as many "annotations" artifacts as "annotation" artifacts in Maven Central. [much belated edit: And this search for the popular ones would likely also have been helpful.]
  19. kevinb9n commented on May 7, 2020

    @kevinb9n
    CollaboratorAuthor
  20. changed the title [-]Decide final package name[/-] [+]Decide final package name (resolved: org.jspecify.annotations)[/+] on May 8, 2020
  21. changed the title [-]Decide final package name (resolved: org.jspecify.annotations)[/-] [+]Decide final package name[/+] on Feb 26, 2021
  22. cpovirk commented on Mar 12, 2021

    @cpovirk
    Collaborator

    As noted in #160, we've changed course to org.jspecify.nullness for nullness annotations, with other packages to be named as we create them.

  23. added
    design
    on Mar 16, 2023
  24. added this to the 0.3 milestone on Mar 27, 2024
  25. kluever commented on Jul 22, 2024

    @kluever

    Just to close the loop, the final decision that shipped in JSpecify v1.0.0 was org.jspecify.annotations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    design

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions