Skip to content

Import-Module should be able to find modules with semver versioned folders #21371

Description

Summary of the new feature / enhancement

For example, Import-Module MyModuleName should be able to find:

$env:PSModulePath\MyModuleName\1.0.0-preview.1\MyModuleName.psd1

While we would not yet be able to change PSResourceGet to install modules with this structure due to needing to support down level installs reading from the same folder, we should still add this logic into the engine so that we may one day (even if in five years).

Proposed technical implementation details (optional)

No response

Activity

  1. ThomasNieto commented on Mar 25, 2024

    @ThomasNieto
    Contributor

    Related issue: #2983

  2. ThomasNieto commented on Mar 25, 2024

    @ThomasNieto
    Contributor

    Once the engine has support for this feature PSResourceGet should have logic to enable prerelease folders while leaving earlier versions with the existing behavior.

  3. SeeminglyScience commented on Mar 25, 2024

    @SeeminglyScience
    ContributorAuthor

    Once the engine has support for this feature PSResourceGet should have logic to enable prerelease folders while leaving earlier versions with the existing behavior.

    There's a lot more risk associated with that as it would break folks trying who use multiple versions. This issue is just about a potential engine change that may open up a road for that in the future.

  4. o-l-a-v commented on Mar 25, 2024

    @o-l-a-v

    Will this suffice for nuget versioned packages though? Like 1.2.3.4-preview.1? Cause that's valid in the PSGallery, right? And PSResourceGet uses NugGet.Versioning.

  5. SeeminglyScience commented on Mar 26, 2024

    @SeeminglyScience
    ContributorAuthor

    Will this suffice for nuget versioned packages though? Like 1.2.3.4-preview.1? Cause that's valid in the PSGallery, right? And PSResourceGet uses NugGet.Versioning.

    The intent would be to mirror the versions that PSRG supports yeah. The idea would be to add only the most minimal implementation we can so that in the future when the oldest LTS also happens to be able to load modules like this, we would be able to actually consider making the transition.

    This issue is more of a placeholder until I can find the spare time to write a full proposal

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-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.WG-Engine-ModuleWG-NeedsReviewNeeds a review by the labeled Working Group

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions