krfkeith / metacello

Automatically exported from code.google.com/p/metacello
0 stars 0 forks source link

empty project versions #107

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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: ''."

Original issue reported on code.google.com by alexandr...@gmail.com on 16 Feb 2011 at 8:52

GoogleCodeExporter commented 9 years ago
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...

Original comment by henrichs...@gmail.com on 16 Feb 2011 at 11:18

GoogleCodeExporter commented 9 years ago
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: ''.

Original comment by alexandr...@gmail.com on 17 Feb 2011 at 12:51

GoogleCodeExporter commented 9 years ago
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.

Original comment by tudor.gi...@gmail.com on 17 Feb 2011 at 2:05

GoogleCodeExporter commented 9 years ago
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.

Original comment by tudor.gi...@gmail.com on 17 Feb 2011 at 2:05

GoogleCodeExporter commented 9 years ago
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 ...

Original comment by henrichs...@gmail.com on 17 Feb 2011 at 5:49

GoogleCodeExporter commented 9 years ago
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 ...

Original comment by henrichs...@gmail.com on 18 Jan 2012 at 6:58

GoogleCodeExporter commented 9 years ago

Original comment by henrichs...@gmail.com on 19 Jan 2012 at 12:09

GoogleCodeExporter commented 9 years ago
see https://github.com/dalehenrich/metacello-work/issues/115 for additional 
details

Original comment by henrichs...@gmail.com on 17 Sep 2012 at 9:38