[Rust][Diagnostics] Add initial boilerplate for Rust diagnostic interface.#6656
Merged
junrushao merged 32 commits intoapache:mainfrom Nov 2, 2020
Merged
[Rust][Diagnostics] Add initial boilerplate for Rust diagnostic interface.#6656junrushao merged 32 commits intoapache:mainfrom
junrushao merged 32 commits intoapache:mainfrom
Conversation
Member
Author
|
cc @gussmith23 and @mwillsey |
jroesch
commented
Oct 16, 2020
tkonolige
reviewed
Oct 16, 2020
tkonolige
reviewed
Oct 16, 2020
rkimball
suggested changes
Oct 16, 2020
rkimball
suggested changes
Oct 22, 2020
Co-authored-by: Robert Kimball <bobkimball@gmail.com>
Co-authored-by: Robert Kimball <bobkimball@gmail.com>
Member
Author
|
I think this one is now ready to roll. |
rkimball
approved these changes
Oct 26, 2020
tkonolige
reviewed
Oct 26, 2020
tkonolige
reviewed
Oct 26, 2020
Co-authored-by: Tristan Konolige <tristan.konolige@gmail.com>
adelbertc
reviewed
Oct 31, 2020
|
|
||
| fn next(&mut self) -> Option<Self::Item> { | ||
| if self.pos < self.size { | ||
| let item = self.array.get(self.pos).expect("should not fail"); |
Contributor
There was a problem hiding this comment.
Even though exceptional, better error message here than "should not fail"
| } | ||
|
|
||
| /// A mapping for all files in a source map to byte ranges. | ||
| struct SpanToByteRange { |
Contributor
There was a problem hiding this comment.
Is this a place where we could integrating like tracing-style spans? (looking for PR ideas)
|
|
||
| #[derive(Error, Debug)] | ||
| pub enum Error { | ||
| #[error("{0}")] |
Contributor
There was a problem hiding this comment.
Do we also want to use #[source] for the errors?
Member
Author
There was a problem hiding this comment.
This kind of stuff would be good follow up work imo.
adelbertc
approved these changes
Nov 1, 2020
junrushao
approved these changes
Nov 2, 2020
trevor-m
pushed a commit
to trevor-m/tvm
that referenced
this pull request
Dec 2, 2020
…face. (apache#6656) * Add initial boilerplate for Rust diagnostic interface. * Codespan example almost working * WIP * Hacking on Rust inside of TVM * Borrow code from Egg * Update CMake and delete old API * Fix Linux build * Clean up exporting to show off new diagnostics * Improve Rust bindings * Fix calling * Fix * Rust Diagnostics work * Remove type checker * Format and cleanup * Fix the extension code * More cleanup * Fix some CR * Add docs and address feedback * WIP more improvments * Update cmake/modules/RustExt.cmake Co-authored-by: Robert Kimball <bobkimball@gmail.com> * Update rust/tvm/src/ir/diagnostics/mod.rs Co-authored-by: Robert Kimball <bobkimball@gmail.com> * Clean up PR * Format all * Remove dead comment * Code review comments and apache headers * Purge test file * Update cmake/modules/LLVM.cmake Co-authored-by: Tristan Konolige <tristan.konolige@gmail.com> * Format Rust * Add TK's suggestion * More CR and cleanup * Fix tyck line * Format Co-authored-by: Robert Kimball <bobkimball@gmail.com> Co-authored-by: Tristan Konolige <tristan.konolige@gmail.com>
trevor-m
pushed a commit
to trevor-m/tvm
that referenced
this pull request
Dec 4, 2020
…face. (apache#6656) * Add initial boilerplate for Rust diagnostic interface. * Codespan example almost working * WIP * Hacking on Rust inside of TVM * Borrow code from Egg * Update CMake and delete old API * Fix Linux build * Clean up exporting to show off new diagnostics * Improve Rust bindings * Fix calling * Fix * Rust Diagnostics work * Remove type checker * Format and cleanup * Fix the extension code * More cleanup * Fix some CR * Add docs and address feedback * WIP more improvments * Update cmake/modules/RustExt.cmake Co-authored-by: Robert Kimball <bobkimball@gmail.com> * Update rust/tvm/src/ir/diagnostics/mod.rs Co-authored-by: Robert Kimball <bobkimball@gmail.com> * Clean up PR * Format all * Remove dead comment * Code review comments and apache headers * Purge test file * Update cmake/modules/LLVM.cmake Co-authored-by: Tristan Konolige <tristan.konolige@gmail.com> * Format Rust * Add TK's suggestion * More CR and cleanup * Fix tyck line * Format Co-authored-by: Robert Kimball <bobkimball@gmail.com> Co-authored-by: Tristan Konolige <tristan.konolige@gmail.com>
trevor-m
pushed a commit
to neo-ai/tvm
that referenced
this pull request
Dec 4, 2020
…face. (apache#6656) * Add initial boilerplate for Rust diagnostic interface. * Codespan example almost working * WIP * Hacking on Rust inside of TVM * Borrow code from Egg * Update CMake and delete old API * Fix Linux build * Clean up exporting to show off new diagnostics * Improve Rust bindings * Fix calling * Fix * Rust Diagnostics work * Remove type checker * Format and cleanup * Fix the extension code * More cleanup * Fix some CR * Add docs and address feedback * WIP more improvments * Update cmake/modules/RustExt.cmake Co-authored-by: Robert Kimball <bobkimball@gmail.com> * Update rust/tvm/src/ir/diagnostics/mod.rs Co-authored-by: Robert Kimball <bobkimball@gmail.com> * Clean up PR * Format all * Remove dead comment * Code review comments and apache headers * Purge test file * Update cmake/modules/LLVM.cmake Co-authored-by: Tristan Konolige <tristan.konolige@gmail.com> * Format Rust * Add TK's suggestion * More CR and cleanup * Fix tyck line * Format Co-authored-by: Robert Kimball <bobkimball@gmail.com> Co-authored-by: Tristan Konolige <tristan.konolige@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR exposes new diagnostics to Rust so we can reuse the better libraries for diagnostics rendering via Rust.