reactivemarbles / DynamicData

Reactive collections based on Rx.Net
http://dynamic-data.org
MIT License
1.73k stars 183 forks source link

[BUG] NuGet package leaks ReSharper annotation classes #384

Closed TheCatPlusPlus closed 2 years ago

TheCatPlusPlus commented 4 years ago

Describe the bug

Not a functional bug, but a packaging issue: DynamicData assembly in the NuGet packages contains ReSharper annotation attributes with public visibility (DynamicData.Annotations). And because the namespace is alphabetically before JetBrains.Annotations, ReSharper tends to want to import it instead when writing out annotations. It's not a huge deal, but still happens often enough to be mildly annoying.

Steps To Reproduce

Create an empty project referencing the package:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="DynamicData" Version="6.16.1" />
  </ItemGroup>

</Project>
using DynamicData.Annotations;

[UsedImplicitly]
public class Class1
{
}

Expected behavior

Private versions of these attributes should have internal visibility and the above example shouldn't compile.

The annotations are also available via JetBrains.Annotations package, so it might also be worth migrating to that instead of embedding them in a custom namespace. This is probably a better way to go if they're preserved in the assembly intentionally and not accidentally, as downstream projects are likely to be using the official namespace and not want the duplicates.

Environment

RolandPheasant commented 2 years ago

These were removed some time back so the problem should have gone away.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.