Skip to content

Commit a07720a

Browse files
committed
Fix documentation drift across README, CONTRIBUTING, and agent skills.
Corrects LSP completion docs, aligns build instructions with CI, removes hardcoded paths, and documents ion-build workflow in adding-ion-features.
1 parent ab56d8b commit a07720a

5 files changed

Lines changed: 34 additions & 10 deletions

File tree

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Copy and track progress:
3030
- [ ] 5. Type checker - typing, ownership, Send in `src/tc/` (`mod.rs` plus `ownership.rs`, `builtins.rs`, `types.rs` as needed)
3131
- [ ] 6. IR - lowering in src/ir/mod.rs
3232
- [ ] 7. Codegen - C output in `src/cgen/` (`mod.rs`, `types.rs`, `builtins.rs`, `drop.rs`) (+ runtime/ if new runtime support)
33+
- [ ] 7b. Project build - if touching `src/build/` or ION_SPEC section 10.1: `manifest.rs`, `driver.rs`, `c_toolchain.rs`, `paths.rs`; verify `tests/build_hello/` and `tests/build_bad_main/`
3334
- [ ] 8. Tests - integration test in tests/ (see ion-integration-tests skill)
3435
- [ ] 9. LSP - update src/lsp/ if diagnostics/hover/completion affected
3536
- [ ] 10. cargo test && cargo build --release && tests/test_runner.sh (harness precompiles `runtime/ion_runtime.c` once per run)
@@ -91,6 +92,19 @@ Add new `TypeCheckError` variants only when existing ones can't express the fail
9192
- `cgen` - generated C must compile with `gcc` + `runtime/ion_runtime.c` (or precompiled `.o` via `test_runner.sh`) + `-lpthread`
9293
- Multi-file: test with `--mode multi` if imports or visibility involved
9394

95+
### Project build (`src/build/`)
96+
97+
Touch when changing `ion.toml` parsing, `ion-build` driver behavior, C toolchain flags, or import/stdlib discovery shared with LSP:
98+
99+
| File | Role |
100+
|------|------|
101+
| `manifest.rs` | Parse `ion.toml`, `Project::discover` |
102+
| `driver.rs` | `build_project`: transpile, compile C, link runtime |
103+
| `c_toolchain.rs` | Invoke `CC`, compile and link flags |
104+
| `paths.rs` | Project root, stdlib paths, `discover_import_config` |
105+
106+
Verify with `tests/build_hello/` and `tests/build_bad_main/` smoke tests. See `ion-lang/references/compiler-pipeline.md`.
107+
94108
### Runtime (`runtime/`)
95109

96110
New builtins (channels, Vec, String, spawn) often need C runtime helpers. Keep headers in `ion_runtime.h` consistent with cgen calls.

.cursor/skills/ion-integration-tests/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ cargo build --release --bin ion-compiler --bin ion-build
4040
cd tests && ./test_runner.sh
4141
```
4242

43-
From PowerShell:
43+
From PowerShell (repo root; requires Git Bash):
4444

4545
```powershell
4646
cargo build --release --bin ion-compiler --bin ion-build
47-
& 'C:\Program Files\Git\bin\bash.exe' -lc 'cd /c/Users/Cody/Projects/GitHub/Personal/Active/ion-lang/tests && ./test_runner.sh'
47+
& "${env:ProgramFiles}\Git\bin\bash.exe" -lc 'cd tests && ./test_runner.sh'
4848
```
4949

5050
The harness primarily calls `ion-compiler` for `run`/`error`/`cgen` rows. It also runs `ion-build` smoke tests (`tests/build_hello/`, `tests/build_bad_main/`) via the `ION_BUILD` env var (defaults to `../target/release/ion-build`).

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Ion identity depends on these - do not weaken them without explicit user directi
4747
cargo test
4848
cargo build --release --bin ion-compiler --bin ion-lsp --bin ion-build
4949
cargo clippy -- -D warnings
50-
& 'C:\Program Files\Git\bin\bash.exe' -lc 'cd /c/Users/Cody/Projects/GitHub/Personal/Active/ion-lang/tests && ./test_runner.sh'
50+
& "${env:ProgramFiles}\Git\bin\bash.exe" -lc 'cd tests && ./test_runner.sh'
5151
```
5252

