| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Something is wrong with your change in this file. The diff is messed up.
Sorry, something went wrong.
There was a problem hiding this comment.
Please fix the change in TestModuleManifestCommand.cs
Sorry, something went wrong.
|
Dongbo Wang (@daxian-dbw) code file format fixed |
Sorry, something went wrong.
|
Chunqing Chen (@chunqingchen) Thanks! Will continue the review. |
Sorry, something went wrong.
There was a problem hiding this comment.
The test assert folder testmodulerunspace should be moved to engine\Module\assets folder. Create assets folder if it doesn't exist.
All test assets should follow this pattern, take a look at the test\powershell\engine\Help\assets folder as an example.
Sorry, something went wrong.
There was a problem hiding this comment.
Setup should go in BeforeAll block.
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
Cleanup should go in AfterAll block.
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
This is not UserModulePath. If you want to use the Module folder that's next to powershell.exe, then replace ...currentdomain.basedirectory with $pshome.
And also, there is no need to use $script: for this variable.
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
Setup should go in BeforeAll
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
this catch doesn't seem necessary -- if it just rethrows the exception, why would you catch it?
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
Don't you need to wait for the job to finish to read all verbose message?
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
What does the number 50 mean here? Why do you think -le 50 means it doesn't load unnecessary modules?
Sorry, something went wrong.
There was a problem hiding this comment.
Prior to the fix test-modulemanifest will load all the modules in the $pshome, creating a far more big verbose list.
50 is a random small number that small enough to make sure the issue doesn't repro.
It can't be fixed as well since the verbose message contains other information that may vary.
I've changed the number to an even smaller number 15.
Sorry, something went wrong.
There was a problem hiding this comment.
Can you please remove all comments in this file? They make it hard to see what fields are actually used.
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
Same here, please remove all comments.
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
I don't see this file used in ModuleWithDependencies2.psd1, is it really needed?
Sorry, something went wrong.
There was a problem hiding this comment.
deleted
Sorry, something went wrong.
There was a problem hiding this comment.
Use named parameters.
Sorry, something went wrong.
There was a problem hiding this comment.
this is a sync fix of the bug fix under windows bug 7980238.
so I would prefer to keep the code the way the original fix was
Sorry, something went wrong.
There was a problem hiding this comment.
I think they should be made named parameters (as well as the other GetModule call in the same file). We don't make any changes to the original fix when re-submitting it for the sake of less churn. Now when making changes to the Github code base, we want the changes to follow best practices.
Sorry, something went wrong.
There was a problem hiding this comment.
The comment regarding named parameters is not resolved yet.
Sorry, something went wrong.
There was a problem hiding this comment.
Please fix indentation
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
Do not need \Modules, Modules should be sufficient
Sorry, something went wrong.
There was a problem hiding this comment.
Add end of line.
Sorry, something went wrong.
There was a problem hiding this comment.
Add end of line.
Sorry, something went wrong.
There was a problem hiding this comment.
Join-path "$pshome\Modules"
Does this call to Join-Path even work?
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
You should use BeLessThan here. See https://github.com/pester/Pester/wiki/Should#belessthan
Sorry, something went wrong.
There was a problem hiding this comment.
And please put your rational about using the number '15' in comments here, so that people look at this code later will understand it.
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
There are so many comments in this file that you haven't deleted yet.
Sorry, something went wrong.
There was a problem hiding this comment.
i thought you mean the comments added in addition to the auto generated ones. resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
ditto
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
|
Dongbo Wang (@daxian-dbw) Aditya Patwardhan (@adityapatwardhan) your comments are resolved |
Sorry, something went wrong.
There was a problem hiding this comment.
typo frefresh -> refresh
Sorry, something went wrong.
There was a problem hiding this comment.
resolved, thank you
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
This can be
$TestModulesPath = Join-path -Path "$PSScriptRoot\assets" -ChildPath $TestModulesFolder -AdditionalChildPath 'testmodulerunspace'
Sorry, something went wrong.
There was a problem hiding this comment.
I didn't get it. Any good besides it putting two lines into one? It also throws error once I copied it. Can we just skip this comment?
Sorry, something went wrong.
There was a problem hiding this comment.
This should be FunctionsToExport = @()
Sorry, something went wrong.
There was a problem hiding this comment.
resolved, thanks
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
This should be CmdletsToExport = @()
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
This should be AliasesToExport = @()
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
Same comments as the other module.
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
There was a problem hiding this comment.
Should be -ErrorAction SilentlyContinue
Sorry, something went wrong.
There was a problem hiding this comment.
resolved, thanks
Sorry, something went wrong.
There was a problem hiding this comment.
Should be -ErrorAction SilentlyContinue
Sorry, something went wrong.
There was a problem hiding this comment.
resolved
Sorry, something went wrong.
| @@ -0,0 +1 @@ | |||
| function Get-NestedRequiredModule1 { Get-Date } No newline at end of file | |||
There was a problem hiding this comment.
missing new line at end of file.
Sorry, something went wrong.
Comments addressed.
| Back | FazBrowse Home | New Git URL |
Fix issue #4533
Summary of the issue:
Test-ModuleManifest is loading unnecessary modules
Fix:
Change the recursive loading flag from 'true' to 'false'