Skip to content

Reduced spec for 0.1. - #120

Merged
cpovirk merged 9 commits into
jspecify:release-0.xfrom
cpovirk:spec01
Aug 21, 2020
Merged

cpovirk merged 9 commits into
jspecify:release-0.xfrom
cpovirk:spec01

Conversation

@cpovirk

@cpovirk cpovirk commented Aug 18, 2020

Copy link
Copy Markdown
Collaborator

No description provided.

@googlebot googlebot added the cla: yes See https://cla.developers.google.com/ label Aug 18, 2020
@cpovirk cpovirk mentioned this pull request Aug 18, 2020
Comment thread docs/spec.rst
nullness annotations. **Nothing here is “set in stone” yet.**

It will be very helpful to read or refer to the `core
concepts/glossary <https://docs.google.com/document/d/1KQrBxwaVIPIac_6SCf--w-vZBeHkTvtaqPSU_icIccc/edit>`__

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any chance we could put the glossary into .md form as well? The docs aren't public, but this page will be publicly visible, IIUC, so links to the docs are probably ill-advised in any case

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is something we'll need to do. I am hoping to call it out of scope for 0.1: "Fortunately," it still seems unlikely that anyone outside the group will view the spec. Do you think we can get away with that? We can always release an 0.1.1 if we want to update the links to point to somewhere publicly visible for historical interest.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. maybe put something like "TODO: make these available with spec" into this text then?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread docs/spec.rst Resolved
Comment thread docs/spec.rst Outdated

We give `semantics <#semantics>`__ to these annotations independent of
particular tools. We don’t specify what tools must do with the
information we provide, nor do we forbid them from adding to it (e.g.,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"we provide" -> "provided using annotations defined here" or something like that?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tweaked slightly differently to try to keep the length down. But maybe it's less clear now? I can give it another shot if you think I should.

Comment thread docs/spec.rst Resolved
Comment thread docs/spec.rst Resolved
Comment thread docs/spec.rst Resolved
Comment thread docs/spec.rst Resolved
Comment thread docs/spec.rst Resolved
Comment thread docs/spec.rst Resolved
Comment thread docs/spec.rst Resolved

@wmdietlGC wmdietlGC left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few suggestions, overall looks great.

Comment thread docs/spec.rst Resolved
Comment thread docs/spec.rst Resolved
Comment thread docs/spec.rst Outdated
- Can the method return a null map? That is unspecified (since no
defaulting annotation is in scope)
- Can the map’s keys be null? no. This is because the wildcard’s
explicit bound, ``@Nullable String``, is intersected with the

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this intersection should be mentioned in the Type arguments of parameterized types section? It's a bit surprising to first read about this in the example.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yeah, that's in one of the parts I cut out. How about I cut this section down to refer only to the type parameters' bounds (see new version)? Or maybe we'd be better off without the section entirely?

@googlebot

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no See https://cla.developers.google.com/ and removed cla: yes See https://cla.developers.google.com/ labels Aug 19, 2020
@cpovirk

cpovirk commented Aug 20, 2020

Copy link
Copy Markdown
Collaborator Author

Hmm, any ideas, @wmdietlGC ? The internal CLA tool tells me that I can accept code from various @google.com email addresses, but it says "no" for yours :(

Comment thread docs/spec.rst Outdated
field [`#50 <https://github.com/jspecify/jspecify/issues/50>`__].
*debated*

- Applying more than one of these annotations to the same scope (since

@kevin1e100 kevin1e100 Aug 20, 2020 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe we can lose this rule (for both @Nullable and @DefaultNonNull), since javac will reject duplicate use anyway.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I made the same comment on the Docs version of this at one point :) As I recall, kevinb took the position that this part of the spec was essentially saying "These annotations will not be @Repeated." While it's hard to imagine that anyone would even think to define them that way, I suppose it's technically something that we want to forbid.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to match the change you made to the Docs version.

Comment thread docs/spec.rst Outdated
hierarchy [`#80 <https://github.com/jspecify/jspecify/issues/80>`__]:

| ``Foo`` (written in the context of ``@DefaultNonNull``)
| ``<: Foo`` (written outside the context of ``@DefaultNonNull``)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you could use "<=" (or some other symbol) to avoid overloading Java's base subtyping

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I moved from <= to ⋖, since the JLS uses <= for containment.

@googlebot

Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes See https://cla.developers.google.com/ and removed cla: no See https://cla.developers.google.com/ labels Aug 21, 2020
@cpovirk

cpovirk commented Aug 21, 2020

Copy link
Copy Markdown
Collaborator Author

I reverted Werner's typo fixes while we sort out the CLA question.

Let's see what GitHub does with the rST version first.

This reverts commit aeb5f02.
@cpovirk
cpovirk merged commit 906dba3 into jspecify:release-0.x Aug 21, 2020
@cpovirk
cpovirk deleted the spec01 branch August 21, 2020 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes See https://cla.developers.google.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants