Skip to content

Need psl-native library code review #6874

Closed

Description

@iSazonov

psl-native library appeared at the time of the first version .Net Core 1.0 which had many limitations.
Currently we moved to .Net Core 2.1 and we need to review psl-native library code and remove unneeded p/invokes. Ideally we could remove this library altogether.

TODO Tasks (Please check when it's finished):

Activity

  1. added
    Issue-Code Cleanup
    on May 15, 2018
  2. TravisEz13 commented on May 16, 2018

    @TravisEz13
    Member

    I reviewed and SetDate is still needed

  3. iSazonov commented on May 16, 2018

    @iSazonov
    CollaboratorAuthor

    We could use other glibc function (without tm struct) to fix SetDate.

  4. iSazonov commented on May 16, 2018

    @iSazonov
    CollaboratorAuthor

    I started reviewing and already found APIs not used. Will push PR.

    Some APIs use struct-s and we need review this in depth. We should either use .Net API or fix as recommended by CoreFX team or use another Unix API.

    Paul Higinbotham (@PaulHigin) Can we remove the unused code?
    https://github.com/PowerShell/PowerShell/blob/master/src/libpsl-native/src/createprocess.cpp#L79

  5. PaulHigin commented on May 17, 2018

    @PaulHigin
    Contributor

    Hi Ilya (@iSazonov) This is still needed for Linux platforms for SSH remoting.
    https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/remoting/common/RunspaceConnectionInfo.cs#L2368

    We use this native code to create a client SSH process with the needed attributes, and this is not support by DotNet. Also they indicated they would not support it in the future.

  6. TravisEz13 commented on May 17, 2018

    @TravisEz13
    Member

    Ilya (@iSazonov) I reviewed for structs that cross into managed code and I only found the one and have PR #6881 to fix as DotNet recommended.

  7. dantraMSFT commented on May 17, 2018

    @dantraMSFT
    Contributor

    psl-native is also needed for syslog and os_log.

  8. adityapatwardhan commented on Jun 14, 2018

    @adityapatwardhan
    Member

    The native code is going to be moved to its own repo: https://github.com/PowerShell/PowerShell-Native

    Please make changes here. I am working on creating builds and setting up CI system for it.

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

    Issue-Code Cleanup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions