RamblingCookieMonster / PSDepend

PowerShell Dependency Handler
MIT License
285 stars 76 forks source link

WIP: Add supported platforms handling #76

Closed RamblingCookieMonster closed 6 years ago

RamblingCookieMonster commented 6 years ago

Starting to work on xplat support (#11). One thing we'll need is a way to narrow down which dependency scripts support which platforms. This is an initial, minimal-thought take on adding this to the PSDependMap schema and using that data in a few spots...

Currently we do not fail all dependencies, we simply skip unsupported dependencies - open to failing all the things instead

Hit me up if you have any ideas or concerns! Will leave this open a few days.

dargmuesli commented 6 years ago

What about a warning for unsupported dependency types? But failing makes more sense, I think. What is the purpose of dependencies when they cannot be downloaded...

RamblingCookieMonster commented 6 years ago

Down the line, will need to add support for platforms to requirement/depend files, similar to bundler/gemfiles

RamblingCookieMonster commented 6 years ago

Hiyo @michaeltlombardi!

Looking through npm.ps1, looks like it might already support xplat, barring a switch from mkdir to new-item? I'm assuming the params in 1 2 aren't platform specific to npm?

Cheers!

RamblingCookieMonster commented 6 years ago

Hiyo @Dargmuesli!

For the recent github.ps1 merge, you mentioned linux - any chance you also tested on macos? going through and updating the psdependmap supported types

Thanks!

dargmuesli commented 6 years ago

No, sorry. I don't have access to any macOS devices.

dargmuesli commented 6 years ago

But looking over it again: it should be compatible with mac. There is room for improvement though, as e.g. privilege detection cannot be realized on non-Windows OSs right now (afaik) and so on.

RamblingCookieMonster commented 6 years ago

Cool! will test it out, but yeah, don't see anything at a glance - thanks!

Edit: Made a quick tweak for path vs. all/currentuser use, other than that looks good to go!

RamblingCookieMonster commented 6 years ago

Alrighty! so this is in a good-enough-but-probably-has-a-bunch-of-bugs stage, in terms of cross platform support. Going to merge it in so that I can start using it for a few things, but this really needs more work before tagging it or officially saying it has cross platform support

I'll likely get antsy and merge this Sunday night or Monday AM, barring any major issues

cc folks who have mentioned xplat - @gaelcolas @Dargmuesli @gjonespf

gjonespf commented 6 years ago

TY for the heads up. Will definitely look at making use of this, have to experiment once merged. My primary use previously was for xplat build, but have shifted to using Cake. This will still be super useful for xplat deployment scripts I think. I should whack this in a Docker container for testing.