Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/examples/rust-native/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/examples/tui-native/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/flintlang-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion rust/flintlang-sys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/`.

Expand Down
4 changes: 2 additions & 2 deletions rust/flintlang/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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" }
6 changes: 3 additions & 3 deletions rust/flintlang/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
64 changes: 47 additions & 17 deletions rust/flintlang/c-src/src/pkg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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<command>\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<command>\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<path|url>\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<path|url>\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 <command> [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 <path|url> 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 <path|url> 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");
}
}

Expand Down
2 changes: 1 addition & 1 deletion rust/flintlang/c-src/src/runtime/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
20 changes: 10 additions & 10 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · HTTPS requests use curl identity

When an HTTPS request does not provide its own User-Agent, curl_fetch forwards only caller-provided headers to curl and never adds the new default, so HTTPS requests use curl’s default User-Agent instead of identifying Flint to the server.

Add the Flint default User-Agent to curl_fetch when the caller has not supplied one, and keep the embedded copy in sync.

Also at rust/flintlang/c-src/src/runtime/http.c:522.

Prompt for AI agents
In `src/runtime/http.c` at line 522:

**HTTPS requests use curl identity**

When an HTTPS request does not provide its own User-Agent, `curl_fetch` forwards only caller-provided headers to curl and never adds the new default, so HTTPS requests use curl’s default User-Agent instead of identifying Flint to the server.

Add the Flint default User-Agent to `curl_fetch` when the caller has not supplied one, and keep the embedded copy in sync.

Also at `rust/flintlang/c-src/src/runtime/http.c:522`.

}
if (!has_accept) {
buf_append(&req, "Accept: */*\r\n", 13);
Expand Down
Loading