GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — JSpecify big wave 2 by dondonz · Pull Request #4184 · graphql-java/graphql-java Conversation
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "graphql.validation.ValidationError", | ||
| "graphql.validation.ValidationErrorClassification", | ||
| "graphql.validation.ValidationErrorType", | ||
| // These classes will not be public API later, exempt here while marked as experimental |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
There is an edge case where some classes have been annotated with "Experimental API" for the purposes of the defer work. They won't become public API later so I made a note in the JSpecify exemption rule
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| private final List<SourceLocation> locations; | ||
| private final Map<String, Object> extensions; | ||
| private final List<Object> path; | ||
| private final @Nullable List<SourceLocation> locations; |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The builder creates a non-nullable list, but that's only if the builder is called
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| * @return a value or null | ||
| */ | ||
| public <T> T get(Object key) { | ||
| public <T> @Nullable T get(Object key) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
TODO: another case of the nullable generic issue
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Update - all values stored in the GraphQLContext are non-null. It's only going to return null if the key is not found. Let's keep it like this.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| */ | ||
| @SuppressWarnings("unchecked") | ||
| public <T> T getObject() { | ||
| public @Nullable <T> T getObject() { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
TODO: another generic nullable check
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Edit: object should also be nullable
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I updated the prompt with more information on generics
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I had a fix a bunch of tests when I changed Validation Error messages to be non-nullable This is as per the spec - messages in GraphQL errors must be present |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
# Conflicts: # src/main/java/graphql/schema/GraphQLSchema.java
There was an error while loading. Please reload this page.
|
Special note for release notes: ValidationError technically has a breaking change, now a description must be not-nullable, which is consistent with the specification Previously there was a mismatch that ValidationError didn't enforce description. However that doesn't make much sense, if a user receives a validation error they should also receive a description to help explain and diagnose the error |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -0,0 +1,59 @@ | |||
| The task is to annotate public API classes (marked with `@PublicAPI`) with JSpecify nullability annotations. | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This prompt is checked in so subagents can all share this context
This prompt will be deleted after this series of JSpecify annotations is completed
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.