Open RamblingCookieMonster opened 7 years ago
So, would an example of this be for repositories? The default for the npm
type would be.... npm.... but I could override to my own artifactory?
Yep! Basically... if you have a few different dependency types, and a parameter you want to globally set just for one dependency type, it would be nice to have a middle ground (as is, you can set on each definition or globally - globally will actually work IIRC, just spits out a warning, and if parameters ever share a name with different intent, could be bad).
Similar to your example, PSGalleryNuget has a Source
- other dependency types also use Source
, with what likely won't be shared across differing dependency types (assuming they aren't nuget based)
So right now, I could set the Source to some nuget URI... but what if I also have a few Package
types in there, and also want those to have a re-usable (specific to the Package
type) Source
?
Plenty of ways to work around it for now, figured at some point it might come in handy though : ) Not on my radar for a while (or until I get bored!)
I think dependency type defaults / overrides is a great idea.
We currently support
PSDependOptions
, which specifies global values that apply to all dependencies (unless overridden in individual dependencies).It might be helpful to add a third layer between these (overrides global, overridden by individual dependencies) for per-dependencytype defaults
Thought someone had mentioned this in an issue, can't seem to find it.
Haven't thought through syntax yet, just getting the idea out there. Off the top of my head without considering existing design or repurcussions, maybe just add keys under PSDependOptions where the key is the dependency type name?
Cheers!