[development] version = "$Name$" considered harmful in .info files
Derek Wright
drupal at dwwright.net
Sat Jun 16 06:14:54 UTC 2007
On Jun 15, 2007, at 1:53 AM, Dries Buytaert wrote:
> That's probably a good idea.
I checked out a whole copy of contrib to test my perl/find on it. I
notice that there are a decent number of modules that do other things
with version, besides $Name$.
Do people think I should just nuke all version strings checked into
CVS in .info files, no matter what?
The only cases where it would be useful would be, for example, in
HEAD, if a really careful maintainer committed something like:
version = 5.x-2.x-dev
to indicate that's what they were using HEAD for. Or, I noticed a
tiny handful that tried to be even more careful, and commit specific
version numbers:
version = "5.x-1.0-alpha5"
However, chances are good they'll just get out of sync and be wrong
eventually, so IMHO it'll be more consistent to rely on the automated
tools for this stuff.
In total, find/grep/wc finds 223 .info files in HEAD that define
version which don't use $Name$.
Of those, 40 are incorrectly using "version = VERSION". :( Clearly,
those should be purged.
The easiest thing for me would be to remove everything. The docs
already indicate that if you host your module on d.o, you just
shouldn't commit a version line to your .info files. People who
download tarballs get accurate version strings care of the packaging
scripts. People who deploy from CVS can use cvs_deploy.module to get
accurate version strings from the CVS branch or tag you checked out
from.
The *only* cases that something committed to the .info in CVS could
give a better answer than what cvs_deploy.module currently can
provide is if you checkout from HEAD or DRUPAL-5 and the maintainer
had done irresponsible things with the DRUPAL-5 branch that didn't
follow convention, and that was really 5.x-N.* code of some sort.
However, there's a relatively easy solution to this problem:
http://drupal.org/node/152282
In summary, 2 questions:
1) Any feedback on #152282 ?
2) Assuming folks are happy with #152282, should I just go ahead and
remove version from all .info files on all branches in the contrib
repo, no matter what?
Thanks,
-Derek (dww)
More information about the development
mailing list