Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VerboseAction, DebugAction, ProgressAction, VerboseVariable, DebugVariable, and ProgressVariable common parameters #10238

Closed

Conversation

KirkMunro
Copy link
Contributor

@KirkMunro KirkMunro commented Jul 27, 2019

PR Summary

PR Context

As per #6702 and some considerations on one of my RFCs, this PR normalizes the common parameter set to allow for better scripter control for any stream in PowerShell.

This is the first step in facilitating easier capturing of stream data for logging purposes.

For the enquiring mind, it is even important to capture progress records, because some scripts are written to show a bunch of progress messages but not much else, and when these are run unattended and fail, it is impossible to know how far along they went before they failed. Capturing progress messages makes that problem go away.

PR Checklist

@Jaykul
Copy link
Contributor

Jaykul commented Jul 27, 2019

The alias for -Verbose is -vb and the alias for -Debug is -db ...

Should their respective Action and Variable short forms start with those prefixes?

That is, should -VerboseAction be -vba instead of -va, etc.?

I'm not sure. Certainly the InformationAction is the only one of the existing aliases that isn't a two-letter alias (and I don't actually know why), so there's good reason to stick with 2-letter initialisms.

@KirkMunro
Copy link
Contributor Author

KirkMunro commented Jul 27, 2019

I'm not sure either. Also, used three letters for the progress aliases (pra and prv) to differentiate them from the -PipelineVariable alias while maintaining "suffix" consistency between them and with the other aliases.

That is, should -VerboseAction be -vba instead of -va, etc.?

I don't think we want vba in PowerShell. 😝

Kidding of course. I'm not attached to anything I chose...I just picked what made sense at the time.

@vexx32
Copy link
Collaborator

vexx32 commented Jul 28, 2019

We should probably also make note that using -v as a shorthand for -Verbose is pretty common, especially in interactive cases.

If we're adding more parameters that by default conflict with that shorthand, we should probably add that as an explicit alias as well. :)

@KirkMunro
Copy link
Contributor Author

KirkMunro commented Jul 29, 2019

So here's an idea. These new parameters make the usefulness of -Verbose and -Debug questionable. Those are convenient, but not as capable as the new common parameters. What if -VerboseAction was defined as a Switchable<ActionPreference>, where Switchable<T> is a new generic type whose constructor accepts the true and false T values for the type, plus assignment operators for bool and T, and an implicit conversion operator to T. Switchable<T> would also need to be supported in the parser as a parameter with no value, of course. This is just thinking out loud, but I've been brainstorming some ideas on how I could obsolete old switches without breaking scripts, and with a proper alias plus the Switchable<T> type, this would allow switches like -Verbose and -Debug, and even -Information if we wanted it, to just work as if they were common switch parameters without even having them explicitly defined (-Warning, -Progress, and -Error would not be necessary since those messages are shown by default).

The benefit with this approach is to simplify and normalize the common parameters without losing muscle memory and without breaking existing scripts. This generic type would also provide a pattern that would allow for switch replacement in any other command, should the need for that arise.

@KirkMunro
Copy link
Contributor Author

KirkMunro commented Jul 29, 2019

Here is a screenshot that shows what ProgressRecord output looks like using the formatter:

image

Aside: That this screenshot demonstrates the problem identified in issue #10236 (many *Record types default format does not identify the actual type of message that is being conveyed, but they really should for logging/review/searching purposes).

@ghost ghost added the Review - Needed The PR is being reviewed label Jul 28, 2020
@ghost
Copy link

ghost commented Jul 28, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@TravisEz13 TravisEz13 added WG-Engine core PowerShell engine, interpreter, and runtime Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Review - Needed The PR is being reviewed labels Oct 27, 2020
@ghost ghost added the Stale label Nov 11, 2020
@ghost
Copy link

ghost commented Nov 11, 2020

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment.

@ghost ghost closed this Nov 22, 2020
@KirkMunro
Copy link
Contributor Author

KirkMunro commented Nov 24, 2020

C'mon, guys. 1.5 years post PR submission, you finally move forward with some action on this, but then your attention wanes at the end when some important questions are put on the table, and then you let it go stale and be closed? @TravisEz13: How was this marked waiting on author when the author (me) had responded with questions back to @PaulHigin?

It really is no wonder why I put my I put my interest in pushing PRs into this repo on hold until you all could catch up with the PRs that were already open and the discussions that were already started. I'm not all that surprised that this hasn't happened yet, but what does surprise me is that rather than properly managing what's there, you're allowing it get discarded. Such a waste.

@ghost ghost removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept Stale labels Nov 24, 2020
@iSazonov iSazonov reopened this Nov 24, 2020
@ghost ghost added the Review - Needed The PR is being reviewed label Dec 1, 2020
@ghost
Copy link

ghost commented Dec 1, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@KirkMunro
Copy link
Contributor Author

I'm walking away from my open PRs. I'm not really involved in PowerShell much these days. Personally I spend very little time using it, and at this point I don't have the time nor the motivation to deal with PRs submitted over 18 months ago.

As a point of feedback, this community is stagnant and unhealthy to participate in. It takes far too much personal effort and lobbying like a politician to get anything moving. Ideas on how to help the community move forward take years, and years, and years to bear any fruit at all. In software development, there is a balance between driving software forward based on internal business and internal/external customer priorities, and driving features and functionality that are quality of life improvements for the community of users using a product. This community has been, and in my mind clearly still is, focused almost exclusively on the former, and only considers the latter when it is of benefit to their goals for the former. It is not balanced at all when it comes to community contributions. Glancing at the history of closed PRs, and who those PRs come from, is clear evidence of this, and it seems obvious where your focus is internally for team member MBOs.

@mklement0
Copy link
Contributor

@KirkMunro, I was going to say that we'll miss your contributions in all forms in this community.

But then I realized: there is no we.
But first, let's invite a few more people to the good-bye party: @SteveL-MSFT, @joeyaiello, @bpayette, @rjmholt, @sdwheeler.

I share your assessment of what is problematic about this community; let me point to two particularly striking examples that I've personally expended a lot of energy on:

In my perception, these two issues (the specific comments tell the history) exemplify several problematic patterns:

  • Fiat decisions handed down with little to no explanation, often indicative of unawareness of the specifics of a proposal / lack of sufficient subject-matter expertise, followed by unwillingness to explain or debate the decision.

    • Working groups were supposed to help with that, but in my personal experience it seems to be just more of the same.
  • Many quality-of-life-improvement proposals either getting ignored altogether, being met with indignant pushback ("very much by design"), argument-less claims of lack of arguments ("I don't believe you've made the argument sufficiently"), followed by eternal silence when counterarguments are made.

  • Vague promises of revisiting issues that never materialize.

I hope that the many talented people that still make up this community have the stamina to continue to contribute, as things - hopefully - improve, but personally I feel burned out and, save for perhaps filing the occasional bug report prompted by real-life use, I will cease my activities here and in the docs repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-Engine Indicates that a PR should be marked as an engine change in the Change Log Documentation Needed in this repo Documentation is needed in this repo Review - Needed The PR is being reviewed WG-Engine core PowerShell engine, interpreter, and runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants