dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.13k stars 4.7k forks source link

Where is System.SpanExtensions? #26391

Closed wjdavis5 closed 4 years ago

wjdavis5 commented 6 years ago

The docs show it exists here: https://docs.microsoft.com/en-us/dotnet/api/system.spanextensions?view=netcore-2.0

But I'm not seeing it in System.Memory.dll

image

khellang commented 6 years ago

That looks like an early version of MemoryExtensions, but that didn't ship until 2.1. I wonder how that snuck into the docs?

stephentoub commented 6 years ago

cc: @mairaw

mairaw commented 6 years ago

@weshaggard this issue keeps coming up with different APIs. I think when you grabbed the assemblies for me for .NET Core + extensions, they included things from the master branch that weren't part of 2.0. Can you confirm?

weshaggard commented 6 years ago

Yes in .NET Core 2.0 we gave you guys all APIs that were produced by corefx, I fixed that with the .NET Core 2.1 doc hand of to only give you APIs that are part of Microsoft.NETCore.App. I could give you the same set for .NET Core 2.0 if there is any easy way to clean-up the docs based on that.

mairaw commented 6 years ago

Yes, I can run CI with a new set of assemblies for 2.0 @weshaggard and everything should magically be fixed. ✨

weshaggard commented 6 years ago

@mairaw I will send it to you offline.

ahsonkhan commented 6 years ago

Do we have any updates on this issue?

joshfree commented 6 years ago

assigning to @mairaw to verify and close

danmoseley commented 6 years ago

@mairaw ?

(Just going through our 2.1.x issues)

michalmalecki commented 5 years ago

Hi, am I correct that SpanExtensions was still not released in stable version? I see it popping up in blog posts but it's still not in latest System.Memory

khellang commented 5 years ago

I think you're looking for MemoryExtensions. Which blog posts?

michalmalecki commented 5 years ago

No, im talking about https://docs.microsoft.com/en-us/dotnet/api/system.spanextensions?view=netcore-2.0 and specifically NonPortableCast mentioned on https://bytelanguage.net/2018/04/21/type-casting-using-spant/ and https://blog.marcgravell.com/2017/04/spans-and-ref-part-2-spans.html?m=1

khellang commented 5 years ago

Ah, that was moved to MemoryMarshal; https://github.com/dotnet/corefx/issues/26368. There is no SpanExtensions.

michalmalecki commented 5 years ago

Thanks a lot. Any chance to remove it from docs or put above info there?

ahsonkhan commented 5 years ago

Any chance to remove it from docs or put above info there?

For .NET Core 2.1, the docs are correct. https://docs.microsoft.com/en-us/dotnet/api/system.memoryextensions?view=netcore-2.1

For .NET Core 2.0, @mairaw, did you have any luck in updating the docs?

mairaw commented 5 years ago

@ahsonkhan I ran into issues with some type forwards. Let me add this back on the priority list and see if I can get past the issues that I was having when I removed the extension DLLs.

danmoseley commented 5 years ago

@mairaw just making a pass through the remaining issues in 2.1.x milestone. Is this one still live?

ahsonkhan commented 5 years ago

As expected, I don't see SpanExtensions in the docs anywhere anymore (all the relevant pages show 404) and we only have MemoryExtensions, which shipped in 2.1. The same holds regarding the NonPortableCast API which moved to MemoryMarshal.Cast before shipping.

We may want to do the same with aspnetcore2.0, but I am not sure about that: https://docs.microsoft.com/en-us/dotnet/api/?view=aspnetcore-2.0&term=nonportablecast https://docs.microsoft.com/en-us/dotnet/api/?view=aspnetcore-2.0&term=spanextensions

cc @davidfowl

Therefore, closing the issue as fixed.

mairaw commented 5 years ago

Thanks for closing it @ahsonkhan. Yes, this had been taken care of a while back.

ahsonkhan commented 5 years ago

We may want to do the same with aspnetcore2.0, but I am not sure about that

cc @justinvp, @natemcmaster - in case you have more context on this.