Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move build errors out of schema #2945

Merged
merged 1 commit into from
Oct 2, 2024
Merged

Conversation

matt2e
Copy link
Collaborator

@matt2e matt2e commented Oct 2, 2024

This is in preparation for a full language.proto spec for language plugins.
Changes:

  • Adds language.proto with only error specs
  • Adds builderrors package to separate build errors out of schema
  • Use builderrors.Error values directly, rather than pointers
  • builderrors.Position has StartColumn and EndColumn, rather than builderrors.Error having schema.Pos and EndColumn.
    • Convert to an error position by using schema.Pos.ToErrorPos() or schema.Pos.ToErrorPosWithEnd(column)
  • Error.Pos.String() skips the end column if its the same as the start column. 25:7-7 -> 25:7

@matt2e matt2e requested review from a team and alecthomas as code owners October 2, 2024 01:24
@matt2e matt2e requested review from a team and deniseli and removed request for a team October 2, 2024 01:24
@ftl-robot ftl-robot mentioned this pull request Oct 2, 2024
@matt2e matt2e marked this pull request as draft October 2, 2024 01:25
@matt2e matt2e mentioned this pull request Oct 2, 2024
38 tasks
@matt2e matt2e force-pushed the matt2e/builds-errs branch 2 times, most recently from 7b94f98 to 1f317d1 Compare October 2, 2024 01:47
@matt2e matt2e marked this pull request as ready for review October 2, 2024 01:47
@matt2e matt2e force-pushed the matt2e/builds-errs branch from 7afa6cb to 1374375 Compare October 2, 2024 02:41
@matt2e matt2e changed the title refactor: move schema errors to language.proto refactor: move schema errors out of schema Oct 2, 2024
@stuartwdouglas stuartwdouglas added the skip-proto-breaking PRs with this label will skip the breaking proto check label Oct 2, 2024
@stuartwdouglas
Copy link
Collaborator

I don't think the skip-proto-breaking label takes effect until there is a change to the PR.

@matt2e matt2e force-pushed the matt2e/builds-errs branch from 1374375 to 225d7e2 Compare October 2, 2024 02:57
@matt2e matt2e enabled auto-merge (squash) October 2, 2024 02:57
@matt2e matt2e changed the title refactor: move schema errors out of schema refactor: move build errors out of schema Oct 2, 2024
@matt2e matt2e merged commit cca245e into main Oct 2, 2024
93 checks passed
@matt2e matt2e deleted the matt2e/builds-errs branch October 2, 2024 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-proto-breaking PRs with this label will skip the breaking proto check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants