Crescendo icon indicating copy to clipboard operation
Crescendo copied to clipboard

Monolithic PSM file makes it harder to contribute

Open jhoneill opened this issue 3 years ago • 3 comments

All the functions and classes are in a single file.

Whilst it may be optimal to ship this way (and people will argue about that), to contribute an improvement to one function or one class is harder. Please consider splitting the file for development and merging it at build time.

jhoneill avatar May 19 '22 23:05 jhoneill

Hi @jhoneill - Are you referring to the json configurations? You can create a multiple json configurations, each with one definition, and export them individually for module testing, then all at once for a completed module. So, Export-CrescendoModule -ConfigurationFile ./test1.crescendo.json -ModuleName .\test1 then Export-CrescendoModule -ConfigurationFile ./test1.crescendo.json, ./test2.crescendo.json, ./test3.crescendo.json -ModuleName .\Test

theJasonHelmick avatar May 23 '22 19:05 theJasonHelmick

@theJasonHelmick No, I mean the PSM1 file.

If the classes were separate files and these were merged (and loaded from ScriptsToProcess in the PSD so they were accessible from outside the module). And/or each function had its own file and they were merged (or dot sourced in the PSM1) then it would be easier to say "I've updated function X" than "Here's a version of the PSM1 with my changes".

jhoneill avatar May 23 '22 21:05 jhoneill

@jhoneill - Thanks James for the clarification. this is an interesting and valid problem - and I have seen a few folks handle this in their build scripts - but - its worth thinking about. I would be interested in the future to hear from folks that are experiencing this problem with large modules and many cmdlets.

theJasonHelmick avatar Jun 20 '22 21:06 theJasonHelmick

@jhoneill - Thank you for the suggestion - after reviewing we are not going to break the psm1 apart at this time in our development.

theJasonHelmick avatar Aug 23 '22 22:08 theJasonHelmick

@theJasonHelmick Understood . Maybe we should talk separately about what I did with crescendo in April / May / June. You can look at the James' branch in my fork. I think I've moved things forward but don't feel able to turn that into a contribution to the project.

jhoneill avatar Aug 23 '22 23:08 jhoneill

@jhoneill - Would be very interested (as always) in your perspective and work. I'll send an email - happy to meet and discuss!

theJasonHelmick avatar Aug 24 '22 14:08 theJasonHelmick