Skip to content

Conversation

@Nirklav
Copy link
Contributor

@Nirklav Nirklav commented Apr 10, 2025

In this PR, I added an access modifier to QualifiedNamedTypeName to ensure it's generated for the owner class in cases where private fields need to be serialized. I also fixed the tests that were broken by this change.

In our project, we have a case where only Rider shows the following error:
Inconsistent accessibility: parameter type 'Shared.Common.User.Inventory.Data.Items.InventoryItem' is less accessible than method 'Shared.Meta.LootChests.IReadLootChests.CanOpen'
However, the code compiles and works correctly, so I assume this is a Rider-specific issue.

That said, I believe we can fix it by ensuring the generated code for InventoryItem includes an access modifier.

So, if you don't have any major concerns with this change, it would be great to get it merged.

@Nirklav
Copy link
Contributor Author

Nirklav commented Apr 10, 2025

@dotnet-policy-service agree

@Nirklav
Copy link
Contributor Author

Nirklav commented Apr 22, 2025

I've created a repro project for this issue. Here's the screenshot:
image

Generator.zip

Copy link
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

Sure. This seems reasonable.

@AArnott AArnott merged commit 1bf454c into MessagePack-CSharp:master Jun 6, 2025
3 checks passed
@neuecc
Copy link
Member

neuecc commented Jun 12, 2025

@AArnott
Should we create a release with just this change?
(Sorry, I've been busy with other work and got sick, so I couldn't get back to this repository for a while)

@AArnott
Copy link
Collaborator

AArnott commented Jun 12, 2025

Yes, I think so.
Sorry to hear you've been sick.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants