Hi!
Consider three configurations, for Moose, PetitParser and Glamour: - Moose depends on the version default of Glamour - Moose depends on version 1.0 of PetitParser - PetitParser depends on version 2.0-beta of Glamour What gets loaded by Moose at the end? default or 2.0-beta? Is there a way I can identify these situations in the graph of dependencies? I checked the FAQ of metacello, but I haven't found something about it. I would be happy to write tests about this particular situation. Can someone do some remote pair programming with me on this? Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. |
On 02/17/2011 06:28 AM, Alexandre Bergel wrote:
> Hi! > > Consider three configurations, for Moose, PetitParser and Glamour: > - Moose depends on the version default of Glamour > - Moose depends on version 1.0 of PetitParser > - PetitParser depends on version 2.0-beta of Glamour > > What gets loaded by Moose at the end? default or 2.0-beta? 1. Is the requested version > the currently loaded version? - if not, the loaded version wins - if so: 2. Have we already scheduled a load for this project? - if not, schedule the requested version to be loaded - if so: 3. Is the requested version > the scheduled version? - if not, go on - if so, schedule the requested version to be loaded > Is there a way I can identify these situations in the graph of dependencies? Not easily...this is probably something that could/should be added to the toolbox ... It could be done by analyzing the directives produced by a #fetch or #record (setting ignoreImage), but that would not catch the cases where question 3 returns false...So it might require a completely different analysis path very similar to what you get from directives... > > I checked the FAQ of metacello, but I haven't found something about it. > I would be happy to write tests about this particular situation. Can someone do some remote pair programming with me on this? I think I've got a fair amount of test coverage for this situation, but I am always glad to have more tests. You should take a look at MetacelloCurrentVersionTest, MetacelloDetermineCurrentVersionForLoadTest and the tests for Issue 49 in MetacelloGoverBasedLoaderTest for examples of current tests in that area... Dale |
>> Consider three configurations, for Moose, PetitParser and Glamour:
>> - Moose depends on the version default of Glamour >> - Moose depends on version 1.0 of PetitParser >> - PetitParser depends on version 2.0-beta of Glamour >> >> What gets loaded by Moose at the end? default or 2.0-beta? > > 1. Is the requested version > the currently loaded version? > - if not, the loaded version wins > - if so: > 2. Have we already scheduled a load for this project? > - if not, schedule the requested version to be loaded > - if so: > 3. Is the requested version > the scheduled version? > - if not, go on > - if so, schedule the requested version to be loaded Excellent. Do you want me to add this in the Metacello FAQ? >> Is there a way I can identify these situations in the graph of dependencies? > > Not easily...this is probably something that could/should be added to the toolbox ... It could be done by analyzing the directives produced by a #fetch or #record (setting ignoreImage), but that would not catch the cases where question 3 returns false...So it might require a completely different analysis path very similar to what you get from directives... Ok >> I checked the FAQ of metacello, but I haven't found something about it. >> I would be happy to write tests about this particular situation. Can someone do some remote pair programming with me on this? > > I think I've got a fair amount of test coverage for this situation, but I am always glad to have more tests. You should take a look at MetacelloCurrentVersionTest, MetacelloDetermineCurrentVersionForLoadTest and the tests for Issue 49 in MetacelloGoverBasedLoaderTest for examples of current tests in that area... Ok, the next problem I bumped into I will give a try. Thanks for your help and patience :-) Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. |
On 02/17/2011 11:33 AM, Alexandre Bergel wrote:
>>> Consider three configurations, for Moose, PetitParser and Glamour: >>> - Moose depends on the version default of Glamour >>> - Moose depends on version 1.0 of PetitParser >>> - PetitParser depends on version 2.0-beta of Glamour >>> >>> What gets loaded by Moose at the end? default or 2.0-beta? >> >> 1. Is the requested version> the currently loaded version? >> - if not, the loaded version wins >> - if so: >> 2. Have we already scheduled a load for this project? >> - if not, schedule the requested version to be loaded >> - if so: >> 3. Is the requested version> the scheduled version? >> - if not, go on >> - if so, schedule the requested version to be loaded > > Excellent. Do you want me to add this in the Metacello FAQ? Yes...that'd be great! > >>> Is there a way I can identify these situations in the graph of dependencies? >> >> Not easily...this is probably something that could/should be added to the toolbox ... It could be done by analyzing the directives produced by a #fetch or #record (setting ignoreImage), but that would not catch the cases where question 3 returns false...So it might require a completely different analysis path very similar to what you get from directives... > > Ok > >>> I checked the FAQ of metacello, but I haven't found something about it. >>> I would be happy to write tests about this particular situation. Can someone do some remote pair programming with me on this? >> >> I think I've got a fair amount of test coverage for this situation, but I am always glad to have more tests. You should take a look at MetacelloCurrentVersionTest, MetacelloDetermineCurrentVersionForLoadTest and the tests for Issue 49 in MetacelloGoverBasedLoaderTest for examples of current tests in that area... > > Ok, the next problem I bumped into I will give a try. > > Thanks for your help and patience :-) No..._thank you_! Dale |
>> Excellent. Do you want me to add this in the Metacello FAQ?
> > Yes...that'd be great! Done http://code.google.com/p/metacello/wiki/FAQ#How_diamond_like_dependencies_are_handled? Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. |
Free forum by Nabble | Edit this page |