Skip to content

Add JSpecify nullability annotations to DataFetcherResult#3891

Merged
dondonz merged 1 commit into
masterfrom
datafetcherresult-nullability
Apr 8, 2025
Merged

Add JSpecify nullability annotations to DataFetcherResult#3891
dondonz merged 1 commit into
masterfrom
datafetcherresult-nullability

Conversation

@dondonz

@dondonz dondonz commented Apr 4, 2025

Copy link
Copy Markdown
Member

I made a classic NPE mistake because I forgot to check if data was null while writing a DataFetcher

With JSpecify, we can detect NPEs like this at compile time rather than run time.

Have a look at the documentation for @NullMarked https://jspecify.dev/docs/user-guide/#nullmarked

This is the first PR to add JSpecify to an existing class so let's have a discussion.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@github-actions

github-actions Bot commented Apr 4, 2025

Copy link
Copy Markdown
Contributor

Test Results

  313 files    313 suites   50s ⏱️
3 586 tests 3 581 ✅ 5 💤 0 ❌
3 675 runs  3 670 ✅ 5 💤 0 ❌

Results for commit f962466.

@andimarek andimarek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Exactly what we should do incrementally.

@dondonz dondonz merged commit 6afaab5 into master Apr 8, 2025
@dondonz dondonz deleted the datafetcherresult-nullability branch April 8, 2025 01:10
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