From 541c70dc1dee41d211d6fa1f8b15bb5304feac70 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Tue, 27 Oct 2026 11:15:15 +0900 Subject: [PATCH 1/2] mcpplibs.os 0.1.1: names reach the system as UTF-8, never through the code page The patch release of mcpplibs/os#4. On Windows, 0.1.0 narrowed names through the ANSI code page: a name it could not spell ended the program, and one it could spell reached openkal (which reads UTF-8) wrongly. The tests/examples/os consumer moves to 0.1.1 and writes and reads a file whose name is not ASCII. --- pkgs/o/os.lua | 12 ++++++++++++ tests/examples/os/mcpp.toml | 2 +- tests/examples/os/tests/os.cpp | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/pkgs/o/os.lua b/pkgs/o/os.lua index 6bb851a5..8794d29d 100644 --- a/pkgs/o/os.lua +++ b/pkgs/o/os.lua @@ -19,6 +19,10 @@ package = { xpm = { linux = { + ["0.1.1"] = { + url = "https://github.com/mcpplibs/os/archive/refs/tags/0.1.1.tar.gz", + sha256 = "c5abfb625ded0d5d837b799722c836c302460251d47081fef7a57a2a12e6b2b9", + }, ["0.1.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/os/archive/refs/tags/0.1.0.tar.gz", @@ -28,6 +32,10 @@ package = { }, }, macosx = { + ["0.1.1"] = { + url = "https://github.com/mcpplibs/os/archive/refs/tags/0.1.1.tar.gz", + sha256 = "c5abfb625ded0d5d837b799722c836c302460251d47081fef7a57a2a12e6b2b9", + }, ["0.1.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/os/archive/refs/tags/0.1.0.tar.gz", @@ -37,6 +45,10 @@ package = { }, }, windows = { + ["0.1.1"] = { + url = "https://github.com/mcpplibs/os/archive/refs/tags/0.1.1.tar.gz", + sha256 = "c5abfb625ded0d5d837b799722c836c302460251d47081fef7a57a2a12e6b2b9", + }, ["0.1.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/os/archive/refs/tags/0.1.0.tar.gz", diff --git a/tests/examples/os/mcpp.toml b/tests/examples/os/mcpp.toml index 90a02f63..ba244646 100644 --- a/tests/examples/os/mcpp.toml +++ b/tests/examples/os/mcpp.toml @@ -6,7 +6,7 @@ name = "os-tests" version = "0.1.0" [dependencies.mcpplibs] -os = "0.1.0" +os = "0.1.1" [indices] mcpplibs = { path = "../../.." } diff --git a/tests/examples/os/tests/os.cpp b/tests/examples/os/tests/os.cpp index 978a1610..76cdc9d3 100644 --- a/tests/examples/os/tests/os.cpp +++ b/tests/examples/os/tests/os.cpp @@ -21,6 +21,12 @@ int main(int argc, char** argv) { check(!os::fs::publish(file, "second").has_value(), "a published name is not replaced"); check(os::fs::read(file).value_or("") == "first", "and keeps what was published first"); + // 0.1.1: a name the Windows code page cannot spell, both ways (UTF-8 throughout). + const std::string name = "\xE4\xB8\xAD\xE6\x96\x87 \xD0\xBA\xD0\xB8\xD1\x80.txt"; + const auto wide = dir / os::fs::from_utf8(name); + check(os::fs::write(wide, "ok").has_value() && os::fs::read(wide).value_or("") == "ok", "a file whose name is not ASCII"); + check(os::fs::utf8(wide.filename()) == name, "and its name reads back as UTF-8"); + const char sep = os::conventions().path_list_separator; const auto parts = os::env::split_list(std::string("a") + sep + sep + "b"); check(parts.size() == 2, "a list of directories splits at the host's separator"); From 73dbe8af135feda145cb085126ede8e8b836fc04 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Tue, 27 Oct 2026 11:18:58 +0900 Subject: [PATCH 2/2] mcpplibs.os: automatic updates follow the repository's version tags --- pkgs/o/os.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/o/os.lua b/pkgs/o/os.lua index 8794d29d..e7f12c89 100644 --- a/pkgs/o/os.lua +++ b/pkgs/o/os.lua @@ -17,6 +17,13 @@ package = { repo = "https://github.com/mcpplibs/os", type = "package", + extensions = { + autoupdate = { + tag = "${version}", + url = "https://github.com/mcpplibs/os/archive/refs/tags/${tag}.tar.gz", + }, + }, + xpm = { linux = { ["0.1.1"] = {