Skip to content

Commit d0ca0d2

Browse files
committed
Align docs and skills on stdlib paths, LSP keywords, and ion-build.
Updates README, tests/README, and agent skills for CONTRIBUTING, IDE limitations, ION_BUILD, and src/build/ checklists.
1 parent a07720a commit d0ca0d2

8 files changed

Lines changed: 17 additions & 7 deletions

File tree

.cursor/skills/adding-ion-features/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ cargo test lexer::
128128
- Breaking single-file merge path while fixing multi-file (test both)
129129
- Weakening no-escape or Send rules to make a test pass
130130
- Large parser refactors bundled with feature work
131-
- Forgetting to register new keywords in lexer **and** LSP keyword lists (`src/lsp/server.rs`, `ion-vscode/syntaxes/ion.tmLanguage.json`) if applicable; rebuild `ion-lsp` after compiler changes
131+
- Forgetting to register new keywords in lexer **and** LSP keyword lists (`src/lsp/util.rs` `KEYWORDS`, `ion-vscode/syntaxes/ion.tmLanguage.json`) if applicable; rebuild `ion-lsp` after compiler changes
132132

133133
## Examples
134134

.cursor/skills/adding-ion-features/references/stage-checklist.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,15 @@
5050
- [ ] Includes and forward decls for multi-file headers
5151
- [ ] Drop/defer/spawn/channel paths emit correct runtime calls
5252

53+
## Project build (`src/build/`)
54+
55+
- [ ] `manifest.rs` updated for new or changed `ion.toml` fields (ION_SPEC §10.1)
56+
- [ ] `driver.rs` / `c_toolchain.rs` if compile or link steps change
57+
- [ ] `paths.rs` if stdlib or import discovery changes (shared with LSP via `discover_import_config`)
58+
- [ ] Smoke tests: `tests/build_hello/`, `tests/build_bad_main/`
59+
5360
## LSP (`src/lsp/`)
5461

5562
- [ ] Parser errors surface in diagnostics
56-
- [ ] New keywords in completion list if maintained manually
63+
- [ ] New keywords in `src/lsp/util.rs` `KEYWORDS` and TextMate grammar
5764
- [ ] Rebuild: `cargo build --release --bin ion-lsp`

.cursor/skills/finding-ion-bugs/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ cargo clippy -- -D warnings
7070
| Wrong or missing C | `src/cgen/`, `src/ir/mod.rs` | Compare `.c` output; `cgen` rows in `test_expectations.tsv` |
7171
| Link / runtime crash | `runtime/ion_runtime.c`, generated calls | `gcc` link line from README |
7272
| Import / multi-file | `src/compiler/mod.rs` | `--mode multi` |
73+
| `ion-build` / manifest failure | `src/build/` (`manifest.rs`, `driver.rs`, `paths.rs`) | `tests/build_hello/`, `tests/build_bad_main/` |
7374
| Test harness false pass/fail | `tests/test_runner.sh`, TSV row | Empty `must_match` on `cgen` rows fails harness self-check |
7475
| LSP wrong, CLI correct | `src/lsp/` | LSP parses buffer + disk imports; formats errors differently than CLI |
7576

.cursor/skills/ion-lang/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Read these when the task matches:
101101
- References cannot escape functions, structs, enums, channels, or `spawn` - reject at type-check time.
102102
- `extern "C"` calls require `unsafe` blocks.
103103
- Multi-file mode: `--mode multi --output <name> <main.ion>` generates per-module `.c`/`.h`.
104-
- Stdlib: `import "stdlib/io.ion" as io;` (resolved via `ion.toml` / `ION_STDLIB` / project `stdlib/`). Bare `import "io.ion"` also resolves when `io.ion` is on a search path.
104+
- Stdlib: `import "stdlib/io.ion" as io;` resolves via manifest `stdlib_paths`, `ION_STDLIB`, `{project_root}/stdlib`, then install-relative `stdlib/` next to the compiler. Bare `import "io.ion"` also resolves when `io.ion` is on a search path.
105105
- `ion build` (`ion-build` binary): project manifest at `ion.toml`; see ION_SPEC §10.1.
106106
- Integration tests: add `tests/test_*.ion` plus one row in `tests/test_expectations.tsv` (see `ion-integration-tests` skill). Run `cd tests && ./test_runner.sh` to verify.
107107
- Fn literals are capture-free only; references to outer bindings are rejected with `ClosureCapture`.

.cursor/skills/ion-lsp-vscode/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Adjust path for OS (no `.exe` on Linux/macOS).
7373
8. **References**, **document symbols**, **signature help**, **semantic tokens**
7474
9. **`did_change_watched_files`** - re-check open files whose import dependencies changed
7575

76-
Known limitations (ION_SPEC §10.2): built-in methods have signature hover but no go-to-definition target; type names in annotations have no goto (no spans on `Type` nodes).
76+
Known limitations: built-in methods have signature hover but no go-to-definition target (ION_SPEC §10.2); type names in annotations have no goto (§10.3; no spans on `Type` nodes).
7777

7878
### CLI vs LSP error text
7979

.cursor/skills/writing-ion-code/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn main() -> int {
5656
}
5757
```
5858

59-
Import paths like `import "stdlib/io.ion" as io;` resolve via stdlib search paths (`ion.toml`, `ION_STDLIB`, project `stdlib/`). Same-directory and `../` relative paths still work. Use `pub fn` in library modules; call with `alias::name(...)`.
59+
Import paths like `import "stdlib/io.ion" as io;` resolve via stdlib search paths (`ion.toml` `stdlib_paths`, `ION_STDLIB`, project `stdlib/`, then install-relative `stdlib/` next to the compiler). Same-directory and `../` relative paths still work. Use `pub fn` in library modules; call with `alias::name(...)`.
6060

6161
## Core syntax (verified)
6262

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Known limitations: [ION_SPEC.md section 10.3](ION_SPEC.md#103-known-limitations)
2929
| Resource | Contents |
3030
|----------|----------|
3131
| [ION_SPEC.md](ION_SPEC.md) | Language semantics, grammar, stdlib contracts |
32+
| [CONTRIBUTING.md](CONTRIBUTING.md) | Build, test, lint, and PR expectations |
3233
| [tests/README.md](tests/README.md) | Integration test catalog |
3334
| [examples/](examples/) | Runnable example programs |
3435

@@ -65,7 +66,7 @@ Ion has a VS Code / Cursor extension that provides:
6566
- Completion: prefix-filtered keywords, builtins, and file symbols
6667
- Go to definition: variables, function calls, and user-defined methods; imported `mod::func` opens the module file
6768

68-
Limitations: built-in methods (`Vec::push`, etc.) do not go to definition. Full list in [ION_SPEC.md section 10.3](ION_SPEC.md#103-known-limitations).
69+
Limitations: built-in methods (`Vec::push`, etc.) and type names in annotations do not go to definition. Full list in [ION_SPEC.md section 10.3](ION_SPEC.md#103-known-limitations).
6970

7071
**Installation:**
7172

tests/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,12 @@ Special cases (not in the manifest):
299299
## Environment Variables
300300

301301
- `COMPILER`: Path to the ion-compiler binary (default: `../target/release/ion-compiler`)
302+
- `ION_BUILD`: Path to the ion-build binary (default: `../target/release/ion-build`)
302303
- `CC`: C compiler to use (default: `gcc`)
303304
- `RUNTIME_OBJ`: Path to the precompiled runtime object file (default: `.ion_test_runtime.o` in `tests/`). Rebuilt when `runtime/ion_runtime.c` is newer than the object.
304305

305306
Example:
306307
```bash
307-
COMPILER=../target/debug/ion-compiler CC=clang ./test_runner.sh
308+
COMPILER=../target/debug/ion-compiler ION_BUILD=../target/debug/ion-build CC=clang ./test_runner.sh
308309
```
309310

0 commit comments

Comments
 (0)