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

error format support #1276

Open
BeatScherrer opened this issue Jul 23, 2022 · 6 comments
Open

error format support #1276

BeatScherrer opened this issue Jul 23, 2022 · 6 comments

Comments

@BeatScherrer
Copy link

When running recipes the resulting errors might be of any format which cannot be determined solely from the recipe that is called. A single recipe might even contain multiple error formats, since the type of command is neither restricted (which results in a vast amount of flexibility).

Nevertheless it would be nice to have a(n optional) field containing an error format so other tools, thinking of vscode/nvim/emacs/etc., might make use of the generated output in a meaningful manner.

For me personally to use a command runner efficiently I need to be able to extract the errors and jump to them in an automatic way, otherwise the tool loses a lot of appeal.

@casey
Copy link
Owner

casey commented Jul 24, 2022

Can you give some examples of errors that just might generate that you're having trouble with?

I think there's a lot of room for improvement, especially for Just's own errors. Right now they are usually pretty good about printing line numbers, but they could definitely be more consistent, to make it easier for tools to handle just errors.

@casey
Copy link
Owner

casey commented Jul 24, 2022

I think you're talking about errors produced by things that just calls, and not just errors themselves, so I created a separate issue to track just making just errors more consistent: #1277

@BeatScherrer
Copy link
Author

I think you're talking about errors produced by things that just calls, and not just errors themselves, so I created a separate issue to track just making just errors more consistent: #1277

Yep I am considering errors from what just is calling. E.g. when my make command results in a compile error I want to be able to extract the meaningful parts of that error and be able to use that in my editor to jump to the according location.

@casey
Copy link
Owner

casey commented Jul 24, 2022

Yep I am considering errors from what just is calling. E.g. when my make command results in a compile error I want to be able to extract the meaningful parts of that error and be able to use that in my editor to jump to the according location.

Gotcha! Can't you already do this? E.g. if you're using just to invoke Python scripts, tell vim to use Python's error formatting when handling errors?

@BeatScherrer
Copy link
Author

I will work out a small example and test some things in neovim to get some more insight on what is actually needed from the just framework.

But in the end I want a full chain of recipes to have extractable problems. If I want to have just run run my full toolchain which might look like:

  • run shell script
  • compile c++
  • run tests
  • start a web frontend

So when an error occurrs along the line ultimately I want to know what failed and where the problem is located in the code. Since that is command specific each command would require information on how these errors should be interpreted.

I'll follow up with more information and specific examples when I find some spare time or we can discuss this manner in discord more extensively.

@casey
Copy link
Owner

casey commented Jul 27, 2022

Sounds good! I think a concrete example with a justfile with multiple recipes using different tools and the error formats for each would be most helpful.

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

No branches or pull requests

2 participants