vscode-shell-command icon indicating copy to clipboard operation
vscode-shell-command copied to clipboard

feat: support recursive input lookup

Open donorp opened this issue 1 year ago • 7 comments

Hi @augustocdias, thank you for creating such great extension, you saved my debugging routine.

One thing I believe could improve the UX a bit in this extension is the ability of recursive input lookup, but I guess that's not a frequently requested feature or no one is working on it, so I created this pull request.

Forgive me, such a large pull request and doing major code refactoring is bad for sure, but I was in a hurry and not fluent in typescript and OOP.

NOTICE the BREAKING change: env option changed from map to array of name value pairs to ensure resolving order

donorp avatar Aug 13 '22 10:08 donorp

somehow this pull request seems also implements #35 before window reload.

donorp avatar Aug 13 '22 10:08 donorp

Thank you for the PR. Don't worry because I'm not fluent in typescript either 😅

I'll check it and test next week

augustocdias avatar Aug 13 '22 13:08 augustocdias

About the breaking change. Perhaps we could implement some way to notify users the first time the updated extension is loaded

augustocdias avatar Aug 13 '22 13:08 augustocdias

About the breaking change. Perhaps we could implement some way to notify users the first time the updated extension is loaded

this, I would suggest releasing two versions, one major release with both command shellCommand.execute and extension id renamed to not break existing users, one minor release to notify users that major release with these breaking changes.

That is out of the scope of this pull request, so it's your decision to make.

donorp avatar Aug 13 '22 19:08 donorp

Another possible solution to the breaking change is to preserve all existing code, add a new command registration, just move code part of this pull request into a separate file and import as a new command.

donorp avatar Aug 14 '22 03:08 donorp

I like the feature, but I'm not a fan of the refactoring. You basically moved everything to a single file...

augustocdias avatar Aug 15 '22 13:08 augustocdias

You have every right to complain about this, but I could not find any reasonably easy way to not break existing implementation while adding the feature, and after serval failed attempts trying to keep the code object-oriented, I decided to redo it functional, and yes, in a single file, so you can easily checkout the file in another branch and decide otherwise.

donorp avatar Aug 17 '22 17:08 donorp