fortrangoingonforty/lib-modules / 575fa08

Browse files

Scaffold refs workflow

Authored by espadonne
SHA
575fa088ec6efdd8919fe0a6caa5e2423b4fb7ec
Parents
2caaa71
Tree
2eba0e9

3 changed files

StatusFile+-
M .gitignore 1 0
A docs/REFERENCE-LIBS.md 79 0
A scripts/sync-refs.sh 42 0
.gitignoremodified
@@ -1,2 +1,3 @@
11
 .DS_Store
22
 AGENTS.md
3
+.refs/
docs/REFERENCE-LIBS.mdadded
@@ -0,0 +1,79 @@
1
+# Reference Libraries
2
+
3
+This repo keeps tracked package code out of the umbrella tree, but it is still
4
+useful to study existing libraries before we start a new module.
5
+
6
+Local comparison checkouts live under `.refs/` and stay untracked. The tracked
7
+part of the workflow is:
8
+
9
+- this manifest
10
+- `scripts/sync-refs.sh`
11
+
12
+Run the sync script from the umbrella root:
13
+
14
+```bash
15
+./scripts/sync-refs.sh
16
+```
17
+
18
+## Current Read
19
+
20
+The best next flagship still looks like `fgof-keys`.
21
+
22
+Why:
23
+
24
+- it builds directly on `fgof-termios`, `fgof-pty`, and `fgof-lineedit`
25
+- terminal key handling is still undersupplied compared with process, fs, PTY,
26
+  and raw terminal mode helpers
27
+- it creates a cleaner foundation for future `fgof-screen` and richer CLI or
28
+  TUI work
29
+
30
+The most interesting "crowded area we might still beat" is not another raw
31
+ncurses binding. It is a higher-level screen or rendering library such as a
32
+future `fgof-screen`.
33
+
34
+## Seed Reference Set
35
+
36
+The first seed is intentionally small and focused. It is meant to support the
37
+next few likely package decisions without turning `.refs/` into a dumping
38
+ground.
39
+
40
+| Group | Repo | Why it matters |
41
+| --- | --- | --- |
42
+| `stdlib` | `fortran-lang/stdlib` | Standard-library baseline and overlap check |
43
+| `terminal-ui` | `interkosmos/fortran-ncurses` | Modern thin ncurses binding baseline |
44
+| `terminal-ui` | `urbanjost/M_ncurses` | Mature ncurses binding baseline |
45
+| `system` | `urbanjost/M_process` | Existing process wrapper comparison |
46
+| `system` | `urbanjost/M_system` | Existing POSIX and OS wrapper comparison |
47
+| `system` | `interkosmos/fortran-unix` | Thin POSIX binding comparison |
48
+| `testing` | `fortran-lang/test-drive` | Test utility baseline for `fgof-proc-test` |
49
+| `testing` | `everythingfunctional/vegetables` | Alternate test utility baseline |
50
+
51
+## What To Look For
52
+
53
+When we compare against a deferred or already-served area, we should be asking:
54
+
55
+- Is the existing package a thin binding or a genuinely ergonomic library?
56
+- Does it have strong `fpm` support and examples?
57
+- Does it expose low-level C semantics directly to users?
58
+- Does it preserve literal strings and path data cleanly?
59
+- Does it provide a stable, app-author-friendly API or mainly raw wrappers?
60
+- Does it cover current compiler and CI expectations on macOS and Linux?
61
+
62
+If the answer is "mostly thin wrappers," there is still room for an `fgof-*`
63
+package that offers a better developer surface.
64
+
65
+## Shortlist After The First Wave
66
+
67
+- `fgof-keys`
68
+- `fgof-expect`
69
+- `fgof-proc-test`
70
+- `fgof-temp`
71
+- `fgof-clipboard`
72
+- `fgof-screen`
73
+
74
+## Notes
75
+
76
+- `.refs/` is intentionally untracked.
77
+- Add new comparison targets to the sync script and this manifest together.
78
+- If we decide to study a crowded area in depth, create a short audit note in
79
+  this `docs/` directory instead of committing cloned source.
scripts/sync-refs.shadded
@@ -0,0 +1,42 @@
1
+#!/usr/bin/env bash
2
+set -euo pipefail
3
+
4
+ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
+REF_DIR="${ROOT_DIR}/.refs"
6
+
7
+clone_or_update() {
8
+  local group="$1"
9
+  local name="$2"
10
+  local url="$3"
11
+  local target="${REF_DIR}/${group}/${name}"
12
+
13
+  mkdir -p "${REF_DIR}/${group}"
14
+
15
+  if [[ -d "${target}/.git" ]]; then
16
+    echo "Updating ${group}/${name}"
17
+    git -C "${target}" fetch --all --tags --prune
18
+    git -C "${target}" pull --ff-only
19
+  else
20
+    echo "Cloning ${group}/${name}"
21
+    git clone "${url}" "${target}"
22
+  fi
23
+}
24
+
25
+clone_or_update "stdlib" "stdlib" "https://github.com/fortran-lang/stdlib.git"
26
+
27
+clone_or_update "terminal-ui" "fortran-ncurses" \
28
+  "https://github.com/interkosmos/fortran-ncurses.git"
29
+clone_or_update "terminal-ui" "M_ncurses" \
30
+  "https://github.com/urbanjost/M_ncurses.git"
31
+
32
+clone_or_update "system" "M_process" \
33
+  "https://github.com/urbanjost/M_process.git"
34
+clone_or_update "system" "M_system" \
35
+  "https://github.com/urbanjost/M_system.git"
36
+clone_or_update "system" "fortran-unix" \
37
+  "https://github.com/interkosmos/fortran-unix.git"
38
+
39
+clone_or_update "testing" "test-drive" \
40
+  "https://github.com/fortran-lang/test-drive.git"
41
+clone_or_update "testing" "vegetables" \
42
+  "https://github.com/everythingfunctional/vegetables.git"