PoshCode / ModuleBuilder

A PowerShell Module to help scripters write, version, sign, package, and publish.
MIT License
445 stars 54 forks source link

'RequiredVersion' fix & feedback #58

Closed kitpierce closed 5 years ago

kitpierce commented 5 years ago

Correct exception when calling 'RequiredVersion' & add user feedback on progress via 'Write-Host' & 'Write-Verbose'

kitpierce commented 5 years ago

First ever PR here, please forgive any ignorance of process...

It looks like the checks are failing on build.ps1, but this PR only modifies bootstrap.ps1.

Jaykul commented 5 years ago

Overall question: What is the value of all the verbose feedback on a bootstrap script?

I want to encourage first time contributions, but you're not addressing an issue that was filed or a bug, so you need to explain why you think this is necessary.

Without testing it, I feel sure you've added seconds to the run time of this just to output information that I think isn't necessary.

The primary goal of the script is to install a few modules if necessary

The secondary goal is to be as small, as simple, and as fast as possible

I only wrote this because PowerShellGet doesn't have this feature yet, and PSDepends is too big and complex for my needs (and didn't have a bootstrap for itself).

I believe that as it currently is, this script outputs the ModuleInfo for modules which were missing as it installs them, and if none are missing, it quietly does nothing. I think that quietly doing nothing is actually the preferred result.

I would love for the script to be more readable, but not at the cost of speed or length. I have been trying hard to keep the file small enough for people to quickly scan and verify it's not malicious.

Jaykul commented 5 years ago

Inspired by this, and after some frustrating conversations at the MVP summit, I've rewritten bootstrap completely with a lot more output as you had here. I'm going to reject this PR though, because now that I've rewritten it, this would be impossible to merge.