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

Add a skeleton for directives that reports nice errors #6352

Draft
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

ErichDonGubler
Copy link
Member

@ErichDonGubler ErichDonGubler commented Oct 1, 2024

Connections

Dependency of #6148.

May conflict with changes in #5701. If this merges first, I'll resolve conflicts there.

Lays groundwork for:

Description

There's not a parse path for any directives, let alone what I'm working on in #6148. It turns out that adding the starting point with some diagnostics is enough code that a PR checkpoint sounds wise.

Testing

Tests will be added before this PR comes out of draft, to ensure that the error cases added here are covered.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@ErichDonGubler ErichDonGubler force-pushed the erichdongubler/push-nzmmrzzmyvqu branch from 0994648 to 2d56bab Compare October 1, 2024 21:00
@ErichDonGubler ErichDonGubler self-assigned this Oct 2, 2024
@ErichDonGubler ErichDonGubler added the kind: refactor Making existing function faster or nicer label Oct 2, 2024
@ErichDonGubler ErichDonGubler force-pushed the erichdongubler/push-nzmmrzzmyvqu branch from 2d56bab to b0c008b Compare October 3, 2024 20:25
Comment on lines +2492 to +2496
return Err(Error::DirectiveNotYetImplemented {
kind: name,
span: ident.span,
tracking_issue_num: unimplemented.tracking_issue_num(),
})
Copy link
Member Author

Choose a reason for hiding this comment

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

nitpick: I think I should consolidate the kind (&str) and tracking_issue_num fields into an kind of the unimplemented enum. The &str and u16 can be derived from the enum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: refactor Making existing function faster or nicer
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant