aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKylie McClain <kylie@somas.is>2020-07-08 00:38:28 -0400
committerKylie McClain <kylie@somas.is>2020-07-08 00:38:28 -0400
commit81427cdfb9c39cc2718f1109193733eb195fd7e1 (patch)
tree217f28be1c6f821376e08bdaa1d9871893f44d79
parent69ecaa4d0118db8d52be74baec444b44ece2050c (diff)
downloadpraxis-81427cdfb9c39cc2718f1109193733eb195fd7e1.tar.gz
praxis-81427cdfb9c39cc2718f1109193733eb195fd7e1.tar.xz
praxis-81427cdfb9c39cc2718f1109193733eb195fd7e1.zip
theory(5): make "Specification" more accurate to current implementation
-rw-r--r--theory.5.adoc34
1 files changed, 19 insertions, 15 deletions
diff --git a/theory.5.adoc b/theory.5.adoc
index bd96b29..f6a6a51 100644
--- a/theory.5.adoc
+++ b/theory.5.adoc
@@ -113,32 +113,36 @@ self-sufficient script, which is what's actually used when building.
Unlike other, simpler package formats which provide simpler build scripts, using libraries allows
for reducing code duplication in a tree of packages, and thus quicker mass changes.
-[#pkg-specifications]
-=== Specifications
+[#pkg-specification]
+=== Specification
-Package specifications (informally referred to as "specs") are strings which describe a package.
+Package specifications (informally referred to as "specs") are strings which _specify_ a package.
-Specifications take on multiple permutations, because they are made up of four different parts,
+Specifications take on multiple permutations, because they are made up of three different parts,
<<pkg-disambiguation,of which only the name is required>>.
Given the fully-qualified spec `package#1.0::repository`...
-* Package name (`package`)
-* Package version (`1.0`)
-* Package repository (`repository`)
+* The package name is `package`
+* The package version is `1.0`
+* The package repository is `repository`
-// If you're reading this in the .adoc, remove the `$$ and $$` from the regex to get it unescaped.
-For a package spec to be valid, it *must* match the regex
-`$$((^[A-Za-z](?:[A-Za-z0-9_+-]*)?)(#[a-z0-9\._-]+)?(::[A-Za-z0-9_-]+)?|\*)$$`.
+For a package specification to be valid, it *must* match this regular expression:
+
+----
+(^[A-Za-z](?:[A-Za-z0-9_+-]*)?)(#[a-z0-9\._-]+)?(::[A-Za-z0-9_-]+)?
+----
Breaking it down:
-* Package name is alphanumeric, plus `_`, `+`, and `-`. It must start with an alphanumeric.
-* Package version is numeric plus `.`, `_`, `-`, and lowercase alpha
-characters. (for `r1`, etc.)
-* Repository is alphanumeric plus `_`, and `-`. It must start with an alphanumeric.
+* Group 1, the package name, is alphanumeric, plus `_`, `+`, and `-`. It can't start with a number.
+
+* Group 2, the package version, is numeric plus `.`, `_`, `-`, and lowercase alpha characters.
+ (for `r1`, etc.)
+
+* Group 3, the repository, is alphanumeric plus `_`, and `-`. It must start with an alphanumeric.
-All parts of a package spec are case-sensitive.
+All parts of a package specification are case-sensitive.
[#pkg-disambiguation]
==== Disambiguation