Skip to content

Commit 8c75ace

Browse files
authored
chore(index): add tinyhttps 0.2.9 (#68)
* chore(index): add tinyhttps 0.2.9 * fix(ci): avoid copying workspace build trees
1 parent 3acfc8b commit 8c75ace

6 files changed

Lines changed: 109 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# mcpplibs.tinyhttps 0.2.9 index update
2+
3+
## Scope
4+
5+
- Add upstream Form A module release `mcpplibs.tinyhttps@0.2.9` for Linux, macOS, and Windows.
6+
- Mirror the immutable GitHub tag archive byte-for-byte to `mcpp-res/tinyhttps`.
7+
- Add a three-platform module smoke example that compiles and runs exported request, proxy, response, and strict chunk-size APIs without external network access.
8+
9+
## Release and source evidence
10+
11+
- Upstream release: `https://github.com/mcpplibs/tinyhttps/releases/tag/0.2.9`
12+
- Tag commit: `965d805050d02fd6ed244473a6a68b6ace4bf032`
13+
- GLOBAL URL: `https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.9.tar.gz`
14+
- CN URL: `https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.2.9/tinyhttps-0.2.9.tar.gz`
15+
- SHA256: `b17e0b15d2c205a2918708bcd3ac992384f1a38d03232c28f17190a1db081e54`
16+
17+
The GLOBAL archive was downloaded independently twice and both files had the recorded SHA256. The exact first download was uploaded through `gtc`; a fresh CN download returned HTTP 200 and was byte-identical to GLOBAL.
18+
19+
## Package shape and features
20+
21+
The upstream archive contains `mcpp.toml`, C++23 module sources, and its `compat.mbedtls` dependency, so the existing Form A descriptor remains appropriate and requires no inline `mcpp` recipe. Version 0.2.9 adds no index-level optional source component, so no feature gate is needed.
22+
23+
## Verification gates
24+
25+
- Lua syntax and mirror-table lint for all package descriptors.
26+
- Resolver grammar parse with CI-pinned mcpp 0.0.87.
27+
- `tests/smoke_tinyhttps_module.sh` with CI-pinned mcpp 0.0.87 and `MCPP_INDEX_MIRROR=GLOBAL`. The script reseeds only the checkout's `pkgs/` into the builtin `mcpplibs` index because builtin namespaces cannot be overridden by a workspace path index. Limiting the copy to package descriptors also avoids copying workspace build trees produced by an earlier CI step.
28+
- CN HTTP 200 and byte-identical SHA256 verification.
29+
- GitHub Actions Linux, macOS, and Windows workspace jobs run the tinyhttps smoke after the workspace suite, plus CN reachability.

.github/workflows/validate.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ jobs:
194194
"$MCPP" --version
195195
# No `timeout` wrapper: absent on macOS runners; job-level timeout-minutes bounds it.
196196
"$MCPP" test --workspace
197+
- name: tinyhttps module package smoke
198+
shell: bash
199+
env:
200+
MCPP_INDEX_MIRROR: GLOBAL
201+
run: bash tests/smoke_tinyhttps_module.sh
197202

198203
# ── Exception: the public `imgui` C++23-module package (namespace "") ──
199204
# Not yet a workspace member: its package has an empty namespace (the builtin

pkgs/t/tinyhttps.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ package = {
6868
},
6969
sha256 = "a3d72396b267820405b675dd89c0889ef72605e3eedb94e000c6f48479b38001",
7070
},
71+
["0.2.9"] = {
72+
url = {
73+
GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.9.tar.gz",
74+
CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.2.9/tinyhttps-0.2.9.tar.gz",
75+
},
76+
sha256 = "b17e0b15d2c205a2918708bcd3ac992384f1a38d03232c28f17190a1db081e54",
77+
},
7178
},
7279
macosx = {
7380
["0.2.1"] = {
@@ -126,6 +133,13 @@ package = {
126133
},
127134
sha256 = "a3d72396b267820405b675dd89c0889ef72605e3eedb94e000c6f48479b38001",
128135
},
136+
["0.2.9"] = {
137+
url = {
138+
GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.9.tar.gz",
139+
CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.2.9/tinyhttps-0.2.9.tar.gz",
140+
},
141+
sha256 = "b17e0b15d2c205a2918708bcd3ac992384f1a38d03232c28f17190a1db081e54",
142+
},
129143
},
130144
windows = {
131145
["0.2.1"] = {
@@ -184,6 +198,13 @@ package = {
184198
},
185199
sha256 = "a3d72396b267820405b675dd89c0889ef72605e3eedb94e000c6f48479b38001",
186200
},
201+
["0.2.9"] = {
202+
url = {
203+
GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.9.tar.gz",
204+
CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.2.9/tinyhttps-0.2.9.tar.gz",
205+
},
206+
sha256 = "b17e0b15d2c205a2918708bcd3ac992384f1a38d03232c28f17190a1db081e54",
207+
},
187208
},
188209
},
189210
}

tests/examples/tinyhttps/mcpp.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "tinyhttps-tests"
3+
version = "0.1.0"
4+
5+
[dependencies]
6+
tinyhttps = "0.2.9"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import std;
2+
import mcpplibs.tinyhttps;
3+
4+
int main() {
5+
using namespace mcpplibs::tinyhttps;
6+
7+
const auto request = HttpRequest::post("https://example.invalid/data", "{\"ok\":true}");
8+
const auto proxy = parse_proxy_url("http://127.0.0.1:8088/path");
9+
const auto chunk = parse_chunk_size_line("1a");
10+
const auto invalid_chunk = parse_chunk_size_line("1x");
11+
12+
HttpResponse response{204, "No Content", {}, {}};
13+
const bool ok = request.method == Method::POST
14+
&& request.url == "https://example.invalid/data"
15+
&& request.body == "{\"ok\":true}"
16+
&& request.headers.at("Content-Type") == "application/json"
17+
&& proxy.host == "127.0.0.1"
18+
&& proxy.port == 8088
19+
&& chunk == 26
20+
&& !invalid_chunk.has_value()
21+
&& response.ok();
22+
return ok ? 0 : 1;
23+
}

tests/smoke_tinyhttps_module.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
# The builtin mcpplibs namespace cannot be overridden by a workspace path index.
3+
# Reseed that index from this checkout, then exercise the checked-in example.
4+
set -euo pipefail
5+
6+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
7+
MCPP_BIN="${MCPP:-$(command -v mcpp || true)}"
8+
if [[ -z "$MCPP_BIN" || ! -x "$MCPP_BIN" ]]; then
9+
echo "FATAL: set MCPP=/path/to/mcpp or put mcpp on PATH" >&2
10+
exit 1
11+
fi
12+
13+
MCPP_HOME="${MCPP_HOME:-$HOME/.mcpp}"
14+
export MCPP_HOME
15+
default_index="$MCPP_HOME/registry/data/mcpplibs"
16+
rm -rf "$default_index"
17+
mkdir -p "$default_index"
18+
cp -a "$ROOT/pkgs" "$default_index/"
19+
rm -f "$default_index/.xlings-index-cache.json"
20+
printf 'ok\n' > "$default_index/.mcpp-index-updated"
21+
22+
"$MCPP_BIN" self config --mirror "${MCPP_INDEX_MIRROR:-GLOBAL}" >/dev/null
23+
rm -rf "$ROOT/tests/examples/tinyhttps/target" "$ROOT/tests/examples/tinyhttps/.mcpp"
24+
cd "$ROOT/tests/examples/tinyhttps"
25+
"$MCPP_BIN" test

0 commit comments

Comments
 (0)