-
Notifications
You must be signed in to change notification settings - Fork 47
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
Support for errors generated by swift-testing (and other things that don't print file paths) #191
Comments
I couldn't access to the link. |
I'm sorry, I forgot that repo was private. You can find the code pasted here. |
Let me clarify the issue.
Am I understanding the issue right? Then, we have some options:
The last method seems to be the least intrusive. It may impose some delay but it should be negligible nowadays (needs verification). Parsing the JSON output seems to be the most ambitious, but the |
I think you understand correctly. |
Macro expansion has a similar problem (can be fixed just with
The first line is detected as the error (with the wrong filename) and the second line is not matched. |
Adding a regexp to |
I think you just need to match it yourself, perhaps grabbing the next line which contains the file name. I have gone so far as to programmatically edit existing regents to do the right thing, FWIW |
Also, we need parsing for new "swift-style" errors:
Emacs does have some mechanism for capturing information in earlier lines and using it in later ones (see support for |
The compilation buffer is asynchronous. When matching regex patterns against the line I propose a different approach:
I have created a branch implementing my proposal. Could you try it? I couldn't implement the feature that asks the user to disambiguate multiple matches (i.e. your Known bug: the error count is doubled. Maybe this is a side-effect of adding |
I will try, thanks. But FWIW using swift package describe will fail with other build systems. I know some people use CMake and bazel to build swift projects and I'm sure others are in use. |
Can Swift Testing ( |
You might want to add something like this. Without it, I can't get M-x compile to jump to test failures.
The text was updated successfully, but these errors were encountered: