Skip to content

WIP: Add string cmdlets that emulate operator functionality on pipeline - #6753

Closed
Friedrich Weinmann (FriedrichWeinmann) wants to merge 17 commits into
PowerShell:masterfrom
FriedrichWeinmann:master
Closed

Friedrich Weinmann (FriedrichWeinmann) wants to merge 17 commits into
PowerShell:masterfrom
FriedrichWeinmann:master

Conversation

@FriedrichWeinmann

@FriedrichWeinmann Friedrich Weinmann (FriedrichWeinmann) commented Apr 27, 2018 •

Copy link
Copy Markdown

PR Summary

Adds commands that enable string manipulation on the pipeline. Specifically emulates common string operators, as well as frequently used string methods.

New Commands added:

  • Add-String
  • Format-String
  • Get-SubString
  • Join-String
  • Set-String
  • Split-String

PR Checklist

See also:
#6697

@FriedrichWeinmann

Copy link
Copy Markdown
Author

Still needs a corresponding documentation update, specifically command help for the new commands. Do I just add new platyPS compatible markdown files to the command reference in the documentation repository?

@iSazonov

Ilya (iSazonov) commented Apr 27, 2018 •

Copy link
Copy Markdown
Collaborator

Friedrich Weinmann (@FriedrichWeinmann) Please follow our RFC process - we should get RFC approved by PowerShell Committee before implementing new cmdlets. The RFC should contains motivations (addressed scenarios), design proposal and alternative considerations.

@FriedrichWeinmann

Copy link
Copy Markdown
Author

Hi Ilya (@iSazonov) ,

thanks for pointing me at the relevant section on that - I tried reading it all, but there's just ... a lot for a first attempt. Sure, will file an RFC if that's desirable - Bruce just told me to go file an issue at PSConfEU. I coded the actual implementation based on that pretty much as ...

  • A way to give people a preview - a comparison base of what it might look like. Being able to touch the actual design, rather than having a dusty document is just more real for many people.
  • A way to figure out how this whole process works (given the complexity I was sure I would be getting it wrong the first time around, no matter what)

So yes, even if the initial reception was rather positive in general, I went ahead with the full knowledge that I might be wasting my time if the proposal got reject or large revisions - like those proposed by you - were decided upon.

I'll be filing that RFC as soon as I can make the time to fully read that documentation and process and write it all up - might take a day or two alas :(

If you have any guidance to offer regarding the documentation question as well - whether for this or for future issues - that would be much appreciated.

@iSazonov

Copy link
Copy Markdown
Collaborator

Friedrich Weinmann (@FriedrichWeinmann) The PR is good for first-time. Now I don't don't want to waste your time and push review comments before we get approved RFC.

Creating RFC is the same - fork RFC repo, create branch, commit, push PR, get and address feedbacks. Minimum time for waiting feedback is one month.

The RFC should contains:

  • motivations (addressed scenarios). We need samples what is current expirience, why it is bad and how we want address this. It will be a good base for tests and documentation.
  • design proposal. From my experience we do not need small details.
  • alternative considerations. For the proposal it can be operators, third-party modules, .Net Core methods, one cmdlet design and so on. We should understand why the proposal is better - UX, performance, resource consumption and so on.

@FriedrichWeinmann

Copy link
Copy Markdown
Author

Heya Ilya (@iSazonov) : RFC filed: PowerShell/PowerShell-RFC#127 :)

Thanks for the preliminary feedback on the PR, I'm assuming it's ok to keep it open marked as WIP in the meantime, allowing people to try things out for the sake of the discussion.

