3 ms·
I can run an MSYS2 installer on a Windows VM once and be done with it. I will have to roll my own containers, for example, if I want to use Powershell elsewhere
by heavyset_go 2y ago
I can run an MSYS2 installer on a Windows VM once and be done with it. I will have to roll my own containers, for example, if I want to use Powershell elsewhere, versus just using vanilla or vendor-provided images.
For my use case, I don't see the need to bend my builds around Powershell just to use Powershell. This plays into my other point about not wanting to dig into Windows fundamentals when I don't need to.
> If I had to write a build script for all three platforms I would just write them for their native environments. I wouldn’t be all that willing to add another tool to be installed just to save myself the effort of simple build script.
This was my initial approach, but it became too much work to maintain separate build systems, especially when it came to making changes over time. One change becomes three, along with three new opportunities for things to break in three separate ways.
For what I'm doing, moving to Unix-y toolchains simplified builds and made it much easier to reason about it.
- dangus 2y agoI totally get that your solution works for you and that is fantastic. I’m only questioning the pure logic behind it when you strip away opinion/preferences. You picking one OS that you’re okay with modifying but the other one you’re not. If we inversed that preference and said that I’m willing to modify my Linux containers but unwilling to install software on my Windows VM, the logic is the same. By the way, Microsoft publishes Linux images that already have PowerShell pre-installed. https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.4 https://learn.microsoft.com/en-us/powershell/scripting/insta... So, technically, if your build scripts were 100% PowerShell you could have it where both Windows VMs and Linux docker images could be unmodified. Since your build scripts sound overly complex, they could possibly benefit from a scripting language that’s got support for objects and object data pipelines, more advanced error handling, and more advanced object parsing than tools like sed and awk. Just playing “devil’s advocate” here, the logic checks out.