Skip to content

Conversation

@lucasew
Copy link
Contributor

@lucasew lucasew commented Nov 19, 2025

Closes #7016 #7019


Note

Introduce an AST-driven template engine with semver/property access and pipe support, and fix aqua backend to avoid double-appending version prefixes.

  • aqua-registry/template:
    • New templating engine: Lexer/AST parser (Expr), Value trait with StringValue and SemVerValue, property access (expr.Property), parentheses, and pipe handling.
    • Function registry: Add semver, title, trimV, trimPrefix, trimSuffix, replace; semver parses versions (handles v prefix) and exposes Major/Minor/Patch.
    • Evaluator: Executes AST with piping and property access; render now lexes/parses/evaluates.
    • Tests: Extensive coverage for semver properties, nesting, Blender/Maven URLs, and lexing/parsing.
  • backend/aqua:
    • Version prefixing: When applying version_prefix, avoid re-prefixing v_prefixed if it already has the prefix.

Written by Cursor Bugbot for commit 3b53d42. This will update automatically on new commits. Configure here.

Signed-off-by: lucasew <[email protected]>
Signed-off-by: lucasew <[email protected]>
Signed-off-by: lucasew <[email protected]>
Signed-off-by: lucasew <[email protected]>
Signed-off-by: lucasew <[email protected]>
Signed-off-by: lucasew <[email protected]>
Signed-off-by: lucasew <[email protected]>
Signed-off-by: lucasew <[email protected]>
Signed-off-by: lucasew <[email protected]>
Signed-off-by: lucasew <[email protected]>
@lucasew lucasew marked this pull request as ready for review November 20, 2025 01:33
@lucasew
Copy link
Contributor Author

lucasew commented Nov 20, 2025

Can you guys tell that this was mostly done by Claude Code? I was basically just guiding, testing and helping with hypothesis and troubleshooting.

@jdx
Copy link
Owner

jdx commented Nov 20, 2025

bugbot run

.unwrap_or(code.len());

// If preceded by RParen, it's a property access
if tokens.last().is_some_and(|t| t.is_r_paren()) {
Copy link

Choose a reason for hiding this comment

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

Bug: Whitespace breaks property access detection in lexer

The lexer checks if the last token is RParen to determine whether a dot starts a property access, but this fails when whitespace appears between the closing parenthesis and the dot. For example, (semver .Version) .Major would incorrectly lex .Major as Key("Major") instead of Dot + Ident("Major") because the last token is Whitespace, not RParen. This causes the parser to miss the property access and return an incorrect result. The check needs to skip whitespace tokens when looking for the preceding RParen.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jdx jdx merged commit 1013e03 into jdx:main Nov 20, 2025
30 checks passed
@lucasew lucasew deleted the fix/semver branch November 20, 2025 12:32
jdx pushed a commit that referenced this pull request Nov 26, 2025
### 📦 Registry

- add blender by @lucasew in
[#7014](#7014)
- add vespa-cli by @buinauskas in
[#7037](#7037)
- fix vespa-cli order by @buinauskas in
[#7038](#7038)
- add scooter by @TyceHerrman in
[#7039](#7039)
- Prefer github backend for allure by @TobiX in
[#7049](#7049)

### 🚀 Features

- **(plugins)** Install a plugin from a zip file over HTTPS by @KaanYT
in [#6992](#6992)
- **(registry)** add tool options support for http backend by @jdx in
[#7061](#7061)

### 🐛 Bug Fixes

- **(core)** trim `core:` prefix in unalias_backend by @kou029w in
[#7040](#7040)
- **(go)** use -mod=readonly for go install by @joonas in
[#7052](#7052)
- **(npm)** handle v-prefixed versions correctly by @jdx in
[#7062](#7062)
- **(tasks)** add missing task fields to JSON output by @roele in
[#7044](#7044)
- semver in aqua by @lucasew in
[#7018](#7018)
- use the musl version if installing in Android (Termux) by @lucasew in
[#7027](#7027)
- empty enable_tools crash by @moshen in
[#7035](#7035)

### 📚 Documentation

- add MISE and USAGE syntax hl queries to neovim cookbook by @okuuva in
[#7047](#7047)
- use local assets for screenshots by @okuuva in
[#7056](#7056)
- remove GitHub issues link from roadmap by @jdx in
[6897286](6897286)

### 📦️ Dependency Updates

- update docker/metadata-action digest to 318604b by @renovate[bot] in
[#7033](#7033)
- update actions/checkout digest to 34e1148 by @renovate[bot] in
[#7032](#7032)
- lock file maintenance by @renovate[bot] in
[#7048](#7048)

### Chore

- upgrade actionlint to 1.7.9 and fix lint issues by @jdx in
[#7065](#7065)

### New Contributors

- @joonas made their first contribution in
[#7052](#7052)
- @KaanYT made their first contribution in
[#6992](#6992)
- @kou029w made their first contribution in
[#7040](#7040)
- @moshen made their first contribution in
[#7035](#7035)
- @buinauskas made their first contribution in
[#7038](#7038)
- @lucasew made their first contribution in
[#7014](#7014)

## 📦 Aqua Registry Updates

#### New Packages (3)

- [`m7medVision/lazycommit`](https://github.com/m7medVision/lazycommit)
-
[`microsoft/component-detection`](https://github.com/microsoft/component-detection)
- [`owenlamont/ryl`](https://github.com/owenlamont/ryl)

#### Updated Packages (1)

- [`sst/opencode`](https://github.com/sst/opencode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants