-
Notifications
You must be signed in to change notification settings - Fork 701
Open
Labels
featureA new feature.A new feature.🔍 leo testAnything related to the `leo test` CLI command.Anything related to the `leo test` CLI command.🧱 Core CompilerAnything related to the core compiler including parsing, analysis, transforms, codegen, etc.Anything related to the core compiler including parsing, analysis, transforms, codegen, etc.
Description
🚀 Feature
It would be great if we had some source map available in the compiler output to give nicer feedback from leo test about failing tests.
This doesn't need to be some serialized form or file output - even just an in-memory mapping would be useful as leo tooling invokes the compiler as a library directly in memory anyway.
Motivation
Implementation
Currently, we track spans nicely throughout type-checking, however we appear to lose this info during code generation. Implementation might look something like:
- Extend AleoStmt variants to include Span (or add a
SpannedAleoStmt { span, stmt }struct). - Modify code generation (compiler/passes/src/code_generation/) to preserve spans.
- Build an instruction/source map during compilation.
- Include the source map in
AleoProgramoutput.
Metadata
Metadata
Assignees
Labels
featureA new feature.A new feature.🔍 leo testAnything related to the `leo test` CLI command.Anything related to the `leo test` CLI command.🧱 Core CompilerAnything related to the core compiler including parsing, analysis, transforms, codegen, etc.Anything related to the core compiler including parsing, analysis, transforms, codegen, etc.