5353
**Application builds:** `ion-build` reads `ion.toml` (walks up from cwd), transpiles, compiles C, links runtime. Default output under `target/`:
@@ -58,7 +58,7 @@ cargo clippy -- -D warnings
5858

5959
**Codegen inspection / integration harness:** `ion-compiler` still transpiles only (or `--mode multi` with in-tree link). Integration tests call `ion-compiler` directly; `test_runner.sh` also runs `ion-build` smoke tests in `tests/build_hello/`.
6060

61-
**Stdlib imports:** `import "stdlib/io.ion" as io;` resolves via `ion.toml` `stdlib_paths`, `ION_STDLIB`, and `{project_root}/stdlib`. CLI and LSP share `build::discover_import_config`.
61+
**Stdlib imports:** `import "stdlib/io.ion" as io;` resolves via manifest `stdlib_paths`, `ION_STDLIB`, `{project_root}/stdlib`, then install-relative `stdlib/` next to the compiler. CLI and LSP share `build::discover_import_config`.
6262

6363
**Windows:** Stop `ion-lsp` / `ion-compiler` before rebuilding if you get "Access is denied". After compiler or import-resolution changes, rebuild LSP and reload the editor window:
6464

@@ -70,9 +70,11 @@ cargo build --release --bin ion-lsp
7070

7171
```powershell
7272
.\target\release\ion-compiler.exe examples\hello_world.ion
73-
gcc examples\hello_world.c runtime\ion_runtime.c -o hello_world.exe -I. -Iruntime -lpthread -lws2_32
73+
gcc examples\hello_world.c runtime\ion_runtime.c -o hello_world.exe -I. -Iruntime -lpthread
7474
```
7575

76+
Add `-lws2_32` on Windows when linking programs that use channels, `spawn`, or sockets.
77+
7678
## Specialized skills
7779

7880
Read these when the task matches:

CONTRIBUTING.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@
99
## Build
1010

1111
```bash
12-
cargo build --release --bin ion-compiler
12+
cargo build --release --bin ion-compiler --bin ion-build --bin ion-lsp
1313
```
1414

15-
Install the compiler into your Cargo bin directory:
15+
Install CLI tools into your Cargo bin directory:
1616

1717
```bash
18-
cargo install --path . --bin ion-compiler
18+
cargo install --path . --bin ion-compiler --bin ion-build
1919
```
2020

21+
`ion-lsp` is built with the release command above; point the editor extension at `target/release/ion-lsp` (see README IDE Support).
22+
2123
## Test
2224

2325
Unit tests:

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ Ion has a VS Code / Cursor extension that provides:
6262
- Syntax highlighting
6363
- Real-time diagnostics (syntax and type errors)
6464
- Hover: variable types at use sites and `let` binding identifiers; symbol signatures and attached `//` doc prose at definitions and qualified imports
65-
- Completion: keywords, builtins, and file symbols
65+
- Completion: prefix-filtered keywords, builtins, and file symbols
6666
- Go to definition: variables, function calls, and user-defined methods; imported `mod::func` opens the module file
6767

68-
Limitations: built-in methods (`Vec::push`, etc.) do not go to definition; completion has no prefix filtering. Full list in [ION_SPEC.md section 10.3](ION_SPEC.md#103-known-limitations).
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).
6969

7070
**Installation:**
7171

@@ -241,6 +241,12 @@ The runner loads `tests/test_expectations.tsv` (exit codes, error patterns, code
241241
cargo clippy -- -D warnings
242242
```
243243

244+
### Format check
245+
246+
```bash
247+
cargo fmt --check
248+
```
249+
244250
## License
245251

246252
MIT

0 commit comments

Comments
 (0)