diff --git a/RELEASES.md b/RELEASES.md index 7be710d..0de2018 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,5 +1,48 @@ # releases +## v0.14.0 + +Package and dependency handling get a reliability pass. + +### Package imports + +- Resolve package-named single-file modules such as + `flint_modules/levenshtein/levenshtein.fl`, alongside the existing + `main.fl` package entry point and flat-module layout. +- Document the supported package layouts and import lookup behavior. + +### Package manifest entry points + +- Add optional `[package] lib = "src/api.fl"` to declare the public module + for a package. The path is relative to the package root and must stay inside + that root; legacy entry-point layouts remain available when `lib` is absent. + +### Package installation + +- Clone Git dependencies into a staging directory before publishing a + mirror, so interrupted or incomplete clones do not become the active + cache. +- Serialize operations on a shared Git mirror and avoid following + symlinks during cache cleanup. +- Recover from damaged or incomplete mirrors on a subsequent install. +- Keep dependency arrays valid when expansion fails, clean up partial + dependency state, reject overlong paths, and bound cyclic dependency + resolution with a clear error. + +### Release and compatibility notes + +- Update the Rust `flintlang` and `flintlang-sys` crate metadata and + examples to version `0.14.0`. +- Report language, runtime, package format, bytecode, and lockfile + versions as `0.14.0`. The native ABI remains version `1`; it is + versioned independently. +- Identify HTTP requests with the `flint/0.14.0` User-Agent by default. +- Keep the standalone C runtime and the Rust-embedded C source in sync. + +Release gate: this changelog is a draft until PRs #10, #11, #13, and #14 are +merged and the final release checks pass. Do not publish a `v0.14.0` +tag or artifacts before then. + ## v0.13.2 native modules load through `import` -- no subcommand, no loader diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 9fed3ae..322437f 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -4,11 +4,11 @@ version = 4 [[package]] name = "flintlang" -version = "0.13.2" +version = "0.14.0" dependencies = [ "flintlang-sys", ] [[package]] name = "flintlang-sys" -version = "0.13.2" +version = "0.14.0" diff --git a/rust/examples/rust-native/Cargo.lock b/rust/examples/rust-native/Cargo.lock index 54e7f95..f88eda4 100644 --- a/rust/examples/rust-native/Cargo.lock +++ b/rust/examples/rust-native/Cargo.lock @@ -4,7 +4,7 @@ version = 4 [[package]] name = "flintlang-sys" -version = "0.13.2" +version = "0.14.0" [[package]] name = "rust-native" diff --git a/rust/examples/tui-native/Cargo.lock b/rust/examples/tui-native/Cargo.lock index 0e11b1f..9b4bb66 100644 --- a/rust/examples/tui-native/Cargo.lock +++ b/rust/examples/tui-native/Cargo.lock @@ -382,7 +382,7 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flintlang-sys" -version = "0.13.2" +version = "0.14.0" [[package]] name = "fnv" diff --git a/rust/flintlang-sys/Cargo.toml b/rust/flintlang-sys/Cargo.toml index 5702f8f..f9b01d0 100644 --- a/rust/flintlang-sys/Cargo.toml +++ b/rust/flintlang-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flintlang-sys" -version = "0.13.2" +version = "0.14.0" edition = "2021" description = "Safe Rust bindings over the Flint native C ABI" license = "MIT" diff --git a/rust/flintlang-sys/README.md b/rust/flintlang-sys/README.md index 90196fc..bb4bf20 100644 --- a/rust/flintlang-sys/README.md +++ b/rust/flintlang-sys/README.md @@ -33,7 +33,7 @@ later; the host roots retained handles against the collector. ## Versions -`flintlang-sys 0.13.2` binds ABI version 1; `abi_version()` asks the +`flintlang-sys 0.14.0` binds ABI version 1; `abi_version()` asks the host at run time, which is the check that decides whether a module loads. The reviewed header copy lives in `c-api/`. diff --git a/rust/flintlang/Cargo.toml b/rust/flintlang/Cargo.toml index a7ea071..1e9fcc3 100644 --- a/rust/flintlang/Cargo.toml +++ b/rust/flintlang/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flintlang" -version = "0.13.2" +version = "0.14.0" edition = "2021" description = "Safe Rust embedding of the Flint scripting language runtime" license = "MIT" @@ -14,4 +14,4 @@ name = "flintlang" path = "src/lib.rs" [dependencies] -flintlang-sys = { version = "0.13.2", path = "../flintlang-sys" } +flintlang-sys = { version = "0.14.0", path = "../flintlang-sys" } diff --git a/rust/flintlang/README.md b/rust/flintlang/README.md index c0eaef4..067d6c1 100644 --- a/rust/flintlang/README.md +++ b/rust/flintlang/README.md @@ -4,7 +4,7 @@ Safe, idiomatic embedding of the [Flint scripting language](https://github.com/p ```toml [dependencies] -flintlang = "0.13.2" +flintlang = "0.14.0" ``` ```rust @@ -44,8 +44,8 @@ builds target mingw-w64, matching the rest of the project. ## Versions -This crate versions in lockstep with the language: `flintlang 0.13.2` -embeds Flint 0.13.2. The `flintlang-sys` version tracks the wrapper, and +This crate versions in lockstep with the language: `flintlang 0.14.0` +embeds Flint 0.14.0. The `flintlang-sys` version tracks the wrapper, and the ABI version (`FL_ABI_VERSION`, currently 1) tracks the C header independently — a new function does not change it, a changed layout does. diff --git a/rust/flintlang/c-src/src/pkg.c b/rust/flintlang/c-src/src/pkg.c index aca7b39..fb01878 100644 --- a/rust/flintlang/c-src/src/pkg.c +++ b/rust/flintlang/c-src/src/pkg.c @@ -1312,33 +1312,63 @@ static void pkg_usage(FILE *stream) bool c = isatty(fileno(stream)); if (c) { - fprintf(stream, "usage: \x1b[1;36mflint pkg\x1b[0m \x1b[32m\x1b[0m \x1b[33m[options]\x1b[0m\n\n"); - fprintf(stream, "manage dependencies declared in flint.toml.\n\n"); + fprintf(stream, + "usage: \x1b[1;36mflint pkg\x1b[0m " + "\x1b[32m\x1b[0m " + "\x1b[33m[options]\x1b[0m\n\n"); + fprintf(stream, + "manage dependencies declared in flint.toml.\n\n"); fprintf(stream, "\x1b[1mcommands:\x1b[0m\n"); - fprintf(stream, " \x1b[32minstall\x1b[0m resolve manifest dependencies into flint_modules/\n"); - fprintf(stream, " \x1b[32madd\x1b[0m \x1b[33m\x1b[0m add dependency to flint.toml and install\n"); - fprintf(stream, " \x1b[32mupdate\x1b[0m \x1b[33m[name]\x1b[0m re-resolve git pins and reinstall\n"); - fprintf(stream, " \x1b[32mlist\x1b[0m list installed packages from flint.lock\n\n"); - - fprintf(stream, "\x1b[1mmanifest format (flint.toml):\x1b[0m\n"); + fprintf(stream, + " \x1b[32minstall\x1b[0m resolve manifest " + "dependencies into flint_modules/\n"); + fprintf(stream, + " \x1b[32madd\x1b[0m \x1b[33m\x1b[0m " + "add dependency to flint.toml and install\n"); + fprintf(stream, + " \x1b[32mupdate\x1b[0m \x1b[33m[name]\x1b[0m " + "re-resolve git pins and reinstall\n"); + fprintf(stream, + " \x1b[32mlist\x1b[0m list installed " + "packages from flint.lock\n\n"); + + fprintf(stream, + "\x1b[1mmanifest format (flint.toml):\x1b[0m\n"); fprintf(stream, " name = \"../path\"\n"); - fprintf(stream, " name = { path = \"../path\", version = \"^1.0.0\" }\n"); - fprintf(stream, " name = { git = \"https://...\", rev = \"v1.0.0\" }\n"); + fprintf(stream, + " name = { path = \"../path\", version = \"^1.0.0\" " + "}\n"); + fprintf(stream, + " name = { git = \"https://...\", rev = \"v1.0.0\" " + "}\n"); } else { fprintf(stream, "usage: flint pkg [options]\n\n"); - fprintf(stream, "manage dependencies declared in flint.toml.\n\n"); + fprintf(stream, + "manage dependencies declared in flint.toml.\n\n"); fprintf(stream, "commands:\n"); - fprintf(stream, " install resolve manifest dependencies into flint_modules/\n"); - fprintf(stream, " add add dependency to flint.toml and install\n"); - fprintf(stream, " update [name] re-resolve git pins and reinstall\n"); - fprintf(stream, " list list installed packages from flint.lock\n\n"); + fprintf(stream, + " install resolve manifest dependencies " + "into flint_modules/\n"); + fprintf(stream, + " add add dependency to flint.toml and " + "install\n"); + fprintf(stream, + " update [name] re-resolve git pins and " + "reinstall\n"); + fprintf(stream, + " list list installed packages from " + "flint.lock\n\n"); fprintf(stream, "manifest format (flint.toml):\n"); fprintf(stream, " name = \"../path\"\n"); - fprintf(stream, " name = { path = \"../path\", version = \"^1.0.0\" }\n"); - fprintf(stream, " name = { git = \"https://...\", rev = \"v1.0.0\" }\n"); + fprintf(stream, + " name = { path = \"../path\", version = \"^1.0.0\" " + "}\n"); + fprintf(stream, + " name = { git = \"https://...\", rev = \"v1.0.0\" " + "}\n"); } } diff --git a/rust/flintlang/c-src/src/runtime/http.c b/rust/flintlang/c-src/src/runtime/http.c index 1f70af7..96215f8 100644 --- a/rust/flintlang/c-src/src/runtime/http.c +++ b/rust/flintlang/c-src/src/runtime/http.c @@ -519,7 +519,7 @@ static char *socket_fetch(const Url *u, buf_append(&req, hbuf, strlen(hbuf)); } if (!has_ua) { - buf_append(&req, "User-Agent: flint/0.7.0\r\n", 25); + buf_append(&req, "User-Agent: flint/0.14.0\r\n", strlen("User-Agent: flint/0.14.0\r\n")); } if (!has_accept) { buf_append(&req, "Accept: */*\r\n", 13); diff --git a/src/main.c b/src/main.c index 27f869c..f237e63 100644 --- a/src/main.c +++ b/src/main.c @@ -1952,12 +1952,12 @@ int main(int argc, char *argv[]) 0 || strcmp(argv[arg + 1], "-v") == 0)) { - printf(" language: 0.13.1\n"); - printf(" runtime: 0.13.1\n"); - printf(" package format: 0.13.1\n"); - printf(" bytecode: 0.13.1\n"); + printf(" language: 0.14.0\n"); + printf(" runtime: 0.14.0\n"); + printf(" package format: 0.14.0\n"); + printf(" bytecode: 0.14.0\n"); printf(" native abi: 1\n"); - printf(" lockfile: 0.13.1\n"); + printf(" lockfile: 0.14.0\n"); } } else { printf("flint %s\n", FLINT_VERSION); @@ -1966,12 +1966,12 @@ int main(int argc, char *argv[]) 0 || strcmp(argv[arg + 1], "-v") == 0)) { - printf(" language: 0.13.1\n"); - printf(" runtime: 0.13.1\n"); - printf(" package format: 0.13.1\n"); - printf(" bytecode: 0.13.1\n"); + printf(" language: 0.14.0\n"); + printf(" runtime: 0.14.0\n"); + printf(" package format: 0.14.0\n"); + printf(" bytecode: 0.14.0\n"); printf(" native abi: 1\n"); - printf(" lockfile: 0.13.1\n"); + printf(" lockfile: 0.14.0\n"); } } return 0; diff --git a/src/runtime/http.c b/src/runtime/http.c index 1f70af7..96215f8 100644 --- a/src/runtime/http.c +++ b/src/runtime/http.c @@ -519,7 +519,7 @@ static char *socket_fetch(const Url *u, buf_append(&req, hbuf, strlen(hbuf)); } if (!has_ua) { - buf_append(&req, "User-Agent: flint/0.7.0\r\n", 25); + buf_append(&req, "User-Agent: flint/0.14.0\r\n", strlen("User-Agent: flint/0.14.0\r\n")); } if (!has_accept) { buf_append(&req, "Accept: */*\r\n", 13);