Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@dotnet-bot
Copy link

This PR contains mirrored changes from dotnet/corefx

Please REBASE this PR when merging

* Rename string-slicing extension methods

As part of

https://github.com/dotnet/corefx/issues/26894

the api folks have approved renaming AsROSpan and AsROMemory
on string instances to AsSpan and AsMemory (as the "readonly"
is obvious given the read-only nature of the input.)

This puts the renaming in effect. Basically a big search-replace
commit.

* Fix OpenSSL build break

* I see this is going to be a treadmill

Signed-off-by: dotnet-bot-corefx-mirror <[email protected]>
@dotnet-bot dotnet-bot assigned ghost Feb 23, 2018
@Anipik
Copy link

Anipik commented Feb 23, 2018

@jkotas @ahsonkhan

@jkotas
Copy link
Member

jkotas commented Feb 23, 2018

cc @atsushikan

}

public ReadOnlySpan<T> AsReadOnlySpan()
public ReadOnlySpan<T> AsSpan()

Choose a reason for hiding this comment

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

Do we want this change?

Copy link
Member

Choose a reason for hiding this comment

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

I think so - we are using AsSpan everywhere, this one should not be an exception.

Copy link

@ahsonkhan ahsonkhan Feb 23, 2018

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

If you are changing the public surface of share file, it has to be done via the mirror. I do not know how else we would do it.

Choose a reason for hiding this comment

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

I see. Will we then append the change to the calls in the mirror PR on the corefx side (along with the coreclr version update PR)?

Copy link
Member

Choose a reason for hiding this comment

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

Right

}

// TODO: Delete once the AsReadOnlySpan -> AsSpan rename propages through the system
public static ReadOnlySpan<char> AsReadOnlySpan(this string text) => AsSpan(text);

Choose a reason for hiding this comment

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

Do we need to temporarily add the AsReadOnlyMemory APIs too and update AsReadOnlyMemory -> AsMemory?

Copy link
Member

Choose a reason for hiding this comment

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

Yes - as part of your other change, but it is not needed to get this PR go through.

Choose a reason for hiding this comment

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

Ah I see. No one in this repo calls AsReadOnlyMemory.

@jkotas jkotas merged commit 22f1bc0 into master Feb 23, 2018
@ahsonkhan ahsonkhan deleted the mirror-merge-9544449 branch February 23, 2018 04:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants