Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] Update dependencies from dotnet/roslyn-analyzers #67189

Merged
merged 2 commits into from
Mar 28, 2022

Conversation

dotnet-maestro[bot]
Copy link
Contributor

@dotnet-maestro dotnet-maestro bot commented Mar 26, 2022

This pull request updates the following dependencies

From https://github.com/dotnet/roslyn-analyzers

  • Subscription: 5465c78f-1281-49a8-f9b0-08d9301a7704
  • Build: 20220324.1
  • Date Produced: March 24, 2022 10:29:51 PM UTC
  • Commit: 40702da4e57358b9165bdf697f044826d40963bc
  • Branch: refs/heads/main

…uild 20220324.1

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.22166.1 -> To Version 7.0.0-preview1.22174.1
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-codeflow for labeling automated codeflow label Mar 26, 2022
@danmoseley
Copy link
Member

@jkoritzinsky these are now causing a warning. Does this assembly need DisableRuntimeMarshalling.cs?

        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        internal delegate uint SetContextDelegate(
            SafeHandle handle,
            IntPtr context);

@jkoritzinsky
Copy link
Member

I was working on this in another DARC update PR. I'll port my changes over here and get this one passing and ready to merge.

@jkoritzinsky jkoritzinsky self-assigned this Mar 27, 2022
@danmoseley
Copy link
Member

Just curious, I see many assemblies have DisableRuntimeMarshalling currently. Does this mean none of those are suitable for no-JIT targets? Or that's just a work in progress?

@jkoritzinsky
Copy link
Member

DisableRuntimeMarshalling is a feature we added to support source-generated interop. The build failures we're seeing here are on places that will likely fail at runtime due to which features are disabled when the attribute is applied that I missed when initially applying the attribute (an analyzer that warns on places likely to break was added in Roslyn-analyzers to help catch failures at build time).

…few extraneous places to source-generated marshalling and removing some unused attributes.
@danmoseley
Copy link
Member

System.ArgumentNullException : Value cannot be null. (Parameter 'packageStream')


Stack trace
   at NuGet.Packaging.PackageExtractor.ExtractPackageAsync(String source, Stream packageStream, PackagePathResolver packagePathResolver, PackageExtractionContext packageExtractionContext, CancellationToken token, Guid parentId)
   at Microsoft.CodeAnalysis.Testing.ReferenceAssemblies.ResolveCoreAsync(String language, CancellationToken cancellationToken) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/ReferenceAssemblies.cs:line 358
   at Microsoft.CodeAnalysis.Testing.ReferenceAssemblies.ResolveAsync(String language, CancellationToken cancellationToken) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/ReferenceAssemblies.cs:line 197
   at Microsoft.CodeAnalysis.Testing.ReferenceAssemblies.ResolveAsync(String language, CancellationToken cancellationToken) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/ReferenceAssemblies.cs:line 174
   at LibraryImportGenerator.UnitTests.TestUtils.ResolveReferenceAssemblies(ReferenceAssemblies referenceAssemblies) in /_/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/TestUtils.cs:line 228
   at LibraryImportGenerator.UnitTests.TestUtils.GetReferenceAssemblies(TestTargetFramework targetFramework) in /_/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/TestUtils.cs:line 174
   at LibraryImportGenerator.UnitTests.TestUtils.CreateCompilation(SyntaxTree[] sources, TestTargetFramework targetFramework, OutputKind outputKind) in /_/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/TestUtils.cs:line 132
   at LibraryImportGenerator.UnitTests.AdditionalAttributesOnStub.SkipLocalsInitOnDownlevelTargetFrameworks(TestTargetFramework targetFramework, Boolean expectSkipLocalsInit) in /_/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/AdditionalAttributesOnStub.cs:line 143
--- End of stack trace from previous location ---

@jkoritzinsky
Copy link
Member

That failure is dotnet/roslyn-sdk#974

@jkoritzinsky
Copy link
Member

@danmoseley on a re-run of that leg, the test didn't fail. Can you take a quick review of this PR so we can get this in?

@danmoseley danmoseley merged commit 1a2830b into main Mar 28, 2022
@danmoseley danmoseley deleted the darc-main-b8047b4c-6644-4286-a460-6c1dbdaa74bc branch March 28, 2022 22:41
radekdoulik pushed a commit to radekdoulik/runtime that referenced this pull request Mar 30, 2022
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220324.1

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.22166.1 -> To Version 7.0.0-preview1.22174.1

* React to DisableRuntimeMarshalling attribute analyzer by switching a few extraneous places to source-generated marshalling and removing some unused attributes.

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
@ghost ghost locked as resolved and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-codeflow for labeling automated codeflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants