Skip to content

Commit f49228c

Browse files
committed
Implement stackDepth and getInfo debug API
1 parent ee07640 commit f49228c

File tree

3 files changed

+352
-87
lines changed

3 files changed

+352
-87
lines changed

CLAUDE.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ Write idiomatic Zig code following the established patterns in the codebase:
152152
- Follow Zig naming conventions (camelCase for functions, PascalCase for types)
153153
- Prefer explicit memory management over implicit allocation
154154
- Do not write implementation comments that explain why code was written a certain way or reference previous implementations
155-
- Don't solve problems by removing code - fix issues through proper implementation rather than deletion
155+
- NEVER solve problems by removing code - fix issues through proper implementation rather than deletion
156+
- When encountering errors or unexpected behavior, investigate the underlying C++ implementation in the Luau submodule to understand root causes
157+
- Always examine relevant files in `luau/VM/src/`, `luau/Compiler/src/`, and `luau/tests/` to understand proper behavior and constraints
158+
- Fix issues by understanding and working within the constraints of the underlying Luau implementation
156159
- Always run `zig fmt .` after making code changes to ensure consistent formatting
157160

158161
### Testing
@@ -168,8 +171,10 @@ Important testing guidelines:
168171
- Avoid using functions from `stack.zig` and `State.zig` in `tests.zig`
169172
- Never use `stack.*` functions when testing public APIs - use only the high-level API methods
170173
- Focus on testing the high-level API provided by `lua.zig`
171-
- Don't create excessive and too verbose unit tests
172-
- Each test must be minimal and aim to test a specific function
174+
- NEVER write verbose, excessive tests with multiple redundant assertions
175+
- Each test must be minimal - call the function once with meaningful inputs and assert the essential results
176+
- Avoid testing multiple variations of the same thing in one test
177+
- Don't write obvious assertions or duplicate validations already covered elsewhere
173178
- Keep tests short, focused, and easy to understand
174179

175180
CRITICAL: Tests MUST prove functionality works:

0 commit comments

Comments
 (0)