Sep 9, 2010 at 2:30 AM
Edited Sep 9, 2010 at 2:43 AM
I was thinking about this in the car home. The title isn't great here but this is the use case.
- Create a local repository (c:\packages) and another (d:\packages).
- Put package1 in c:\packages
- Put package2 in d:\packages
- Create a new project
- Change-PackageSource c:\packages
- Add-Package package1
- Change-PackageSource d:\packages
- Add-Package package2
- Zip up solution/check into source control/etc.
- Give to another developer who has same pacakge sources available (these could be URIs or whatever, doesn't matter)
- Give an updated package2 to developer
- Ask developer to update his solution
The package itself doesn't know where it came from. The developer needs to be pointing to the same repository that the original developer used when he created the solution.
For the developer to actually get the right updates he has to do Change-PackageSource, update, change, update and hope he's got all the packagesources that are in his project.
I see this as a huge problem. If I'm a developer on a project, I shouldn't have to know where the original packages came from nor should I have my environment setup that way. What if I prefer to pull my packages from packages.codeplex.com or bilspackagewarehouse.com.
There's also the issue of versioning. Let's say the project was built with package2 v2 but the repository I normally pull from only has package2 v1. I'll never get the latest version if the maintainers of my package source are lazy bums who don't update
their package repository.
Gem has a similar problem to this and relies on the packages to be sourced from any number of repositories. You can set an env var with the list of them, issue a gem source cmd (or something like that, can't remember the exact syntax) or override the package
source when you install/update a gem (gem update mygem --source=http://somerepository). Still requires the dev to have intimate knowledge of where to get the right package from the right place.
IMHO a dev shouldn't have to know where it came from and if it came from Bob's House of NuPack Packages, then that's where the updates should originate from by default (but let the dev override it if he feels that Jill's House of NuPack Packages is better.
Or am I making a big deal out of nothing here?