On 02/25/2011 11:03 AM, Igor Stasenko wrote:
Can i test the configuration (with all dependencies),
that every version of packages it going to load are specified explicitly, i.e.
there is not 'load latest version from that branch'.
This is to ensure that given configuration will continue to work and
load same packages no matter
of what new future updates there is.
Igor,
If I understand your question correctly the validator will do what you
want. In Metacello 1.0-beta.28 or later:
(MetacelloToolBox validateConfiguration: ConfigurationOfXXX) explore.
Will produce an OrderedCollection of validation issues for the specified
configuration. See
http://code.google.com/p/metacello/wiki/ValidationWarningsAndErrors
for a list of all of the validation issues that are checked. The one
that I think you are looking for is:
noVersionSpecified: no version defined for the project reference or
package. The version specified in the baseline or the latest
version of the project or package in the repository will be used.
To validate the configuration and all of the configurations for the
projects it depends upon you can do this:
(MetacelloToolBox
validateConfiguration: ConfigurationOfXXX
debug: #()
recurse: true) select: [:issue |
issue reasonCode == #noVersionSpecified]) explore
The above expression is focused on just that particular error, but in my
opinion all of the issues that are classified as CriticalWarning or
Error should not be trusted.
Error issue : indicate conditions that are known to cause problems
or incorrect results
Critical Warnings : indicate conditions that may lead to unexpected
resutls (#noVersionSpecified is a Critical
Warning)
So to be certain, I recommend that if the following expression returns
true you are in good shape:
(MetacelloToolBox
validateConfiguration: ConfigurationOfXXX
debug: #()
recurse: true) select: [:issue | issue isWarning not ]) isEmpty
Dale