Skip to content

Conversation

@keyboardDrummer
Copy link
Contributor

@keyboardDrummer keyboardDrummer commented Jan 23, 2026

Changes

  • Remove file2dRange (r: Strata.File2dRange) from MetaData, since Strata's ASTs should contain 1d positions
  • Use DiagnosticModel instead of Format in much of the code to represent diagnostics. DiagnosticModel keeps the error location and error message separated, so the location can be converted to 2d later on.

Future work

  • There are many locations where an error is created but location information is not available. These use deprecated methods like DiagnosticModel.fromFormat to create a DiagnosticModel without a location. These locations should be updated so they create diagnostics with locations.
  • Allow DiagnosticModel to contain error codes, so the front-ends can translate the diagnostics as they desire
  • Allow DiagnosticModel to contain multiple locations and messages

Testing

  • Refactoring, uses existing tests

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@keyboardDrummer keyboardDrummer requested a review from a team as a code owner January 23, 2026 16:29
@keyboardDrummer keyboardDrummer mentioned this pull request Jan 26, 2026
atomb
atomb previously approved these changes Jan 28, 2026
Copy link
Contributor

@atomb atomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I second @MikaelMayer's questions, but don't have any of my own to add.

@keyboardDrummer keyboardDrummer added this pull request to the merge queue Jan 29, 2026
Merged via the queue into strata-org:main with commit b7af83b Jan 29, 2026
8 checks passed
@keyboardDrummer keyboardDrummer deleted the 1dLocationsInMetadata branch January 29, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants