Issue 107 in metacello: the toolbox does not recognized the #default configuration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 107 in metacello: the toolbox does not recognized the #default configuration

metacello
Status: Accepted
Owner: [hidden email]
Labels: Type-Defect Priority-High Platform-Pharo

New issue 107 by [hidden email]: the toolbox does not recognized the  
#default configuration
http://code.google.com/p/metacello/issues/detail?id=107

What steps will reproduce the problem?
1. I have ConfigurationOfRPackage which has only one baseline named  
#default:
2. I have ConfigurationOfMoose which contains in its #default: baseline
  spec project: 'RPackage' with: [
                                spec
                                        className: 'ConfigurationOfRPackage';
                                        version: 'default';
                                        file:  'ConfigurationOfRPackage';
                                        repository: 'http://www.squeaksource.com/PharoTaskForces' ].

3. Doing "(MetacelloToolBox validateConfiguration: ConfigurationOfMoose)  
explore." gives me "Error: Cannot resolve version '' for the project  
reference 'RPackage' in version '4.3.1' { cannotResolveVersion } [  
#validateVersionSpec: ]"


What is the expected output? What do you see instead?
I would expect the line "project: 'RPackage' with: 'default'." to be  
produced it I instead obtained "project: 'RPackage' with: ''."



Reply | Threaded
Open this post in threaded view
|

Re: Issue 107 in metacello: the toolbox does not recognized the #default configuration

metacello

Comment #1 on issue 107 by [hidden email]: the toolbox does not  
recognized the #default configuration
http://code.google.com/p/metacello/issues/detail?id=107

Alexandre,

I am unable to reproduce this problem.

I have ConfigurationOfMoose-AlexandreBergel.179 and  
ConfigurationOfRPackage-StephaneDucasse.8 loaded in my image and:

   MetacelloToolBox validateConfiguration: ConfigurationOfMoose

returns an empty collection...

Reply | Threaded
Open this post in threaded view
|

Re: Issue 107 in metacello: the toolbox does not recognized the #default configuration

metacello

Comment #2 on issue 107 by [hidden email]: the toolbox does not  
recognized the #default configuration
http://code.google.com/p/metacello/issues/detail?id=107

I fixed the configuration in the meantime.
Execute the following:

  MetacelloToolBox
      createDevelopment: '4.3.2'
      for: 'Moose'
      importFromBaseline: '4.3-baseline'
      description: 'New version'

It will produce the method #version432: which contains empty version for  
many packages:

                spec
                        project: 'MooseAlgos for Moose' with: '';
                        project: 'PetitParser for Moose' with: '';
                        project: 'DSM for Moose' with: '';
                        project: 'Glamour for Moose' with: '2.0-beta.8';
                        project: 'Mondrian for Moose' with: '2.46';
                        project: 'SmallDude for Moose' with: '';
                        project: 'Merlin' with: '';
                        project: 'RPackage' with: ''.



Reply | Threaded
Open this post in threaded view
|

Re: Issue 107 in metacello: the toolbox does not recognized the #default configuration

metacello
In reply to this post by metacello

Comment #4 on issue 107 by [hidden email]: the toolbox does not  
recognized the #default configuration
http://code.google.com/p/metacello/issues/detail?id=107

It appears that these empty versions are for projects. What would be cool  
is to actually create methods recursively in all nested configurations and  
have those versions marked in the new overall configuration version.

Reply | Threaded
Open this post in threaded view
|

Re: Issue 107 in metacello: the toolbox does not recognized the #default configuration

metacello

Comment #5 on issue 107 by [hidden email]: the toolbox does not  
recognized the #default configuration
http://code.google.com/p/metacello/issues/detail?id=107

Alexandre,

When you use the create* methods, there is an expectation that the project  
is already loaded into your image ... The code will fill in the versions of  
the mcz files and projects that are currently loaded ... if a project or  
mcz file is not loaded it cannot fill in a version...I decided to do use an  
empty version so that it would be obvious that the versions weren't loaded  
rather than default to something that might very well be wrong.

Now if you look at the implementation of  
#createDevelopment:for:importFromBaseline:description:, you will see that  
the #importFrom:... method is called and there are two args updateProjects:  
and updatePackages: that are set to true ... if you pass in false for both  
of those then the versions from the baseline will be used (of course  
baselines don't ususally have versions defined for mcz files)...

As you can see the class-side methods of MetacelloToolBox are a wrapper for  
a much richer api on the instance-side ... so I could add additional  
variants on the basic methods that are present.

When building a literal version from a baseline version, explicit versions  
need to be supplied for the mcz files... somehow, because baseline versions  
don't usually specify them at all ...

Reply | Threaded
Open this post in threaded view
|

Re: Issue 107 in metacello: the toolbox does not recognized the #default configuration

metacello
Updates:
        Owner: [hidden email]
        Labels: -Priority-High Priority-Critical Milestone-1.0-beta.32

Comment #6 on issue 107 by [hidden email]: the toolbox does not  
recognized the #default configuration
http://code.google.com/p/metacello/issues/detail?id=107

This one needs to be addressed ... I think that throwing a Notification  
with a reasonable default behavior might be the best way to handle this ...  
then tools can prompt for a version from the user ...