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

[Diagnostic] Support constructing Diagnostic Error through ObjectRef #13977

Merged

Conversation

MasterJH5574
Copy link
Contributor

This PR supports creating a diagnostic error from an arbitrary Object.

Given that we are bringing the diagnostic error for general uses in the long term, in which case

  • not every Expr necessarily has a span,
  • we have well-implemented elegant location-aware printer for an object itself,
  • we may need to print some object other than Expr, or does even not have a span field,

we support diagnostic error with arbitrary object to denote the location.

Co-authored-by: Tianqi Chen [email protected]

This PR supports creating a diagnostic error from an arbitrary Object.

Given that we are bringing the diagnostic error for general uses in the
long term, in which case
* not every Expr necessarily has a span,
* we have well-implemented elegant location-aware printer for an object
itself,
* we may need to print some object other than Expr, or does even not
have a span field,
we support diagnostic error with arbitrary object to denote the
location.

Co-authored-by: Tianqi Chen <[email protected]>
@tvm-bot
Copy link
Collaborator

tvm-bot commented Feb 13, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to tag found in teams: diagnostic See #10317 for details

Generated by tvm-bot

@MasterJH5574
Copy link
Contributor Author

@tvm-bot rerun

1 similar comment
@MasterJH5574
Copy link
Contributor Author

@tvm-bot rerun

@Hzfengsy Hzfengsy merged commit b5e0f6b into apache:main Feb 14, 2023
MasterJH5574 added a commit to MasterJH5574/tvm that referenced this pull request Feb 14, 2023
…pache#13977)

This PR supports creating a diagnostic error from an arbitrary Object.

Given that we are bringing the diagnostic error for general uses in the
long term, in which case
* not every Expr necessarily has a span,
* we have well-implemented elegant location-aware printer for an object
itself,
* we may need to print some object other than Expr, or does even not
have a span field,
we support diagnostic error with arbitrary object to denote the
location.

Co-authored-by: Tianqi Chen <[email protected]>
MasterJH5574 added a commit to MasterJH5574/tvm that referenced this pull request Feb 14, 2023
…pache#13977)

This PR supports creating a diagnostic error from an arbitrary Object.

Given that we are bringing the diagnostic error for general uses in the
long term, in which case
* not every Expr necessarily has a span,
* we have well-implemented elegant location-aware printer for an object
itself,
* we may need to print some object other than Expr, or does even not
have a span field,
we support diagnostic error with arbitrary object to denote the
location.

Co-authored-by: Tianqi Chen <[email protected]>
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.

3 participants