-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[WIP] @feature: "cargo check"-inspector for the rust bundle #464
base: master
Are you sure you want to change the base?
[WIP] @feature: "cargo check"-inspector for the rust bundle #464
Conversation
This adds an "on_idle" inspector in the rust bundle, that calls `cargo check` and parses the output json for warning and errors. It was necessary to extend `inspect.moon` to accept options for enabling/disabling stdout/stderr because cargo sends the json to stdout and some other non-json to stderr. This produced a bug in `activities.moon` where the pump-methods of the process always received a `on_stdout` and a `on_stderr` handler, regardless of the existence of a `stdout` or `stderr` object respectivly in the process. The fix simply checks for the existence of these objects and omits passing the respective handler if the output stream does not exist.
This adds an "on_idle" inspector in the rust bundle, that calls `cargo check` and parses the output json for warning and errors. It was necessary to extend `inspect.moon` to accept options for enabling/disabling stdout/stderr because cargo sends the json to stdout and some other non-json to stderr. This produced a bug in `activities.moon` where the pump-methods of the process always received a `on_stdout` and a `on_stderr` handler, regardless of the existence of a `stdout` or `stderr` object respectivly in the process. The fix simply checks for the existence of these objects and omits passing the respective handler if the output stream does not exist.
add "work in progress" label, because I have encountered a bug that I will fix. |
…s return `nil`. `Cargo check` returns issues with a list of "spans", that hold position information about the issue in the text buffer. Since a spans "label" (message) is optional, a fallback to the parent issues message was added.
@bugabinga I believe we talked about this on Gitter, but I see this as useful. Remove the WIP label when you feel it's ready for review. |
- use more precise filter to get errors/warnings from cargo - use rendered message from error to display in howl
I still try to fix this from time to time, but regularly hit a wall. There is a bug blocking this:
Hopefully you will find some time to whip up some docs about how bundles are supposed to get built ;). |
Has these been any progress on this? Seems like a very useful feature. I've not used Moon before, but I'm happy to try my hand at fixing the remaining issue if explained a little further. |
No description provided.