GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ThreadsafeTypeKeyHashTable.VolatileWrite missing nullable declaration for `value` parameter · Issue #1752 · MessagePack-CSharp/MessagePack-CSharp

ThreadsafeTypeKeyHashTable.VolatileWrite missing nullable declaration for value parameter #1752

New issue
Copy link
New issue
Copy link
Open
Open
ThreadsafeTypeKeyHashTable.VolatileWrite missing nullable declaration for value parameter#1752
Copy link
Labels
unity

Description

@pikpok-lihhern
pikpok-lihhern
opened on Jan 29, 2024
Issue body actions

When trying to build MessagePack within Unity, I noticed that the latest release (2.5.140) did not enable nullable reference type via the csc.rsp file. So I manually added them to get rid of the noisy warnings only to get a warning:

ThreadsafeTypeKeyHashTable.cs(214,9): warning CS8824: Parameter 'location' must have a non-null value when exiting because parameter 'value' is non-null.

The problem:
private static void VolatileWrite([NotNullIfNotNull("value")] ref Entry? location, Entry value)
Entry value is not nullable.

The fix is:
private static void VolatileWrite([NotNullIfNotNull("value")] ref Entry? location, Entry? value)
Flag it nullable: Entry? value.

P.S. Perhaps for future release, it would also be good to include the csc.rcp file alongside all asmdef files to enable nullable reference type.

Activity

  1. AArnott
    added
    unity
    on Jan 29, 2024
  2. AArnott commented on Jan 29, 2024

    @AArnott
    AArnott
    on Jan 29, 2024
    Collaborator
    More actions

    Thanks for the report. I suppose this will be solved in our upcoming major release because #1734 will avoid unity having to compile messagepack source code any more.

  3. pikpok-lihhern commented on Jan 29, 2024

    @pikpok-lihhern
    pikpok-lihhern
    on Jan 29, 2024
    Author
    More actions

    Cool. Yes, that sounds great. Also, I'm looking forward to the upcoming roslyn code generator. Getting rid of MPC dependency is great!

    Reacted by Andrew Arnott
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    unity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.