Skip to content

Unify corelib interop files with common ones #1232

Closed

Description

@danmoseley

As an artefact of the repo merge we have files duplicated between src\libraries\Common\src\Interop and src\libraries\System.Private.CoreLib\src\Interop

The list is these (just going by file name)

Interop\Unix\Interop.Libraries.cs
Interop\Unix\System.Native\Interop.GetPid.cs
Interop\Windows\Interop.Errors.cs
Interop\Windows\Interop.Libraries.cs
Interop\Windows\Kernel32\Interop.Constants.cs
Interop\Windows\Kernel32\Interop.CreateFile.cs
Interop\Windows\Kernel32\Interop.FILE_INFO_BY_HANDLE_CLASS.cs
Interop\Windows\Kernel32\Interop.FreeLibrary.cs
Interop\Windows\Kernel32\Interop.GetCurrentProcessId.cs
Interop\Windows\Kernel32\Interop.GetFileInformationByHandleEx.cs
Interop\Windows\Kernel32\Interop.GetProcessTimes.cs
Interop\Windows\Kernel32\Interop.GlobalMemoryStatusEx.cs
Interop\Windows\Kernel32\Interop.LoadLibraryEx.cs
Interop\Windows\Kernel32\Interop.LocalAlloc.cs
Interop\Windows\Kernel32\Interop.VirtualAlloc.cs
Interop\Windows\Kernel32\Interop.VirtualQuery.cs
Interop\Windows\NtDll\Interop.NtQuerySystemInformation.cs
Interop\Windows\User32\Interop.Constants.cs
Interop\Windows\User32\Interop.SendMessageTimeout.cs

In each case we should verify the content is the same (or unify it) then delete the System.Private.CoreLib copies in favor of the common ones, updating src\libraries\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems and src\coreclr\src\System.Private.CoreLib\System.Private.CoreLib.csproj to match

@jkotas I thought we had a work item for unifying interop stuff but I couldn't find it. Maybe it was already complete and this is another.

Activity

  1. added
    untriaged
    on Jan 1, 2020
  2. danmoseley commented on Jan 1, 2020

    @danmoseley
    ContributorAuthor

    System.Private.CoreLib.Shared.projitems can be prettied a bit, eg., there are 2 blocks with the same condition <ItemGroup Condition="'$(TargetsWindows)' == 'true'">

  3. jkotas commented on Jan 1, 2020

    @jkotas
    Member

    We should move all Interop.* files from CoreLib to Common. I have been working on and off on it in https://github.com/jkotas/runtime/tree/corelib-interop

  4. added a commit that references this issue on Jan 22, 2020
  5. added a commit that references this issue on Jan 27, 2020
    059b57a
  6. ghost locked as resolved and limited conversation to collaborators on Dec 11, 2020
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

    untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions