My hunch is that while Parrot's *version* number (found in top-level
file 'VERSION' and reported by Parrot::BuildUtils::parrot_version()) is
important for building Parrot, Parrot's repository *revision* numbers
are less important. But *how much* less important, I cannot yet say.
FWIW, here are locations where these $current and $config are used
(setting aside my 4 test files above).
config/gen/revision.pm:30: my $revision = $Parrot::Revision::current;
t/distro/file_metadata.t:219: unless ( $Parrot::Revision::current or
`svk ls .` ) {
tools/build/revision_c.pl:46: return ${Parrot::Revision::current};
tools/build/revision_c.pl:51: return ${Parrot::Revision::config};
Further research into $Parrot::Revision::current and
$Parrot::Revision::config:
1. Relevant code from tools/build/revision_c.pl:
/* also in "parrot/embed.h" */
PARROT_API int Parrot_revision(void);
/* also in "parrot/misc.h" */
PARROT_API int Parrot_config_revision(void);
int Parrot_revision(void)
{
return ${Parrot::Revision::current};
}
int Parrot_config_revision(void)
{
return ${Parrot::Revision::config};
}
2. [reconf] 501 $ ack --nohtml --nophp Parrot_revision
compilers/imcc/main.c
120: rev = Parrot_revision();
include/parrot/embed.h
73:int Parrot_revision(void);
tools/build/revision_c.pl
40:PARROT_API int Parrot_revision(void);
44:int Parrot_revision(void)
3. [reconf] 503 $ ack --nohtml --nophp Parrot_config_revision
compilers/imcc/main.c
124: rev = Parrot_config_revision();
include/parrot/misc.h
190:PARROT_API int Parrot_config_revision(void);
tools/build/revision_c.pl
42:PARROT_API int Parrot_config_revision(void);
49:int Parrot_config_revision(void)
4. Relevant code from config/gen/revision.pm:
my $revision = $Parrot::Revision::current;
$conf->data->set(
revision => $revision,
);
if ( $revision >= 1 ) {
$self->set_result("r$revision");
Commentary: Why, in items (2) and (3) above, $current should be used as
the basis of the C variable in one case and $config should be used as
the basis of a different C variable in the other case it not something
apparent to me.
Whether Parrot::Revision needs to be as complex as it is is increasingly
less obvious to me. If you're working from the repository and have not
yet configured, then what use in $config? Conversely, if you're working
from the repository and *have* configured, then do you have any further
need for $current? And if you're working from a release version,
$current is entirely irrelevant because $config is all you've got and
all you're going to get.
kid51