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
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
---

## [Unreleased]
## v1.20.1 — Improved CLI Error UX & Build Feedback

### ✨ CLI — Error reporting & diagnostics
- Introduce **Python-like compiler error rendering** with code frames
`(file:line:column + surrounding context)`
- Highlight **only the faulty line** with a red caret (`^`) for instant readability
- Safely truncate very long lines with **UTF-8–aware ellipsis**
- Add **precise, Vix-style hints** for common mistakes
(e.g. `Response::json()` misuse)
- Hide verbose alternative diagnostics unless log level is `debug` or `trace`
- Improve `run` / script error reporting for clearer, actionable diagnostics

### 🔨 CLI — Build output & Ninja integration
- Restore **live Ninja progress output** (`[x/y %]`) during builds
- Filter noisy compiler command output in live mode
- Keep **full raw build logs** in `build.log` for post-mortem diagnostics
- Let `ErrorHandler` display **structured, human-readable errors** on failure
- Introduce **progress-only build output mode**
- Fix unused variables and header warnings in build pipeline

### 🧩 Internal
- Minor internal cleanups to support improved error UX
- No breaking changes


## v1.20.0 — Modules, Registry & Dependency Workflow (Latest)

### ✨ Nouveautés majeures
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_routes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int main()

// Example with path param
app.get("/users/{id}", [](Request &, Response &res)
{ res.status(4040).json({"error", "User not found"}); });
{ res.status(404).json({"error", "User not found"}); });

app.get("/hello", [](const Request &, Response &res)
{
Expand Down
27 changes: 13 additions & 14 deletions examples/http/router_params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,25 @@ int main()
// Example:
// GET /posts/2025/hello-world
//
app.get("/posts", [](Request &req, Response &res)
app.get("/posts/{year}/{slug}", [](Request &req, Response &res)
{
const auto year = req.query_value("year");
const auto slug = req.query_value("slug");

res.json(json::kv({
{"year", year},
{"slug", slug},
{"title", "Post: " + slug},
{"message", "This is an example route with multiple params."},
{"powered_by", "Vix.cpp"},
{"params", req.params()},
{"query", req.query()}
})); });
const auto year = req.param("year");
const auto slug = req.param("slug");

res.json(json::kv({
{"year", year},
{"slug", slug},
{"title", "Post: " + slug},
{"message", "This is an example route with multiple params."},
{"powered_by", "Vix.cpp"},
{"params", req.params()},
{"query", req.query()}
})); });

// Optional: a root route for discoverability
app.get("/", [](Request &, Response &res)
{ res.json({"routes", "/hello/{name}, /posts/{year}/{slug}",
"hint", "Try GET /hello/Alice or /posts/2025/hello-world"}); });

app.run(8080);
return 0;
}
2 changes: 1 addition & 1 deletion modules/core
2 changes: 1 addition & 1 deletion modules/utils
Loading