[PSS 2017] Module Project: Import and merge

Post feature requests, product enhancement ideas, and other product-specific suggestions here. Do not post bug reports.
Forum rules
Do not post any licensing information in this forum.
Locked
User avatar
Bosparan
Posts: 282
Joined: Sun Mar 03, 2013 12:45 pm

[PSS 2017] Module Project: Import and merge

Post by Bosparan » Wed Feb 22, 2017 8:37 am

Hello,

sooo ... I've been caught by Chrissy LeMaire's dbatools project. It's a lot of fun, but working on it with PSS has turned out to be ... less than optimal. Concider this (by now for me all too familiar) scenario:
You come from work and checj out the community project you collaborate with.
Yehaa, since yesterday 7 PRs were closed, 8 new files and 15 changed files.
So, since I like working with the brightest and latest, I start Git Console, update my own branch and sync my local repository. Now, I have a folder with lot's of PowerShell inside, a big PowerShell Module. If I want to work on it in PSS, I have to somehow get those files into a PSS module project. All the hundreds of files. There is no automatism for it, your average user has the option to create a new module and manually add it file-by-file ... or he might just not use PSS Studio for that, or only on a per-file basis. All of which isn't really utilizing the full power of PSS.
Updates on existing modules aren't much more fun than that.

The quick fix
Implementing functions that create and update the project from the repository folder. I've built them for myself. They currently rely on my toolkit, currently in the process of upgrading them for use in my module "PSModuleDevelopment". Will send you a copy when they are standalone capable.

now, for the real solution:

Import Module
Add an "Import from Module" functionality, that imports an existing module into a new module.
Ignores the typical "git" files. Prompts for non-typical files.

Update from Module
In an existing project, add the option to pull all differences from a folder:
- On files that are different, offer to overwrite, keep or compare in scriptmerge (if available)
- On files that exist in the project, but not in the update source, offer to delete them
- On files that exist in the update source but not in the project: Update them
In the project configuration, allow exempting parts of the project. For example I could place the scripts I'm working on in a new folder named "development" (which doesn't exist in the Git project). Then I configure the project to not touch that folder. During updates, it will not consider those files at all (so it won't offer to delete them, since they aren't in the original project.

Related stuff
A "flush all cashes" button would also be helpful. PSS stores previous versions of a script I'm currently working on in the hidden ".TempPoint.ps1" files. I'm a big fan of that feature, but those files need to be gone when I'm done editing. So what I'd like to do is to have a button to cleanse them.
Well, I have a function that does it - not that dreadfully difficult to write - but having it integrated would be nicer, I think.

Cheers,
Fred

PS: I know there's an option to clear the Restore Points on closing PSS, but ... why would I want to close PSS?

User avatar
DevinL
Site Admin
Posts: 1098
Joined: Mon Aug 17, 2015 2:25 pm

Re: [PSS 2017] Module Project: Import and merge

Post by DevinL » Wed Feb 22, 2017 9:29 am

Thanks for yet another suggestion, Bosparan.

I've let the team know and filed this away in our system. Whenever we have some more information we'll be sure to post it here.

In relation to your "flush all caches" button, I'll file this request as well and in the meantime, have you tried editing the CustomMenu.inf to put a command there to clear it?
DevinL
SAPIEN Technologies, Inc.

User avatar
Bosparan
Posts: 282
Joined: Sun Mar 03, 2013 12:45 pm

Re: [PSS 2017] Module Project: Import and merge

Post by Bosparan » Wed Feb 22, 2017 9:45 am

Hi Devin,

actually, no, I haven't tried adding a custom tool. I could, but it's faster to run "fpssp" on the console I always keep open.
I use console commands for quite a bit of my PSS requirements - for example I manage my deployment options using it, because the default options just don't cut it for my requirements. It's just simpler to maintain multiple deployment paths for the same project that way.
Currently working on WIX integration (currently being a loose term - dbatools is taking a lot of my time right now, though that's fun).

Cheers,
Fred

Locked