GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Test-ModuleManifest fails if RequiredModules in module manifest contains entry 'Az' · Issue #8703 · PowerShell/PowerShell

Test-ModuleManifest fails if RequiredModules in module manifest contains entry 'Az' #8703

New issue
Copy link
New issue
Copy link
Closed
Closed
Test-ModuleManifest fails if RequiredModules in module manifest contains entry 'Az'#8703
Copy link
Labels
Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.

Description

@coin8086
Robert Zhang (coin8086)
opened on Jan 21, 2019
Issue body actions

Steps to reproduce

Test-ModuleManifest xxx.psd1

Expected behavior

The test gets passed.

Actual behavior

Test-ModuleManifest : The specified RequiredModules entry 'Az' in the module manifest 'xxx.psd1' is invalid. Try again after updating this entry with valid values.
At line:1 char:1
+ Test-ModuleManifest xxx.psd1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (xxx.psd1:String) [Test-ModuleManifest], DirectoryNotFoundException
+ FullyQualifiedErrorId : Modules_InvalidRequiredModulesinModuleManifest,Microsoft.PowerShell.Commands.TestModuleManifestCommand

Environment data

Name                           Value
----                           -----
PSVersion                      6.1.2
PSEdition                      Core
GitCommitId                    6.1.2
OS                             Linux 4.15.0-1036-azure #38~16.04.1-Ubuntu SMP Fri Dec 7 03:21:52 UTC 2018
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Emergency

This is effectively blocks a module that depends on Az - the Azure PowerShell module, because when Publish-Module the new module, Test-ModuleManifest is triggered and the failure blocks the publish, we're developing a new module on Az and plan to deliver it to customer in one week, but are stuck at this!

Activity

  1. coin8086 commented on Jan 21, 2019

    @coin8086
    Robert Zhang (coin8086)
    on Jan 21, 2019
    Author
    More actions

    I've filed an issue for Azure/azure-powershell at Azure/azure-powershell#8364 Maybe that's more appropriate. So close it for now.

  2. Robert Zhang (coin8086)
    closed this as completedon Jan 21, 2019
  3. vexx32 commented on Jan 21, 2019

    @vexx32
    Rain Sallow (/u/ta11ow) (vexx32)
    on Jan 21, 2019
    Collaborator
    More actions

    Robert Zhang (@coin8086) for some context, the reason this happens is (to my knowledge) because Az is a reserved culture code, referring to Cyrillic/Azerbaijan.

    I believe the PowerShell team ended up having to add an explicit exception in the code so that the Az module would even be properly discovered for autoloading, if I recall the PR correctly.

    I agree with you; this is really something that shouldn't have happened in the first place; there's no reason the module name nor the module folder name needed to collide with a reserved culture code, and it should be fixed.

    That said, given the outcome of the recent PR here on that matter, PowerShell may end up having to bend on that one as well, however inadvisable it might be.

    /cc Steve Lee (@SteveL-MSFT) as I think he was involved in the PR when that issue arose and may want to chime in here.

  4. coin8086 commented on Jan 21, 2019

    @coin8086
    Robert Zhang (coin8086)
    on Jan 21, 2019
    Author
    More actions

    Rain Sallow (/u/ta11ow) (@vexx32) Thanks for your quick reply and input! I'm blocking on this and I believe this also blocks everyone who wants to deliver a module depending on Az. It would be great if PS Core could provide any help. Do you think it helps to keep the issue open on PS Core? Thanks anyway. Michael Yanni (@MiYanni)

  5. vexx32 commented on Jan 21, 2019

    @vexx32
    Rain Sallow (/u/ta11ow) (vexx32)
    on Jan 21, 2019
    Collaborator
    More actions

    I'm not sure how complex this particular problem would be to fix frem this side, but I'm sure Steve or one of the others would have a better idea there.

    It'd be pretty trivial for the Azure module to just change the name and avoid the problem altogether, but I don't really know if that would cause a wider detrimental impact.

  6. coin8086 commented on Jan 21, 2019

    @coin8086
    Robert Zhang (coin8086)
    on Jan 21, 2019
    Author
    More actions

    I'm not sure how complex this particular problem would be to fix frem this side, but I'm sure Steve or one of the others would have a better idea there.

    It'd be pretty trivial for the Azure module to just change the name and avoid the problem altogether, but I don't really know if that would cause a wider detrimental impact.

    OK, thanks. I see it. I'm afraid renaming is not their choice, at least in the short time, since that has a lot impact on current document and client code, almost everywhere in Azure.

    My last resort would be install Az manually and don't list it in dependency, however troublesome it is. Let's see if there's any better way.

  7. coin8086 commented on Jan 21, 2019

    @coin8086
    Robert Zhang (coin8086)
    on Jan 21, 2019
    Author
    More actions

    Steve Lee (@SteveL-MSFT) Dongbo Wang (@daxian-dbw)
    #8125
    This seems a similar issue.

  8. Robert Zhang (coin8086)
    reopened this on Jan 21, 2019
  9. Robert Zhang (coin8086)
    changed the title [-]Test-ModuleManifest always fails if the module manifest's RequiredModules contains entry 'Az'[/-] [+]Test-ModuleManifest fails if RequiredModules in module manifest contains entry 'Az'[/+] on Jan 21, 2019
  10. Ilya (iSazonov)
    added
    Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.
    on Jan 21, 2019
  11. SteveL-MSFT commented on Jan 22, 2019

    @SteveL-MSFT
    Steve Lee (SteveL-MSFT)
    on Jan 22, 2019
    Member
    More actions

    Yes, this is a dupe.

  12. Steve Lee (SteveL-MSFT)
    closed this as completedon Jan 22, 2019
  13. coin8086 commented on Jan 23, 2019

    @coin8086
    Robert Zhang (coin8086)
    on Jan 23, 2019
    Author
    More actions

    Yes, this is a dupe.

    Dup to #8125? Could I know the progress of it? When will you fix it, or do you have an estimated time? Thanks!

  14. SteveL-MSFT commented on Jan 29, 2019

    @SteveL-MSFT
    Steve Lee (SteveL-MSFT)
    on Jan 29, 2019
    Member
    More actions

    Robert Zhang (@coin8086) see #8777

    Reacted by Robert Zhang
  15. nexocentric commented on Mar 29, 2022

    @nexocentric
    Dodzi Dzakuma (nexocentric)
    on Mar 29, 2022
    More actions

    I'm currently dealing with issues on related to this bug. Regardless of where it is fixed, what would be a viable work around for someone running into this issue.

    I've searched quite a bit on the web and the threads related to this are right on the nose in terms of problems, but there are no solutions.

    In my psd1 file, if I specify RequiredModules = @('Az') I run into the issue.

    I do not want to specify each Az individual model as I am building against all of it and the expectation is that someone will have this installed locally.

    What options do I have to specify the required modules? Is there a wild card that I can specify that will separate it from the Cyrillic/Azerbaijan locale that it is hitting?

    Maybe even a alias for the Az modules that allows me to specify all of the Az modules.

    Thanks for your help and support.

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

    Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.