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

Implement SIP 57 - add runtimeChecked method and annotation #20987

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

bishabosha
Copy link
Member

@bishabosha bishabosha commented Jul 3, 2024

ref: https://docs.scala-lang.org/sips/replace-nonsensical-unchecked-annotation.html

Also this doesn't change synthetic code that is generated to use @unchecked, or make @unchecked meaningless for this use case - this should probably come at a later stage after the definition is no longer experimental

fixes #21012

@bishabosha bishabosha force-pushed the sip-57-unchecked-annot branch from 677560c to 5cb3301 Compare July 3, 2024 14:47
@bishabosha
Copy link
Member Author

bishabosha commented Jul 3, 2024

For the future: once the definition is stabilised, we can deprecate @unchecked in this use case, switch over code generation, semantic checks, error messages to use .runtimeChecked instead of : @unchecked

And also later possibly a language mode could introduce that refutable pattern bindings become an error?

@bishabosha bishabosha force-pushed the sip-57-unchecked-annot branch from 5cb3301 to 9a866c2 Compare July 3, 2024 20:53
@bishabosha bishabosha marked this pull request as ready for review July 3, 2024 20:54
@bishabosha bishabosha force-pushed the sip-57-unchecked-annot branch from 9a866c2 to 853920d Compare July 4, 2024 09:22
@bishabosha bishabosha marked this pull request as draft July 4, 2024 09:29
@bishabosha bishabosha force-pushed the sip-57-unchecked-annot branch from 853920d to e8f9812 Compare July 4, 2024 11:30
@bishabosha bishabosha marked this pull request as ready for review July 4, 2024 11:40
@bishabosha bishabosha force-pushed the sip-57-unchecked-annot branch from e8f9812 to d29ec53 Compare July 4, 2024 12:10
@bishabosha bishabosha requested a review from odersky July 4, 2024 13:20
@bishabosha bishabosha requested a review from Gedochao July 16, 2024 16:34
@bishabosha
Copy link
Member Author

@Gedochao how can I get this reviewed?

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

I left some suggestions for the doc page. Otherwise LGTM.

docs/_docs/reference/experimental/runtimeChecked.md Outdated Show resolved Hide resolved
docs/_docs/reference/experimental/runtimeChecked.md Outdated Show resolved Hide resolved
docs/_docs/reference/experimental/runtimeChecked.md Outdated Show resolved Hide resolved
docs/_docs/reference/experimental/runtimeChecked.md Outdated Show resolved Hide resolved
docs/_docs/reference/experimental/runtimeChecked.md Outdated Show resolved Hide resolved
docs/_docs/reference/experimental/runtimeChecked.md Outdated Show resolved Hide resolved
docs/_docs/reference/experimental/runtimeChecked.md Outdated Show resolved Hide resolved
docs/_docs/reference/experimental/runtimeChecked.md Outdated Show resolved Hide resolved
docs/_docs/reference/experimental/runtimeChecked.md Outdated Show resolved Hide resolved
@odersky odersky assigned bishabosha and unassigned odersky Jul 19, 2024
@bishabosha bishabosha requested a review from odersky July 19, 2024 20:00
bishabosha and others added 2 commits July 24, 2024 10:01
improve documentation based on suggestions

Co-authored-by: odersky <[email protected]>
@bishabosha bishabosha force-pushed the sip-57-unchecked-annot branch from fc54f16 to 5595bdd Compare July 24, 2024 08:02
@bishabosha bishabosha enabled auto-merge July 24, 2024 08:02
@bishabosha bishabosha merged commit a64c295 into scala:main Jul 24, 2024
25 checks passed
@bishabosha bishabosha deleted the sip-57-unchecked-annot branch July 24, 2024 09:25
@WojciechMazur WojciechMazur added this to the 3.6.0 milestone Oct 8, 2024
@WojciechMazur WojciechMazur added the release-notes Should be mentioned in the release notes label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes Should be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SIP 57] Add runtimeChecked method to replace @unchecked in the context that means "check at runtime"
3 participants