Skip to content

AnnotatedString: add concrete type asserts to isvalid, ncodeunits #57607

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

Merged

Conversation

nsajko
Copy link
Contributor

@nsajko nsajko commented Mar 2, 2025

The type assertions are valid according to the doc strings of these two functions in the case of AbstractString.

Should prevent some invalidation on loading user code.

Fixes #57606

The type assertions are valid according to the doc strings of these two
functions in the case of `AbstractString`.

Should prevent some invalidation of user code.

Fixes JuliaLang#57606
@nsajko
Copy link
Contributor Author

nsajko commented Mar 2, 2025

I was not able to make a minimal reproducer quickly, but this change reduces the invalidation on loading my package TypeDomainNaturalNumbers (registered, v6.1.0).

@nsajko nsajko requested a review from tecosaur March 2, 2025 15:59
Copy link
Member

@tecosaur tecosaur left a comment

Choose a reason for hiding this comment

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

I can't see any issue with this 👍

@fingolfin fingolfin merged commit c4eeabf into JuliaLang:master Mar 3, 2025
8 of 10 checks passed
@nsajko nsajko deleted the Base_strings_AnnotatedString_type_assert branch March 3, 2025 12:01
@nsajko nsajko added backport 1.11 Change should be backported to release-1.11 backport 1.12 Change should be backported to release-1.12 labels Mar 3, 2025
KristofferC pushed a commit that referenced this pull request Mar 4, 2025
…s` (#57607)

The type assertions are valid according to the doc strings of these two
functions in the case of `AbstractString`.

Should prevent some invalidation on loading user code.

Fixes #57606

(cherry picked from commit c4eeabf)
@KristofferC KristofferC mentioned this pull request Mar 11, 2025
71 tasks
@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label Mar 24, 2025
KristofferC pushed a commit that referenced this pull request Mar 31, 2025
…s` (#57607)

The type assertions are valid according to the doc strings of these two
functions in the case of `AbstractString`.

Should prevent some invalidation on loading user code.

Fixes #57606

(cherry picked from commit c4eeabf)
KristofferC pushed a commit that referenced this pull request Mar 31, 2025
…s` (#57607)

The type assertions are valid according to the doc strings of these two
functions in the case of `AbstractString`.

Should prevent some invalidation on loading user code.

Fixes #57606

(cherry picked from commit c4eeabf)
@KristofferC KristofferC removed the backport 1.11 Change should be backported to release-1.11 label Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

suboptimal inference for nextind, prevind on AnnotatedString
4 participants