Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stubs for sequenced collections. #65

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Add stubs for sequenced collections. #65

merged 1 commit into from
Jul 24, 2024

Conversation

cpovirk
Copy link
Collaborator

@cpovirk cpovirk commented Jul 23, 2024

These stubs work around some problems we're seeing, and of course they
may let us identify actual problems in user code. They appear to cause
no problems in environments where the sequenced collections aren't yet
present (e.g., under JDK 11).

See
jspecify/jspecify-reference-checker#192 (comment)
and elsewhere in that thread.

The files here are annotated copies of files from
https://github.com/openjdk/jdk/tree/476d2ae69d6f67fdf9e2a9353f224141318690f2.

Fixes jspecify/jspecify-reference-checker#192.

These stubs work around some problems we're seeing, and of course they
may let us identify actual problems in user code. They appear to cause
no problems in environments where the sequenced collections aren't yet
present (e.g., under JDK 11).

See
jspecify/jspecify-reference-checker#192 (comment)
and elsewhere in that thread.

The files here are annotated copies of files from
https://github.com/openjdk/jdk/tree/476d2ae69d6f67fdf9e2a9353f224141318690f2.
Copy link
Collaborator

@wmdietl wmdietl left a comment

Choose a reason for hiding this comment

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

The added annotations all look good and I'm fine with merging.
However, I wonder whether we shouldn't simply pull in a JDK 21, instead of just adding these three files. If we pull in JDK 21 at a later point, there will be conflicts with these files and it is harder to see what the actual changes are.

@wmdietl wmdietl assigned cpovirk and unassigned wmdietl Jul 24, 2024
@cpovirk
Copy link
Collaborator Author

cpovirk commented Jul 24, 2024

I do expect to pull in JDK21 in the not too distant future. Given my track record recently, though, I'd rather rather not block on it :) (And it will already lead to all sorts of merge conflicts until I sort that process out.) Another option is to either leave the common.collect nullness tests broken (which is ok when we run them only periodically) or to add suppressions, but it's enough suppressions that I'd rather not.

We'll see if that comes back to bite me :)

@cpovirk cpovirk merged commit af47234 into main Jul 24, 2024
1 check passed
@cpovirk cpovirk deleted the sequenced branch July 24, 2024 01:02
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.

SequencedCollection was added in Java 21 and needs to be handled
2 participants