From: Thomas Walker Lynch
Date: Wed, 2 Dec 2026 00:07:17 +0000 (+0000)
Subject: documents brought uptodate
X-Git-Url: https://git.reasoningtechnology.com/?a=commitdiff_plain;h=6277985f2ec73df78d93d50dd66e1726bb4985e6;p=Harmony
documents brought uptodate
---
diff --git a/administrator/document/how-to_add-project-dependency.html b/administrator/document/how-to_add-project-dependency.html
index 327a28c..b6b1dbc 100644
--- a/administrator/document/how-to_add-project-dependency.html
+++ b/administrator/document/how-to_add-project-dependency.html
@@ -24,7 +24,7 @@
diff --git a/administrator/document/how-to_release.html b/administrator/document/how-to_release.html
index 0f33c4a..f52dea1 100644
--- a/administrator/document/how-to_release.html
+++ b/administrator/document/how-to_release.html
@@ -26,7 +26,7 @@
@@ -39,10 +39,10 @@
Make the release branch
- The administrator executes the release. Open a terminal. Enter the project workspace.
+ The administrator executes the release. Open a terminal. From the top directory of the project, take on the administrator role.
- > . setup administrator
+ > ./setup administrator
diff --git a/developer/document/naming_file-and-directory.html b/developer/document/naming_file-and-directory.html
index c597855..f26f9ea 100644
--- a/developer/document/naming_file-and-directory.html
+++ b/developer/document/naming_file-and-directory.html
@@ -24,66 +24,57 @@
- Program file system objects
-
+ Where the rules are
- Harmony files and directories are considered to be program file systems objects.
+ The rules for names are RT culture's, given in RT-Style, in RT-code-format.html; where this document and RT-Style differ, RT-Style is the authority. This document gives how the rules apply to the files and directories of a Harmony project. Harmony's files and directories are program file system objects: their names follow the rules for identifiers.
- Files
+ Words and components
- Files that hold a single class, have he same base name as that class. If a file holds multiple classes, but there is a class of primary importance and auxiliary classes, the file carries the name of the primary class.
+ A name is made of components, the most general first, each later one narrowing it: introduction_Harmony, how-to_release, role-and-workflow_product-development.
+
+ - Within a component, words are joined by a hyphen; components are joined by an underscore. The hyphen binds tighter, so a hyphenated name sits whole inside an underscore compound.
+ - A proper noun keeps its own form and capitalization, as a component of its own: Man-In-Grey, RT-Style, Account-Tree.
+ - A name says what the file is. Definition.py says nothing, since every Python file defines something.
+ - Spaces are not used in program file names.
+
+ Where a hyphen is not allowed
- If a file represents a module or name space, follow the same naming conventions specified for classes and name spaces in the format_RT·code.html document.
+ Where a language forbids a hyphen in a name, such as the file name of a module the language imports by that name, the name is demoted: each hyphen becomes an underscore, and each underscore becomes a double underscore, so the demoted form can be turned back. Man-In-Grey_gate becomes Man_In_Grey__gate. The demoted form is used only where the language forces it.
-
- Other program files follow the same naming conventions specified in the format_RT·code.html document for an identifier of the
- contained or related language.
-
-
- Hyphens and spaces
-
- In a C language culture, file names use underscores between words. In a Lisp language culture use snake-kebab_case. Spaces are generally not used in program file names. Though the Harmony skeleton is language agnostic, it was first used with C, hence file names use primarily underscores.
-
-
-
- Program Directories
-
- A directory that is a package, follows the convention for name spaces.
-
+ Files holding code
+
+ - A file that holds a single class has the same base name as that class. A file holding a class of primary importance and auxiliary classes carries the name of the primary class.
+ - A module is a namespace. The file named for the namespace alone is its main module, such as Guard.py; a file specific to it carries the namespace before a middle dot, such as Guard·WellFormed.py; an application's files parallel these inside its own namespace, such as EmplaceBio·Guard.py.
+ - A directory already sets the namespace for the files in it, so the files inside a project's own directory do not repeat it.
+
+ Suffixes
- A directory that is used to give the contained files a property is an identifier.
-
-
-
- What is a reasonable primary property for a set of files? Perhaps:
+ A file is given a further property by a dot suffix before its language's extension, and the build tools read these to know how to process it:
-
- - Who uses each file with this property. Home directories are named like this.
- - The role of the people using the file. The developer and tester directories were named in this manner.
- - What program are the files for.
- - The generic category of program said files are for. We prefer the names authored and made. authored files are those written by humans or AI, while made files are products of tools.
-
+
+ - .lib.c : library source, compiled to an object file and added to the project's library archive.
+ - .CLI.c : a program's source, made into a stand-alone executable.
+ - .kmod.c : kernel module source.
+
- Property indicators on files
-
- We add a second property to a file using dot extensions to the file's name. We can extend the dot suffix model by using multiple dot suffixes. File name extensions are used to signal to the build tools how the file is to be processed:
-
-
- - .cli.c : Compiler fodder made into a stand-alone executable.
- - .lib.c : Library code source, compiled as an object file and added to the project archive.
- - .mod.c : Kernel module sources.
-
+ Directories
+
+ - A directory's name is a property each file in it has, so it is rarely plural: a directory of tests is named test. The introduction, document/introduction_Harmony.html, gives the order in which properties are preferred: role, provenance, capability, lifecycle, tracking.
+ - A directory that is a package follows the convention for namespaces.
+ - Source to be built is in developer/authored/<Namespace>.<Tool>, the suffix naming the build component that builds it, such as make for C, or copy for files used as they are.
+ - authored files were written by people, or by an AI working with them; made files are the products of tools.
+
Exercises
Exercise 1: Program file names
diff --git a/developer/document/single-file_C-module-and-namespace.html b/developer/document/single-file_C-module-and-namespace.html
index 0e6cd17..a004a24 100644
--- a/developer/document/single-file_C-module-and-namespace.html
+++ b/developer/document/single-file_C-module-and-namespace.html
@@ -26,7 +26,7 @@
@@ -45,7 +45,7 @@
The C language lacks native namespaces. To prevent symbol collisions in large projects, RT code format uses a center dot (·) to denote ad hoc namespaces within identifiers.
- A programmer maps the directory structure directly to these namespaces. For example, a file located at authored/ExampleGreet/Math.lib.c belongs to the ExampleGreet namespace and defines the Math module.
+ A programmer maps the directory structure directly to these namespaces. For example, a file located at authored/ExampleGreet.make/Math.lib.c belongs to the ExampleGreet namespace and defines the Math module; the directory's suffix, make, names the build component that builds it.
- Types and modules use PascalCase.
@@ -135,20 +135,19 @@
Directory structure and namespaces
- The physical layout of the authored directory dictates how the build orchestrator finds the source code.
+ The physical layout of the authored directory dictates how the build finds the source code. Each namespace is a directory developer/authored/<Namespace>.make, such as developer/authored/ExampleGreet.make/, holding its .lib.c, .CLI.c and .kmod.c files. build passes over a directory without a suffix, with a warning, so there is no flat layout: source that is to be built is in a namespace.
+
+
+ Make settings for every namespace go in developer/tool/build_component/project.mk; those for one namespace, in a .mk file beside its source, such as authored/ExampleGreet.make/ExampleGreet.mk, which is staged and promoted with the namespace's library.
-
- - Flat Structure: If a project does not utilize namespaces, the .lib.c and .CLI.c files reside directly inside the developer/authored/ directory.
- - Namespaced Structure: If a project utilizes namespaces, the files are grouped into subdirectories matching the namespace name, such as developer/authored/ExampleGreet/.
-
Making the code
- The developer compiles the code using the make wrapper script located in developer/tool/make. This script accepts two primary arguments: the build command and the target namespace.
+ The developer builds with build, in the developer role. It takes namespaces, or patterns matching them, each followed by the arguments for its build component, separated by colons; without arguments a namespace is given all. Given nothing, build prints its usage and the namespaces it found.
- > make <command> [namespace]
+ > build <namespace>[:<argument>]* ...
@@ -156,14 +155,14 @@
- > make all ExampleGreet
+ > build ExampleGreet
- Behind the scenes, the make wrapper assigns the namespace to an environment variable and calls the master orchestrator makefile. The orchestrator detects the namespace, updates the source directory search path to authored/ExampleGreet, and injects the appropriate namespace macros during compilation.
+ Behind the scenes, build runs the build component the directory's suffix names, developer/tool/build_component/make, with the namespace in the environment. The component points the source directory at authored/ExampleGreet.make and the products at scratchpad/made/ExampleGreet, then runs GNU make on shared/tool/makefile/Harmony.mk, which injects the namespace macros during compilation. build "ExampleGreet:clean:all" cleans, then builds again.
- The orchestrator compiles the .lib.c files into object files under scratchpad/build/object/, archives them into a library file, and links the .CLI.c objects into standalone executables. The final artifacts are placed in the scratchpad/made/ directory.
+ The makefile compiles the .lib.c files into object files under scratchpad/build/object/, archives them into a library file, lib<project>.a, and links the .CLI.c objects into standalone executables. The library and the executables are placed in scratchpad/made/ExampleGreet/.
Promoting the artifacts
@@ -176,7 +175,7 @@
- The promote tool compares the contents of developer/scratchpad/made/ against consumer/made/. It atomically copies any new or updated files to the consumer workspace, stripping write permissions to enforce the immutability of the deployment target. Once promoted, the hello executable is ready for testing.
+ The promote tool compares the contents of developer/scratchpad/made/ against consumer/. It atomically copies any new or updated files to the consumer workspace, stripping write permissions to enforce the immutability of the deployment target. Once promoted, the hello executable is ready for testing.
diff --git a/document/introduction_Harmony.html b/document/introduction_Harmony.html
index 432c63b..c3065e5 100644
--- a/document/introduction_Harmony.html
+++ b/document/introduction_Harmony.html
@@ -24,7 +24,7 @@
@@ -78,7 +78,7 @@
> ./setup developer
- setup starts a new bash shell configured for the role, and leaves the person in the role's directory. The prompt shows the project and the role. exit leaves the role and returns to the shell setup was run from. It is common to have several terminal windows or Emacs shells open, each in a different role.
+ setup starts a new bash shell configured for the role, and leaves the person in the role's directory. The prompt shows the project and the role. exit leaves the role and returns to the shell setup was run from, so a role taken on inside another role's shell stacks on it. It is common to have several terminal windows or Emacs shells open, each in a different role; document/role-and-workflow_product-development.html gives an arrangement of them, and its use in Emacs.
Python programmers will recognize this as similar to a virtual environment. Harmony calls it the project setup, and the command is setup rather than activate. Unlike a Python virtual environment, there is one setup for each role.
@@ -87,14 +87,14 @@
In the new shell, the setup:
- - Sets ROLE, ROLE_HOME and SETUP, and puts <role>/tool on the PATH.
- - Sources the project-wide shared/tool/setup, which sets REPO_HOME and PROJECT, puts shared/tool and shared/authored on the PATH, and sources each project dependency's .init file.
+ - Sets ROLE, ROLE_HOME and SETUP.
+ - Sources the project-wide shared/tool/setup, which sets REPO_HOME and PROJECT, sources each project dependency's .init file, then puts shared/tool, shared/made and shared/authored in front of what the dependencies added.
- Sources shared/authored/setup, when the project has one, for project-specific additions to every role.
- - Changes into the role's directory and sources <role>/tool/setup, the setup customized for that role in this project.
+ - Puts <role>/tool in front of all of these, changes into the role's directory, and sources <role>/tool/setup, the setup customized for that role in this project.
- When running inside Emacs, copies the environment to Emacs with env_to_emacs.
- Tools rely on this environment. Absolute paths are formed from REPO_HOME, and some tools, such as build and promote, refuse to run outside the role they belong to.
+ The PATH is then searched most specific first: the role's tools, shared/authored, shared/made, shared/tool, the project dependencies, then what the shell had before. Tools rely on this environment. Absolute paths are formed from REPO_HOME, and some tools, such as build and promote, refuse to run outside the role they belong to.
Roles and their directories
@@ -138,7 +138,7 @@
Building and promoting
- Building and promotion are separate steps. In the developer role, build makes the work product from developer/authored and stages it on the developer's scratchpad. promote write then copies what changed to consumer/. The result is a promotion candidate, which stays as it is until the next promotion.
+ Building and promotion are separate steps. In the developer role, build makes the work product from developer/authored and stages it on the developer's scratchpad, in developer/scratchpad/made. promote write then copies what changed to consumer/. The result is a promotion candidate, which stays as it is until the next promotion.
Source in developer/authored is grouped into directories named <Namespace>.<Tool>. The suffix names the build component in developer/tool/build_component that builds that directory, such as make for C, or copy for files used as they are. Given no arguments, build prints its usage and the namespaces it found. promote given no arguments prints its commands, among them dry write, which shows what write would copy.
@@ -164,7 +164,7 @@
Project dependencies
- Harmony is language agnostic. When a project uses C, Python, NodeJS, Java, or other software it did not author, the administrator installs that software as a sibling directory of the project and links it in under shared/project-dependency, with an .init file that every role's setup sources to put the dependency into the environment. Installation notes for each dependency sit beside its .init file, so that each team member can repeat the installation after cloning.
+ Harmony is language agnostic. When a project uses C, Python, NodeJS, Java, or other software it did not author, the administrator installs that software as a sibling directory of the project and links it in under shared/project-dependency, with an .init file that every role's setup sources to put the dependency into the environment. Installation notes for each dependency sit beside its .init file, so that each team member can repeat the installation after cloning. The link itself is not tracked: it names a directory that is there only where the dependency was installed, so each clone makes its own, as the notes say.
The directory comes with a project link to the directory holding the project and its siblings, through which dependencies are linked, and with Python as an example dependency. The steps are given in administrator/document/how-to_add-project-dependency.html.
@@ -184,7 +184,7 @@
Role (administrator, developer, tester, consumer): the role, human or AI, that works with the files.
Provenance (authored, made): whether a person wrote the file or a tool produced it.
Capability (tool, document, experiment): what the file is for.
- Lifecycle (scratchpad, stage): how long the file is expected to last, or where it is in promotion.
+ Lifecycle (scratchpad): how long the file is expected to last.
Tracking (tracked, untracked): what version control does with it.
@@ -239,7 +239,7 @@
These documents give the details:
- - document/role-and-workflow_product-development.html : The roles, and how their work interacts.
+ - document/role-and-workflow_product-development.html : The roles, how their work interacts, and a shell for each role, in Emacs among others.
- document/role-and-workflow_product-maintenance.html : Issues, triage, and patching releases.
- administrator/document/how-to_release.html : Making a release.
diff --git a/document/role-and-workflow_product-development.html b/document/role-and-workflow_product-development.html
index 411b732..5a9e239 100644
--- a/document/role-and-workflow_product-development.html
+++ b/document/role-and-workflow_product-development.html
@@ -24,7 +24,7 @@
@@ -46,7 +46,7 @@
> ./setup consumer
- This will run a new shell with the proper environment setting. It is common for a person to have multiple shells, terminal sessions, or IDEs open, each running under a different role environment. Development and tests is a common pair, though tests are intended to be production tests. The developer has an experiment directory for experiments.
+
This will run a new shell with the proper environment setting. It is common for a person to have multiple shells, terminal sessions, or IDEs open, each running under a different role environment; the chapter "A shell for each role" gives an arrangement that works. Development and tests are a common pair, though tests are intended to be production tests. The developer has an experiment directory for experiments.
Administrator role
@@ -54,14 +54,14 @@
- Set up the project directory and keep it in sync with the Harmony skeleton.
- Maintain role environments (apart from role-specific tool/setup files).
- - Install and maintain shared and third_party tools, addressing issues with the project workflow. Note that the term "third_party" encompasses any software not authored within this specific project.
+ - Install and maintain the shared tools and the project dependencies, addressing issues with the project workflow. A project dependency is any software the project uses but did not author; it is installed beside the project and linked in under shared/project-dependency (see administrator/document/how-to_add-project-dependency.html).
Developer role
Responsibilities and Boundaries:
- Write and modify authored/ source.
- - Run builds and place artifacts in scratchpad/made, then execute the promote write script to copy artifacts to consumer/made for testing.
+ - Run builds and place artifacts in scratchpad/made, then execute the promote write script to copy artifacts to consumer/ for testing.
- Run experiments in experiment/. These experiments can sometimes be promoted to formal tests, but there is no requirement to do so. The developer role should not blur into the tester role; experiments are informal, whereas tests are formal and retained.
- Strict Boundary: A developer never writes into the tester/ directory. Instead, a developer adds tests to developer/experiment/ and offers to share them.
@@ -69,7 +69,7 @@
Tester role
Responsibilities and Boundaries:
- - Evaluate candidates under consumer/made/ and run regression suites to confirm:
+
- Evaluate candidates under consumer/ and run regression suites to confirm:
- That the code does not crash.
- That consumers do not have a bad experience.
@@ -84,14 +84,14 @@
Responsibilities:
- Act as the end-user simulation environment.
- - Consume and deploy artifacts exclusively from the consumer/made/ target.
+ - Consume and deploy artifacts exclusively from the consumer/ target.
- Never author or modify code; strictly run local builds or deployments for architecture-specific testing.
- Report issues. (Anyone can report an issue, and consumers regularly do).
External roles
- These roles drive the project forward but do not have a dedicated setup <role> workspace, as they do not directly build or test the code in that capacity. If these individuals need to interface with the code, they simply put on a workspace role hat, such as administer, developer, tester, or consumer.
+ These roles drive the project forward but do not have a dedicated setup <role> workspace, as they do not directly build or test the code in that capacity. If these individuals need to interface with the code, they simply put on a workspace role hat, such as administrator, developer, tester, or consumer.
Product manager
@@ -123,10 +123,113 @@
Promotion mechanics
- Building and promotion are separate activities. The developer compiles and places files in developer/scratchpad/made. The developer then runs promote write to transfer those files to consumer/made.
+ Building and promotion are separate activities. The developer compiles and places files in developer/scratchpad/made. The developer then runs promote write to transfer those files to consumer/.
- The consumer/made directory is strictly an untracked deployment target. No tools are permitted to rebuild during promotion, and no builds are run directly inside the consumer made directory.
+ The consumer/ directory is strictly an untracked deployment target. No tools are permitted to rebuild during promotion, and no builds are run directly inside the consumer made directory.
+
+
+ A shell for each role
+
+
+ A Harmony project is worked on through its roles, each entered with ./setup <role> from the top of the project, $REPO_HOME. When one person wears every hat, the work of all the roles runs side by side, at one keyboard. Whatever the editor, the arrangement that works is a shell for each role, kept open for the whole session, each in its role's own directory:
+
+
+
+ - administrator, in $REPO_HOME: git, such as git apply and git commit, and the scripts that repair or migrate the project's data.
+ - developer, in $REPO_HOME/developer: build and promote.
+ - tester, in $REPO_HOME/tester: the tests, run on what was promoted to consumer.
+ - a shell under no role, in $REPO_HOME/scratchpad, for running the installed program as its users do.
+ - a root shell, in a terminal of its own, outside the editor, for installing what was promoted to consumer.
+
+
+
+ Partitioned so, each shell's history holds one kind of work. The administrator's is the project's git history in the making; the developer's is builds; the tester's is test runs. history in a shell, or searching back through its input, finds the command wanted among others of its kind, and reads as a log of that role's part of the session. A shell's working directory does not change, so every path typed in it is relative to the same place, and a command found in its history runs again as it did before.
+
+
+
+ Files handed to the project, such as patches and the scripts that come with them, are put in $REPO_HOME/scratchpad, which git ignores, so they never end up in the repository. The administrator applies a patch from there, git apply scratchpad/<name>.patch, and runs a script from there, scratchpad/<name>.
+
+
+
+ The root shell is kept out of the editor because root does not run code another account can change. Emacs runs under the developer's account, and loads that account's files as code each time it starts: its init file, and every package. Any of that code can send text to any buffer's process, so a root shell in a buffer would take input from code the account can change. A terminal of its own, entered with su, keeps root's input out of that code's reach.
+
+
+ Emacs
+
+
+ Emacs holds the role shells as buffers, one shell buffer for each, named for its role. Emacs's buffer list, C-x C-b, then reads as the session's layout:
+
+
+
+ . * administrator 40279 Shell:run ~/project/Jizo/
+ * run 2551302 Shell:run ~/project/Jizo/scratchpad/
+ * developer 81001 Shell:run ~/project/Jizo/developer/
+ * tester 456830 Shell:run ~/project/Jizo/tester/
+ *scratch* 147 Lisp Interaction
+ %* *Messages* 22707 Messages
+
+
+
+ The last column is each shell's working directory, as Emacs follows it. The size column is the buffer's text: a shell buffer keeps everything printed in it, so the session's output can be searched with C-s and saved as a file.
+
+
+ Making the shells
+
+
+ M-x shell opens a shell in a buffer named *shell*, and called again it goes back to that buffer. Given a prefix argument, C-u M-x shell, it asks for the buffer's name, and a new name makes a new shell. So for each role:
+
+
+
+ C-u M-x shell RET developer RET
+ cd ~/project/Jizo
+ ./setup developer
+
+
+
+ setup starts the role's shell inside the buffer's shell, in the role's directory; exit leaves it, back to the shell the buffer started with. A buffer already open is renamed with M-x rename-buffer. The shell under no role is made the same way, named run, with cd ~/project/Jizo/scratchpad and no setup.
+
+
+ The role's environment in Emacs
+
+
+ A shell running in a buffer cannot change the environment of Emacs itself, and Emacs starts the programs it runs, such as those of M-x compile and M-x grep, with its own copy. So inside Emacs, setup runs env_to_emacs, from shared/tool, which gives the buffer the role's REPO_HOME, PROJECT, ROLE and PATH, with exec-path to match. A compile started from the developer's buffer then finds the developer's tools.
+
+
+
+ - The values are local to the one buffer whose shell ran setup, found by its process: the other buffers keep their own roles, and killing the buffer discards them.
+ - Leaving a role started inside another, with exit, hands the buffer back the outer role's values.
+ - env_to_emacs reaches Emacs through emacsclient, so Emacs's server must be running: (server-start) in the init file, or M-x server-start once. Without it, setup says so, and the role's shell works as before, Emacs keeping its own environment.
+
+
+ History in a shell buffer
+
+
+ A shell buffer has two histories. The shell keeps its own, read with history, and written to the history file when it exits. Emacs keeps the input typed in the buffer, its input ring, one for each buffer:
+
+
+
+ M-p, M-n the previous or next input, to edit and send again
+ M-r search back through the inputs, incrementally
+ C-c C-l list the inputs in a buffer of their own
+ C-c C-o delete the output of the last command
+ C-c C-r move to the start of the last command's output
+
+
+
+ As each buffer holds one role's work, M-r build in the developer's buffer finds builds, and M-r apply in the administrator's finds the patches applied, with nothing of the other roles among them.
+
+
+ The working directory
+
+
+ Emacs follows a shell's working directory by watching the cd, pushd and popd commands typed in it, and uses it as the buffer's default directory: C-x C-f in the developer's buffer starts in developer/, and M-x compile runs there. A directory changed some other way is not seen: setup changes into the role's directory itself, and so does a script. When a buffer's directory is wrong, M-x dirs asks the shell, and puts Emacs right; Emacs's dirtrack-mode, which reads the directory from the prompt instead, keeps it right when the prompt shows the directory and dirtrack-list is set to match it. A role's shell staying in its directory keeps this right without thought.
+
+
+ Other environments
+
+
+ A chapter for Eclipse or IntelliJ IDEA waits for someone working in one of them: what was written for them earlier is old, and is not kept here.
diff --git a/document/role-and-workflow_product-maintenance.html b/document/role-and-workflow_product-maintenance.html
index e93f12d..44b95e5 100644
--- a/document/role-and-workflow_product-maintenance.html
+++ b/document/role-and-workflow_product-maintenance.html
@@ -24,7 +24,7 @@
@@ -81,7 +81,7 @@
Core developer queue
- This queue serves the core_developer_branch. A tester writes a test for every issue reported in this queue. Doing so isolates the defect, proves the fix, and guards against future regressions.
+ This queue serves the core-developer_branch. A tester writes a test for every issue reported in this queue. Doing so isolates the defect, proves the fix, and guards against future regressions.
Released product queue
@@ -91,7 +91,7 @@
Triage and patching
- Guided by the project philosophy, the triage team reviews each release queue issue to determine its impact. The team assesses whether the defect affects the core_developer_branch, assuming by default that it probably does. The team also determines if the defect is critical enough to warrant a patch on one or more active release branches.
+ Guided by the project philosophy, the triage team reviews each release queue issue to determine its impact. The team assesses whether the defect affects the core-developer_branch, assuming by default that it probably does. The team also determines if the defect is critical enough to warrant a patch on one or more active release branches.
Based on this assessment, the triage team files actionable tickets in the core developer queue. A ticket explicitly specifies its target branches. A ticket will be filed against either the core developer branch, specific release branches, or a combination of both.
@@ -100,7 +100,7 @@
Members of the tester team also file tickets directly into the core developer queue when they discover defects in the core branch.
- Responsibility for resolving a ticket depends on its target. The core developer team addresses fixes required on the core_developer_branch. The branch maintenance team addresses fixes required on the release_v<major> branches.
+ Responsibility for resolving a ticket depends on its target. The core developer team addresses fixes required on the core-developer_branch. The branch maintenance team addresses fixes required on the release_v<major> branches.
When a release is patched, the branch name remains static. The administrator advances the minor release number in the shared/tool/version file and tags the commit.
diff --git a/document/writing_tool-script.html b/document/writing_tool-script.html
index 5942d3f..f98e1af 100644
--- a/document/writing_tool-script.html
+++ b/document/writing_tool-script.html
@@ -24,7 +24,7 @@
@@ -33,7 +33,7 @@
Purpose
- A tool is a script a person runs from a role setup to do work on files. This document gives the conventions for how an RT tool presents itself on the command line, reports what it does, and changes files safely. It complements RT-code-format.html, which covers identifier names, layout, and the separation of the CLI() function from the work functions. Those rules apply here and are not repeated.
+ A tool is a script a person runs from a role setup to do work on files. This document gives the conventions for how an RT tool presents itself on the command line, reports what it does, and changes files safely. It complements RT-code-format.html, in the RT-Style project, which covers identifier names, layout, and the separation of the CLI() function from the work functions. Those rules apply here and are not repeated.
@@ -143,6 +143,11 @@
Errors are logged on their own lines with the tag error, the tool carries on with the remaining files, and the exit status is nonzero when any error occurred. Errors in the command line itself are printed to standard error before any work starts.
+ The CLI prints the log
+
+ The log is printed by the tool's person-facing part, its CLI() function, not by the work functions. A work function says what it did through what it returns, or through an output function it is given, which prints nothing unless its caller passes one that does. A program that includes the tool as a module then calls the work functions without their output, and one work function calls another without the second's log appearing inside the first's.
+
+
Walking directories
@@ -160,7 +165,7 @@
- An absolute path written into a file is correct for only one view of the file system. Under the subu arrangement, the master user reaches a sub-user's files through a mapped mount at a different absolute path from the one the sub-user sees. A path recorded by one of them is then unreadable, or points somewhere else, for the other. A relative path is resolved from wherever the file is reached, so it is correct in every view.
+ An absolute path written into a file is correct for only one view of the file system. Under Account-Tree, the master account reaches a child account's files through a mapped mount at a different absolute path from the one the child account sees. A path recorded by one of them is then unreadable, or points somewhere else, for the other. A relative path is resolved from wherever the file is reached, so it is correct in every view.
Changing files safely
@@ -241,7 +246,12 @@
import sys ,os
from pathlib import Path
- def work(dirpa_root ,recursive ,preview):
+ def silent(text=""):
+ "an output function that prints nothing"
+ pass
+
+ def work(dirpa_root ,recursive ,preview ,out=silent):
+ "the work; each log line goes to out, which the CLI makes print"
...
def print_help():
@@ -260,6 +270,7 @@
command ,rest = argv[0] ,argv[1:]
...
+ return work(dirpa_root ,recursive ,preview ,out=print)
if __name__ == "__main__":
sys.exit(CLI())
diff --git a/shared/project-dependency/.gitignore b/shared/project-dependency/.gitignore
index a033c31..f8476ee 100644
--- a/shared/project-dependency/.gitignore
+++ b/shared/project-dependency/.gitignore
@@ -1,6 +1,6 @@
# shared/project-dependency/.gitignore
-# Tracks the skeleton's parts. Add a ! line for anything else to track,
-# such as a dependency's link.
+# Tracks the skeleton's parts. A dependency's link is not tracked: each
+# clone makes its own, following the notes beside its .init file.
*
!.gitignore
!project
@@ -8,4 +8,3 @@
!*.install
!*.org
!*.html
-!Python-3.12.3
diff --git a/shared/project-dependency/Python.org b/shared/project-dependency/Python.org
index 8e67c79..ebbe9f7 100644
--- a/shared/project-dependency/Python.org
+++ b/shared/project-dependency/Python.org
@@ -62,10 +62,11 @@ python3 -m pip install
* 6. Link the Project
-Python-3.12.3 is linked to a Harmony derived project by default.
+Make the link in the project's shared/project-dependency directory. The 'project' in the link target is literal: it is the link, which comes with the skeleton, to the directory holding the project and its siblings.
-See administrator/document/how-to_add-project-dependency.html for details about linking a project, if you want to check the setup.
-
-If you are installing a different version, then at least the Python-3.12.3 version project linking is there as a good example.
+#+begin_src bash
+cd $REPO_HOME/shared/project-dependency
+ln -s project/Python-3.12.3 Python-3.12.3
+#+end_src
-Project linking is not difficult, make a sym link to `project/`, and then add an init file, as described in administrator/document/how-to_add-project-dependency.html. The 'project' in the link is literal.
+The link is not tracked, so each clone makes its own. Python.init, beside this file, puts the build on PATH once the link is there. For another version, change the version in the link and in Python.init; administrator/document/how-to_add-project-dependency.html gives the details.