Closed
Description
After this discussion I think something should be done with the way panics are handled now. The main concerns are:
- Panics are run-time errors but Linter is designed to handle compile-time messages.
- The upcoming Linter changes will not allow atom-build-cargo to make panics pointing to the Rust standard library easily accessible to the users, at least by default (the messages panel will be hidden). And such cases are not rare since
.unwrap()
,.expect()
and other methods produce pointers to the Rust's code.
Given that, I think the better solution would be to show panics as error notifications (by means of atom.notifications.addError(...)
):
- The title shows the panic's message.
- The detail block shows the link to the exact point in the source code that caused the panic. If such code is unreachable, the link is not active.
- The detail block shows the stack backtrace if it's available (collapsed by default).
- The notification is dismissable by the user.
- Such notifications must be automatically closed before every build.
- Maybe, some limit should be set on the quantity of notifications that might be shown at once to prevent cluttering when many tests are failed.
The result will be something like this:
I would even suggest Atom Build itself to have an API that would allow to produce such notifications (with source code links and expandable details) to impose a standard on the providers, but it seems that it might lead to another package misuse, since 'build' literally means 'build', not 'run', but cargo also runs and tests the code and I'm not aware of how other build providers use the Atom Build's API.
Metadata
Metadata
Assignees
Labels
No labels