Skip to content

Commit 3d2397c

Browse files
committed
Expand README IDE docs and align stdlib discovery wording across specs.
Also updates CONTRIBUTING CI notes, project tree entries, bug-hunt bisect builds, and LSP import-config descriptions.
1 parent d0ca0d2 commit 3d2397c

6 files changed

Lines changed: 15 additions & 6 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ git bisect start
8484
git bisect bad HEAD
8585
git bisect good <known-good-commit>
8686
# rebuild + repro each step
87-
cargo build --release --bin ion-compiler && cd tests && ./test_runner.sh test_foo.ion
87+
cargo build --release --bin ion-compiler --bin ion-build && cd tests && ./test_runner.sh test_foo.ion
8888
```
8989

9090
## Change review for bugs

.cursor/skills/finding-ion-bugs/references/bug-hotspots.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CLI errors use `TypeCheckError` Debug form (`UseAfterMove { ... }`). LSP reforma
2121

2222
- `register_imports` (LSP) vs full `parse_module` (CLI) import resolution
2323
- Import cycles and duplicate symbol registration
24-
- Keyword additions: lexer + parser + LSP keyword list + TextMate grammar
24+
- Keyword additions: lexer + parser + `src/lsp/util.rs` `KEYWORDS` + TextMate grammar
2525

2626
## Integration harness
2727

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Adjust path for OS (no `.exe` on Linux/macOS).
6464
`src/lsp/server.rs` implements `tower_lsp::LanguageServer`. In `check_file`:
6565

6666
1. On `did_open` / `did_change` - **lexer → parser** on the in-memory buffer (unsaved edits included; does not re-read the file from disk)
67-
2. **`Compiler::load_imports`** - per-import `parse_module` on disk with `build::discover_import_config` (same stdlib paths as `ion-build` when `ion.toml` or `ION_STDLIB` is set); failed imports publish diagnostics at the `import` span while successful imports still register exports
67+
2. **`Compiler::load_imports`** - per-import `parse_module` on disk with `build::discover_import_config` (same stdlib search order as `ion-build`, including walk-up `stdlib/` and install-relative paths); failed imports publish diagnostics at the `import` span while successful imports still register exports
6868
3. **Type-check** - `tc::TypeChecker::check_program_collecting_with_source` on merged program, symbols seeded from buffer AST (`check_program_collecting` for unit tests)
6969
4. Publish diagnostics from lexer, parser, import resolution, or type-check errors
7070
5. **Hover** - expression types, symbol docs, builtin signatures

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ cargo install --path . --bin ion-compiler --bin ion-build
2020

2121
`ion-lsp` is built with the release command above; point the editor extension at `target/release/ion-lsp` (see README IDE Support).
2222

23+
CI (`.github/workflows/ci.yml`) builds all three binaries on Linux; the Windows job builds `ion-compiler` and `ion-build` only. Build `ion-lsp` locally for IDE work.
24+
2325
## Test
2426

2527
Unit tests:

ION_SPEC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ Manifest discovery walks upward from the current directory for a file named `ion
12191219
3. `{project_root}/stdlib`
12201220
4. Install-relative `stdlib/` next to the compiler executable (walking up)
12211221

1222-
File-relative imports (`./`, `../`) and same-directory modules are resolved first. The CLI (`ion-compiler`, `ion-build`) and LSP use the same rules when `ion.toml` or `ION_STDLIB` is present.
1222+
File-relative imports (`./`, `../`) and same-directory modules are resolved first. The CLI (`ion-compiler`, `ion-build`) and LSP share `build::discover_import_config` and the stdlib search order above (from `ion.toml` when present, otherwise by walking up for `stdlib/` and install-relative paths next to the executable).
12231223

12241224
On Windows with MinGW, linking adds `-lws2_32` automatically (channels, spawn, sockets). Honor `CC` for the C compiler (same as `tests/test_runner.sh`).
12251225

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Brief summary; see [ION_SPEC.md](ION_SPEC.md) for the full language reference.
1717
- **Ownership**: move by default; single owner per value; use-after-move is a compile error
1818
- **Borrowing**: `&T` and `&mut T` are stack-local; references cannot escape the function (no return, no struct fields, no channels, no `spawn`)
1919
- **Types**: primitives, structs, enums (tuple and struct variants), generics, `[T; N]`, `[]T`, `Box<T>`, `Vec<T>`, `String`
20-
- **Control flow**: `if`/`while` (bool conditions), `loop { }`, `for x in expr` over `Vec<T>`, `[T; N]`, or `String` (bytes as `u8`), `match` with guards, `defer`
20+
- **Control flow**: `if`/`while` (bool conditions), `loop { }`, `break`/`continue`, `for x in expr` over `Vec<T>`, `[T; N]`, or `String` (bytes as `u8`), `match` with guards, `defer`
2121
- **Concurrency**: `channel<T>()` returns `(Sender<T>, Receiver<T>)`; `send(&tx, v)` and `recv(&mut rx)`; `spawn { ... }` with structural `Send`
2222
- **FFI**: `extern "C"` blocks, raw pointers `*T`, calls require `unsafe`
2323
- **Stdlib**: `stdlib/io.ion`, `stdlib/fmt.ion`, `stdlib/fs.ion`, and `stdlib/result.ion`
@@ -30,6 +30,7 @@ Known limitations: [ION_SPEC.md section 10.3](ION_SPEC.md#103-known-limitations)
3030
|----------|----------|
3131
| [ION_SPEC.md](ION_SPEC.md) | Language semantics, grammar, stdlib contracts |
3232
| [CONTRIBUTING.md](CONTRIBUTING.md) | Build, test, lint, and PR expectations |
33+
| [CHANGELOG.md](CHANGELOG.md) | Release notes by month |
3334
| [tests/README.md](tests/README.md) | Integration test catalog |
3435
| [examples/](examples/) | Runnable example programs |
3536

@@ -61,10 +62,14 @@ Binaries: `target/release/ion-compiler`, `target/release/ion-build`, `target/rel
6162

6263
Ion has a VS Code / Cursor extension that provides:
6364
- Syntax highlighting
64-
- Real-time diagnostics (syntax and type errors)
65+
- Real-time diagnostics (syntax, import, and type errors; multiple independent type errors per file)
6566
- Hover: variable types at use sites and `let` binding identifiers; symbol signatures and attached `//` doc prose at definitions and qualified imports
6667
- Completion: prefix-filtered keywords, builtins, and file symbols
6768
- Go to definition: variables, function calls, and user-defined methods; imported `mod::func` opens the module file
69+
- Find references, document outline, signature help, semantic tokens
70+
- Workspace refresh when watched `.ion` dependencies change on disk
71+
72+
Full LSP feature list: [ION_SPEC.md section 10.2](ION_SPEC.md#102-language-server-lsp).
6873

6974
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).
7075

@@ -200,6 +205,8 @@ On Linux or macOS, use `./target/release/ion-build` and drop `.exe`. Windows cha
200205

201206
```
202207
.
208+
├── .cursor/skills/ # Cursor agent skills
209+
├── .github/ # CI workflows
203210
├── src/
204211
│ ├── bin/ # ion-build, ion-lsp
205212
│ ├── lexer/ # Tokenizer

0 commit comments

Comments
 (0)