What are stone revisions?
The rockpec version is the version of the rockpec file itself. Suppose you have released version Foo 1.0; you create rockpec foo-1.0-1.rockspec . You will learn later that to compile Foo 1.0 on FreeBSD, you need to pass the optional -D flag; the source code does not need to be changed at all. You edit rockpec by adding a platform redefinition section and resubmit it to luarocks.org as foo-1.0-2.rockspec .
If my rockpec is in VCS and I mark a specific commit, does this not effectively eliminate the hints (s) included in that commit and therefore the version?
Yes. But this is not a problem, because the rockpec used in the construction is not included in the source distribution. A .src.rock file is an archive containing the presented .rockspec file and tarball of the source code (or the source check in a subdirectory if rockpec uses SCM , for example git:// ).
In fact, this leads to a chicken and egg problem in that the last scalp for Foo 1.0 does not exist when one of the v1.0 tags manually from Github checks, but this is not an expected workflow: when using LuaRocks, the user will usually use luarocks install foo ; and if they want to check the properties of stone objects for the project, they either go to the page for Foo at luarocks.org , or they look at it stored in HEAD, where people generally stop first.
Note that a similar situation with chicken and eggs happens if you want to distribute the original tarball containing the mountain threshold, and then want to set the tarball source.url and its corresponding source.md5 to the rocky. Having MD5 implies that the crest itself cannot be inside the tarball. One way is to simply avoid the source.md5 field or skip the scalpel when packing tarball. This is the same situation as in one case it will include metadata of the Linux distribution package in the top tarball; this is more obvious here because the upstream and the packer tend to be the same person.
How can lpeg be pointed to luarocks, but it has no obstacle?
Perhaps because it is a rare case when the upstream and the packer are not the same person. Roberto Ierasulsamchii released lpeg, but as of December 2016, the races for him are loaded by Gary Vaughan.
[...] the ones I see have low revision numbers (like ldoc-scm-2.rockspec). This is mistake?
There can be many reasons for this, and it may be a mistake or not.
- If rockpec uses the built-in
make , then the scm rockspec parameter scm unlikely to change when files are added or deleted; - Some projects simply do not change their file set so often, so the revision remains low;
- Some developers save their
scm parameters to -0 (as in the "unreleased version") and never upload them to luarocks.org (keeping only the released versions). So the one you get when you select a git revision is valid for this snapshot. Incrementing change is an expected practice for the swing releases released by luarocks.org ; - The rocky threshold can be really obsolete and then a mistake.
Are any of the above examples best practices?
Objectively speaking, since the rockpec file used to execute luarocks install foo is the one contained in the .src.rock file, which is stored separately from the source archives, there are no significant practical consequences as to where in the source tree the developer stores his hints. This is a matter of personal organization.
Keeping the last scm rockpec at the root has a slight advantage in that it is automatically selected by luarocks make if you want to build from a local extracted tree.
But while the downloads are uploaded to the server using luarocks upload foo , the end-user experience will be the same, regardless of where the downloads are in the source tree.