-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[stdlib] Add split overloads #4015
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
Conversation
d5b9aa1 to
6050f6f
Compare
|
This looks fantastic and is much easier to keep all the context in my head, making review snappy. Thank you so much for doing that Martin 😄 Other than a question about method placement, this looks ready to go. |
|
!sync |
|
Hmm, it seems this is running into Mojo compiler assertion failures in CI internally. I'm able to reproduce a crash using Are you able to call these new I think this is running into the same parameter inference problem I ran into when I recently did some work on fn split[
sep_mut: Bool,
sep_origin: Origin[sep_mut], //,
](
self,
sep: StringSlice[sep_origin],
maxsplit: Int = -1,
) raises -> List[
String
]:I notice that you still change Originally I thought this PR was writing out each of these overloads as a way you found to workaround that crash, but it appears that may not have been the goal? My best guess is that this issue occurs when something goes wrong inferring origin parameters when |
|
@ConnorGray I can't repro the crash
AFAIK the
I didn't experience any crash 🤷♂️ . The Could you test it with reverting back to parametrizing the origin? |
|
@ConnorGray gentle ping and also to ask whether the crash is still there, and if I can help in any way to repro/fix it |
|
!sync |
|
This is still crashing parameter inference in the compiler internally. Perhaps we can help it out by explicitly specifying origins etc here. |
This comment was marked as resolved.
This comment was marked as resolved.
Probably, but I'm not even sure what is causing the errors or how to replicate them to open an issue |
|
@JoeLoser @ConnorGray I think I found the issue, could any of you test it? fn _to_string_list[
O: ImmutableOrigin, //
](items: List[StringSlice[O]]) -> List[String]:Changed it to |
|
!sync |
99e4f97 to
d817560
Compare
|
!sync |
6667307 to
ad47d94
Compare
|
@JoeLoser I think I found the issue, when a |
ad47d94 to
4494db1
Compare
73984db to
28a6b49
Compare
|
@JoeLoser this PR is ready for testing as well |
577702a to
e7cef57
Compare
e7cef57 to
9b77f79
Compare
|
!sync |
34c8962 to
d2ca636
Compare
|
!sync |
d2ca636 to
8010318
Compare
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
8010318 to
f875b86
Compare
|
!sync |
|
✅🟣 This contribution has been merged 🟣✅ Your pull request has been merged to the internal upstream Mojo sources. It will be reflected here in the Mojo repository on the main branch during the next Mojo nightly release, typically within the next 24-48 hours. We use Copybara to merge external contributions, click here to learn more. |
|
Landed in 4e1c074! Thank you for your contribution 🎉 |
[External] [stdlib] Add split overloads Add all split overloads with examples. Part of modular#3528 ORIGINAL_AUTHOR=martinvuyk <110240700+martinvuyk@users.noreply.github.com> PUBLIC_PR_LINK=modular#4015 Co-authored-by: martinvuyk <110240700+martinvuyk@users.noreply.github.com> Closes modular#4015 MODULAR_ORIG_COMMIT_REV_ID: 870f9e2d80e3a9cc657540af44932fd66da8ea22
Add all split overloads with examples. Part of #3528
cc: @ConnorGray