[Glass] Is there a way of specifying alternate repos in Baselines/Configurations

Jupiter Jones via Glass glass at lists.gemtalksystems.com
Mon Jul 6 17:23:56 PDT 2015


I think this is a fairly common scenario when using a project and its dependencies.

Simple project scenario:
- MainProject is cloned locally from github in /opt/git/MainProject
- DependentProject is cloned locally from github in /opt/git/DependentProject
- MainProject is dependent on DependentProject and refers to its github repository in its BaselineOfMainProject.

Loading scenarios:
- At the start of each development session, I load my base development image then load the projects I’m working on from their local clones.
- Also, in an automated deployment, I want to clone the projects locally then have my image load them from the local disc rather than the network.

Loading:
If I load my main project with: 
	Metacello new
		baseline: ‘MainProject’;
		repository: ‘filetree:///opt/git/MainProject' <filetree:///opt/git/MainProject'>;
		load
It will load the DependProject from github.

So, I load DependentProject from my local repo filetree:///opt/git/DependentProject using:
	Metacello new
		baseline: ‘DependentProject’;
		repository: ‘filetree:///opt/git/DependentProject' <filetree:///opt/git/DependentProject'>;
		load

I then load MainProject from my local repo filetree:///opt/git/MainProject <filetree:///opt/git/MainProject> using:
	Metacello new
		baseline: ‘MainProject’;
		repository: ‘filetree:///opt/git/MainProject' <filetree:///opt/git/MainProject'>;
		load

Of course, this throws the error:
Load Conflict between existing BaselineOfDependentProject [baseline] from filetree:///opt/git/DependentProject and BaselineOfDependentProject [baseline] from github://GitHubUser/DependentProject <github://GitHubUser/DependentProject>

To get around this, I’m loading DependingProject then locking it with:
	Metacello new
		baseline: ‘DependentProject’;
		repository: ‘filetree:///opt/git/DependentProject' <filetree:///opt/git/DependentProject'>;
		lock

This becomes cumbersome with many dependents and isn’t easy to manage with automated deployments. The pain scales when managing dependents of dependents and third party projects… ideally all of which would be cloned locally. eg. If MainProject depends on Seaside and Seaside depends on Zinc, both of which are cloned locally, BaselineOfMainProject would also need to specify an alternate repo for Zinc.

So my question... Is there a way of specifying alternate repos for project dependents and their dependents in BaselineOfMainProject, then selecting which repos will be used at load time, and have them apply to all dependents and their dependents?

Right now, I have custom load scripts to circumvent the dependency management Metacello is so good at, doing lots of locking, and wrapping it in GsDeployer deploy: blocks so I don’t get dialogs warning about locks. Pharos loads are even more fiddly. I figure there must be a better way :)

How are others managing this?

Cheers,

Jupiter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150707/c9f6f1ba/attachment.html>


More information about the Glass mailing list