Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Switch over miscellaneous DllImports to GeneratedDllImport.#62353

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jkoritzinsky merged 13 commits intodotnet:mainfromjkoritzinsky:misc-gendllimport
Dec 9, 2021

Conversation

jkoritzinsky
Copy link
Member

These P/Invokes slipped through the cracks for their respective libraries because they're either only used on platforms where getting the analyzer to run in VS is more difficult (CoreLib for mobile platforms) or they were missed in the first pass.

These P/Invokes slipped through the cracks for their respective libraries because they're either only used on platforms where getting the analyzer to run in VS is more difficult (CoreLib for mobile platforms) or they were missed in the first pass.

[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, SetLastError = true)]
#pragma warning disable DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we support non-blittable types.
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be better to reference tracking issue

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This is the comment pattern we've used even migrating over the rest of the DllImports, so I'd prefer to match that.

@jkoritzinskyjkoritzinsky merged commit3dc93b3 intodotnet:mainDec 9, 2021
@jkoritzinskyjkoritzinsky deleted the misc-gendllimport branchDecember 9, 2021 00:47
@marek-safar
Copy link
Contributor

Curious why don't we have code analyzers/fixers for this?

@stephentoub
Copy link
Member

Curious why don't we have code analyzers/fixers for this?

See the opening PR comment:
"These P/Invokes slipped through the cracks for their respective libraries because they're either only used on platforms wheregetting the analyzer to run in VS is more difficult (CoreLib for mobile platforms)"

It's not blanketly enabled as a warning for the whole repo yet as the team has been working through the changeover library by library.

@marek-safar
Copy link
Contributor

Great news. I didn't know there is an analyzer available already.

@ghostghost locked asresolvedand limited conversation to collaboratorsJan 8, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@marek-safarmarek-safarmarek-safar left review comments

@stephentoubstephentoubstephentoub approved these changes

@AaronRobinsonMSFTAaronRobinsonMSFTAaronRobinsonMSFT approved these changes

@elinor-fungelinor-fungAwaiting requested review from elinor-fung

Assignees
No one assigned
Projects
None yet
Milestone
7.0.0
Development

Successfully merging this pull request may close these issues.

4 participants
@jkoritzinsky@marek-safar@stephentoub@AaronRobinsonMSFT

[8]ページ先頭

©2009-2025 Movatter.jp