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

Hard to fix failing builds #328

Open
lonix1 opened this issue Jul 24, 2021 · 5 comments
Open

Hard to fix failing builds #328

lonix1 opened this issue Jul 24, 2021 · 5 comments

Comments

@lonix1
Copy link

lonix1 commented Jul 24, 2021

Environment

dotnet: 5.0.301
vscode: 1.58.0
extension: 0.7.5
os: linux

Issue

When a build fails (before running tests), a little popup shows:

Build failed. Fix your build and try to run the test(s) again
Source: .NET Core Test Explorer (Extension)

The output window shows:

Test run for ProjectName.Foo.BarTests
Executing dotnet build in /path/ProjectName/test/Foo.Tests
Error while executing test command: Error: Build command failed

That isn't helpful because I don't know what to fix. So I need to drop to the shell and do a dotnet build to find out.

It would be more helpful if the log window showed the build errors.

(Or even better, filter the build errors to show just the names/paths of the buggy files.)

@stefanforsberg
Copy link
Collaborator

Hey!

What I typically do on build errors is use the problems view (ctrl-shift-m) since I find it to be the quickest way of getting a good visualization of what errors I've got build wise.

I think it's unlikely we'll implement something to filter the build log and extract the error information and display it since I suspect the problems view is what you're actually after 🤔

@lonix1
Copy link
Author

lonix1 commented Jul 25, 2021

Filtering error info is a nice feature but as I said above not essential - just putting the errors into the log as-is would be better than it is now.

Nonetheless, thanks for your idea of the problems view! I disabled that because it gets huge and annoying, but if that's the only simple way I'll use it. Better than going to the shell every time!

@lonix1
Copy link
Author

lonix1 commented Jul 27, 2021

@stefanforsberg Quick follow up:

I've been using your way for a couple of days.

In the problems view:

  • is it possible to show the failed tests with a different icon (right now they show the same as build errors... a red crossed circle
  • is it possible to filter them? I have filter options for "Errors", "Warnings", "Infos"

@stefanforsberg
Copy link
Collaborator

@lonix1
I think you can only tag your problems with one of those three (errors, warning, infos) and tbh no one them really is a great match for test errors.

Is the thing you're after here to be able to easily hide the problems from the extension or only show the problems from the extension?

Side note: VSCode is in the process of adding some first class testing api:s which I hope can bring some form of standardization and a better home for reporting test results and errors etc. It looks like this was part of the July 2021 milestone so let's see how that develops after summer =)

microsoft/vscode#107467

@CEbbinghaus
Copy link

This issue is specifically talking about wanting to add a better view of the errors being returned but I have the problem of it building just fine when running dotnet build with no reason to think it would error but it dotnet test explorer still reporting a failing build

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

3 participants