That said, if you could tell me how - or rather where - in the end command help should be contributed, that would be great. I'm sure it's written in one of those guides, but it really is a forest of documentation :(

@markekraus

Copy link
Copy Markdown
Contributor

Friedrich Weinmann (@FriedrichWeinmann) if your asking where command help goes, that would be in the PowerShell-Docs repo. Best bet would be to use PlatyPS to generate the initial markdown files, copy and modify the metadata from one of the existing Docs project files, update the markdown documentation, and then submit the PR to the docs repo.

@BrucePay

Copy link
Copy Markdown
Collaborator

Ilya (@iSazonov) I asked Friedrich Weinmann (@FriedrichWeinmann) to file the issue to gauge interest before expending the effort on writing the RFC. Based on our discussions in Germany, he already had substantially implemented things and so now we have code, tests (and documentation?). But it does need to be reviewed by the committee before proceeding. As far as the RFC goes, I imagine it should be pretty simple - fill in the section on motivation and the specification part is the code, tests and the documentation - essentially this PR. (note: If there was much code or if it was complex, I would expect a more detailed specification but it's not. The parameter specifications are longer than the method bodies) But the rest of the committee members will have to agree with that.

@BrucePay Bruce Payette (BrucePay) added the Review - Committee The PR/Issue needs a review from the PowerShell Committee label May 5, 2018
@iSazonov

Copy link
Copy Markdown
Collaborator

Bruce Payette (@BrucePay)

As far as the RFC goes

We have already received a community feedback that MSFT makes rules and processes and then violate them itself. I believe Joey Aiello (@joeyaiello) and Steve Lee (@SteveL-MSFT) remember about it. I see no reasons why we should again violate our obligations to the community.

@BrucePay

Copy link
Copy Markdown
Collaborator

Ilya (@iSazonov) I am acutely aware of our issues WRT process. And I didn't say that there shouldn't be an RFC, I'm merely pointing out that, because there is working code, the design portion need not be that detailed. The cmdlet signatures are in the code. The behaviour is in the code. And most specifically the tests, which make the behaviour clear, are there as well.

@SteveL-MSFT

Copy link
Copy Markdown
Member

@PowerShell/powershell-committee appreciates the publishing of the RFC. This PR should not be merged until the RFC is approved and any accepted feedback is addressed in this PR. Thanks for the contribution!

@SteveL-MSFT Steve Lee (SteveL-MSFT) added the Committee-Reviewed PS-Committee has reviewed this and made a decision label May 16, 2018
@SteveL-MSFT Steve Lee (SteveL-MSFT) removed the Review - Committee The PR/Issue needs a review from the PowerShell Committee label May 16, 2018
@stale

stale Bot commented Jun 15, 2018

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days.
Thank you for your contributions.
Community members are welcome to grab these works.

@stale stale Bot added the Stale label Jun 15, 2018
@stale

stale Bot commented Jun 26, 2018

Copy link
Copy Markdown

This PR has be automatically close because it is stale. If you wish to continue working on the PR, please first update the PR, then reopen it.
Thanks again for your contribution.
Community members are welcome to grab these works.

@stale stale Bot closed this Jun 26, 2018
@BrucePay

Copy link
Copy Markdown
Collaborator

Reopening so we can resume making progress on this (sincere apologies to Friedrich Weinmann (@FriedrichWeinmann) for the delays). And now that we have experimental features, this could be done as an experimental feature so we can get (broader) feedback on the names and functionality. (And Steve Lee (@SteveL-MSFT) Is working on some new commands that will make it easier to discover, enable and manage these features.)

@stale stale Bot removed the Stale label Nov 28, 2018
@stale

stale Bot commented Feb 16, 2019

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days.
Thank you for your contributions.
Community members are welcome to grab these works.

@stale stale Bot added the Stale label Feb 16, 2019
@stale

stale Bot commented Feb 26, 2019

Copy link
Copy Markdown

This PR has been automatically closed because it is stale. If you wish to continue working on the PR, please first update the PR, then reopen it.
Thanks again for your contribution.
Community members are welcome to grab these works.

@stale stale Bot closed this Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Committee-Reviewed PS-Committee has reviewed this and made a decision Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants