Skip to content

MessagePackWriter Write(in ReadOnlySpan<byte> src) input should be scoped #2252

@ShadowMarker789

Description

@ShadowMarker789

Bug description

  • CS8350 -

MessagePackWriter Write(in ReadOnlySequence) does not have scoped, prevents stackalloc usage without unsafe (turns the error into a warning)

Image

Repro steps

Try to use MessagePackWriter Write(in ReadOnlySpan) with a stackallocated span

Expected behavior

This is acceptable

Actual behavior

This is not acceptable

  • Version used:
  • Runtime: .Net Framework v 4.7.2

Additional context

I had to write custom serializers in the first place because our messages are proto defined, even though we're using MessagePack for the transport in .Net clients

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions