Skip to content

Commit d2cdc6d

Browse files
0.4.2: which names changed (fs::watcher); the tests are mtest's (#22)
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent defb432 commit d2cdc6d

49 files changed

Lines changed: 1209 additions & 344 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ name: CI
1313
# run under node (checks/emscripten); a program that starts one
1414
# fails at LINK naming the openkal symbol (checks/absent)
1515
#
16-
# The library is built with the released mcpp, 2026.11.7.2, which resolves
17-
# within the platform's version group (an earlier mcpp takes the newest member
18-
# of a range and then refuses it against the group). The ok images
16+
# The library is built with the released mcpp, 2026.11.9.1: its tests are
17+
# mtest's, and mtest uses mcpplibs.os, so the package being built has to stand
18+
# for itself in its tests' graph, which mcpp does from 2026.11.9.1; it also
19+
# resolves within the platform's version group (an earlier mcpp takes the newest
20+
# member of a range and then refuses it against the group). The ok images
1921
# (MCPP_PLATFORM) and checks/hosted select openkal-platform 0.24 and its
2022
# OpenKal 0.24 implementation, musl 0.28 and C++ runtime 0.19 group. The library
2123
# itself needs 2026.10.27.1 or later, the first that selects a platform
@@ -37,7 +39,7 @@ env:
3739
MCPP_SOURCE_REF: ${{ github.event.inputs.mcpp_ref || vars.MCPP_SOURCE_REF || '' }}
3840
# 2026.11.3.1: the std module compiled with the platform's words (openkal-platform 0.23.0's
3941
# `-fcf-protection=full` refused every `import std` of an earlier mcpp's).
40-
MCPP_INSTALL: ${{ (github.event.inputs.mcpp_ref || vars.MCPP_SOURCE_REF) && 'mcpp' || 'mcpp@2026.11.7.2' }}
42+
MCPP_INSTALL: ${{ (github.event.inputs.mcpp_ref || vars.MCPP_SOURCE_REF) && 'mcpp' || 'mcpp@2026.11.9.1' }}
4143
XLINGS_VERSION: v2026.10.26.1
4244
XLINGS_NON_INTERACTIVE: '1'
4345

@@ -79,7 +81,10 @@ jobs:
7981
8082
- name: The mcpp under cross-validation
8183
run: |
84+
# The configured mirror (GLOBAL), then CN (GitCode first) from the fourth attempt: a cached index
85+
# can predate the release, and xlings keeps it when an anonymous refresh fails.
8286
for attempt in 1 2 3 4 5 6; do
87+
[ "$attempt" = 4 ] && { xlings config --mirror CN > /dev/null 2>&1 || true; }
8388
xlings update > /dev/null 2>&1 || true
8489
if xlings install "$MCPP_INSTALL" -y -g; then break; fi
8590
[ "$attempt" = 6 ] && { echo "::error::mcpp could not be installed"; exit 1; }
@@ -113,7 +118,7 @@ jobs:
113118
run: |
114119
profile='${{ matrix.profile }}'
115120
mcpp test --profile "$profile" 2>&1 | tee tests.log
116-
for name in platform_test fs_test process_test ipc_test unit_test dirs_terminal_test linux_test; do
121+
for name in platform_test fs_test process_test ipc_test unit_test dirs_terminal_test linux_test watch_test; do
117122
grep -q "^$name \.\.\. ok" tests.log || { echo "::error::$name did not run or did not pass"; exit 1; }
118123
done
119124
@@ -177,7 +182,10 @@ jobs:
177182
178183
- name: The mcpp under cross-validation
179184
run: |
185+
# The configured mirror (GLOBAL), then CN (GitCode first) from the fourth attempt: a cached index
186+
# can predate the release, and xlings keeps it when an anonymous refresh fails.
180187
for attempt in 1 2 3 4 5 6; do
188+
[ "$attempt" = 4 ] && { xlings config --mirror CN > /dev/null 2>&1 || true; }
181189
xlings update > /dev/null 2>&1 || true
182190
if xlings install "$MCPP_INSTALL" -y -g; then break; fi
183191
[ "$attempt" = 6 ] && { echo "::error::mcpp could not be installed"; exit 1; }
@@ -211,7 +219,7 @@ jobs:
211219
run: |
212220
profile='${{ matrix.profile }}'
213221
mcpp test --profile "$profile" ${{ matrix.target }} 2>&1 | tee tests.log
214-
for name in platform_test fs_test process_test ipc_test unit_test dirs_terminal_test linux_test library_test; do
222+
for name in platform_test fs_test process_test ipc_test unit_test dirs_terminal_test linux_test library_test watch_test; do
215223
grep -q "^$name \.\.\. ok" tests.log || { echo "::error::$name did not run or did not pass"; exit 1; }
216224
done
217225
@@ -263,7 +271,7 @@ jobs:
263271
run: |
264272
set -euo pipefail
265273
mcpp test --target x86_64-openkal 2>&1 | tee tests.log
266-
for name in platform_test fs_test process_test ipc_test unit_test dirs_terminal_test linux_test; do
274+
for name in platform_test fs_test process_test ipc_test unit_test dirs_terminal_test linux_test watch_test; do
267275
grep -q "^$name \.\.\. ok" tests.log || { echo "::error::$name did not pass as an image"; exit 1; }
268276
done
269277
mcpp test --target aarch64-openkal --no-run
@@ -382,7 +390,10 @@ jobs:
382390
| bash -s "$XLINGS_VERSION"
383391
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
384392
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
393+
# The configured mirror (GLOBAL), then CN (GitCode first) from the fourth attempt: a cached index
394+
# can predate the release, and xlings keeps it when an anonymous refresh fails.
385395
for attempt in 1 2 3 4 5 6; do
396+
[ "$attempt" = 4 ] && { xlings config --mirror CN > /dev/null 2>&1 || true; }
386397
xlings update > /dev/null 2>&1 || true
387398
if xlings install "$MCPP_INSTALL" -y -g; then break; fi
388399
[ "$attempt" = 6 ] && { echo "::error::mcpp could not be installed"; exit 1; }
@@ -413,7 +424,7 @@ jobs:
413424
run: |
414425
set -euo pipefail
415426
mcpp test --target wasm32-emscripten --profile '${{ matrix.profile }}' 2>&1 | tee tests.log
416-
for name in platform_test fs_test dirs_terminal_test linux_test library_test; do
427+
for name in platform_test fs_test dirs_terminal_test linux_test library_test watch_test; do
417428
grep -q "^$name \.\.\. ok" tests.log || { echo "::error::$name did not run or did not pass"; exit 1; }
418429
done
419430
- name: The compile-time constants of Emscripten (R3)

‎.github/workflows/unit-lifecycle.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: Install the actual native compiler
5353
run: |
5454
xlings update
55-
xlings install mcpp@2026.11.7.2 -y -g
55+
xlings install mcpp@2026.11.9.1 -y -g
5656
spec='${{ matrix.toolchain }}'
5757
case "$spec" in
5858
msvc@system) mcpp toolchain default msvc ;;

‎CHANGELOG.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Changelog
22

3+
## 0.4.2
4+
5+
- **Which names changed (`fs::watcher`).** A watcher holds names --- files and
6+
directories, which need not exist yet --- and `changed(wait)` answers which
7+
of them changed since it last answered, each once and as it was added: a
8+
file's content, kind or node (a file replaced by a rename over it, as editors
9+
save), a name made or removed, a directory's entries. The system's notice says
10+
when to look --- inotify on Linux and kqueue on macOS by the kernel's calls,
11+
`ReadDirectoryChangesW` on Windows --- and each name's stamp, kind and
12+
identity say what changed, so every system answers alike: a notice of another
13+
name, or one write a system tells as several notices, tells nothing more. A
14+
write that leaves the size, and the time within the volume's resolution, as
15+
they were is not told. An ok image and Emscripten have no notice, and the
16+
watcher looks when asked (`notified()` false). `native_handle()` is the descriptor an event
17+
loop waits upon on Linux and macOS (mcpplibs/os#21).
18+
- **The tests are mtest's.** Each test file declares an object of
19+
`mcpplibs.mtest` (0.5.2, a `[dev-dependencies]` entry) and no `main`; a test
20+
that starts copies of itself declares what a copy does (`child`), and its
21+
cases are reported, listed and selected as mtest's. The suites of
22+
`checks/hosted` and `checks/emscripten` include the same files. Built with
23+
mcpp 2026.11.9.1, under which the package being built stands for itself in its
24+
tests' graph: mtest, which uses mcpplibs.os, is built against the os under
25+
test.
26+
327
## 0.4.1
428

529
- **A standard stream kept (`stdio::capture`).** `capture::begin(stream::error)`

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ dropped (0.2.8).
109109
| `mcpplibs.os.platform` | `PLATFORM`, `ARCH`, `is_linux` / `is_macos` / `is_windows` / `is_posix` / `is_openkal` / `is_emscripten`, `exe_suffix`, `path_list_separator`; `host()`, a constant expression on a native target; `can_run_on(p)` and `on<P>(f)`, a platform question that holds in a native build and an image alike |
110110
| `mcpplibs.os.error` | `errc` (openkal's closed set of conditions), `error`, `result<T>` |
111111
| `mcpplibs.os.env` | variables (names without case on Windows), `NAME=value` entries as overrides (`assignments`), arguments, the program's own image, lists of directories in the host's separator (`split_list`, `join_list`), PATH search with PATHEXT |
112-
| `mcpplibs.os.fs` | `write_atomic`, `publish` (no replace), `append`, `sync`, `caps`, `lock`, links, `set_executable`, `stamp_of`, `identity_of`, `owner_of`, `writable`, `locate`, `absolute`, `names_a_place`, `canonical`, a bounded `read`; what a volume does, measured (`measure`, `volume_type`), and the operations that follow it (`place`, `exchange`); names in the host's rules without the file system: `generic`, `native`, `extended`, `is_absolute`, `same`, `within` |
112+
| `mcpplibs.os.fs` | `write_atomic`, `publish` (no replace), `append`, `sync`, `caps`, `lock`, links, `set_executable`, `stamp_of`, `identity_of`, `owner_of`, `writable`, `locate`, `absolute`, `names_a_place`, `canonical`, a bounded `read`; what a volume does, measured (`measure`, `volume_type`), and the operations that follow it (`place`, `exchange`); names in the host's rules without the file system: `generic`, `native`, `extended`, `is_absolute`, `same`, `within`; which names changed (`watcher`: inotify, kqueue, `ReadDirectoryChangesW`; a look when asked in an image and on Emscripten) |
113113
| `mcpplibs.os.process` | `spawn`, `run` (and with bounds: a hard bound, a grace, a drain, output limits), `exec`, a command line joined as it is for the command interpreter (`one_string`), pipes, both outputs on one pipe, output onto this program's error output, units and `end_unit`, declared units, observation and retirement, bound lifetime, bounded waits and reads; `self`, `describe`, `alive`, `threads` |
114114
| `mcpplibs.os.interrupt` | `requested`, `wait`, `end_as_requested`, `end_as_output_closed` |
115115
| `mcpplibs.os.stdio` | the three streams as bytes; a bounded read of input; the output sent to the error stream for a while (`output_to_error`) |

‎checks/emscripten/mcpp.toml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ version = "0.1.0"
1111

1212
[dependencies]
1313
os = { path = "../.." }
14+
15+
# The tests are mtest's (tests/*.cpp of the package, each reached by an include).
16+
[dev-dependencies]
17+
mcpplibs.mtest = "0.5.2"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// dirs_terminal_test.cpp of mcpplibs.os, compiled for Emscripten. The imports are restated
22
// because the dependency scan reads this file and not the one it includes.
3-
#include "../../../tests/check.hpp"
43
import std;
54
import mcpplibs.os;
5+
import mcpplibs.mtest;
66
#include "../../../tests/dirs_terminal_test.cpp"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// facts_test.cpp of mcpplibs.os, compiled in this arrangement. The imports are restated
22
// because the dependency scan reads this file and not the one it includes.
3-
#include "../../../tests/check.hpp"
43
import std;
54
import mcpplibs.os;
5+
import mcpplibs.mtest;
66
#include "../../../tests/facts_test.cpp"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// fs_test.cpp of mcpplibs.os, compiled for Emscripten. The imports are restated
22
// because the dependency scan reads this file and not the one it includes.
3-
#include "../../../tests/check.hpp"
43
import std;
54
import mcpplibs.os;
5+
import mcpplibs.mtest;
66
#include "../../../tests/fs_test.cpp"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// library_test.cpp of mcpplibs.os, compiled for Emscripten. The imports are restated
22
// because the dependency scan reads this file and not the one it includes.
3-
#include "../../../tests/check.hpp"
43
import std;
54
import mcpplibs.os;
5+
import mcpplibs.mtest;
66
#include "../../../tests/library_test.cpp"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// linux_test.cpp of mcpplibs.os, compiled for Emscripten. The imports are restated
22
// because the dependency scan reads this file and not the one it includes.
3-
#include "../../../tests/check.hpp"
43
import std;
54
import mcpplibs.os;
5+
import mcpplibs.mtest;
66
#include "../../../tests/linux_test.cpp"

0 commit comments

Comments
 (0)