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

Haxe errors without location not added to problems view #214

Closed
ncannasse opened this issue Apr 8, 2018 · 9 comments
Closed

Haxe errors without location not added to problems view #214

ncannasse opened this issue Apr 8, 2018 · 9 comments

Comments

@ncannasse
Copy link
Member

When a haxelib library is missing, the compiler will print an error and exit.
These errors are not reported in "Problems", you need to go look into the build Terminal to find them, which is not the best since when you launch with F5 you are prompted to open Problems to look for errors (The preLaunch task Build has exit with error code 1 --> show errors)

@Gama11
Copy link
Member

Gama11 commented Apr 8, 2018

Haxelibs errors don't really match the format that the Haxe problem matcher expects - there's no line numbers, no file, no character range, etc... We could add a separate $haxelib problem matcher or something like that, but it's a bit awkward since VSCode expects all problems to have a location, which means you can still click on them if they don't have one. Can't find the corresponding VSCode issue right now...

This is similar to #139.

@ncannasse
Copy link
Member Author

Can't we register a problem matcher that have several rules : the highest priority rule would correctly compilation errors and the lowest priority one would catch everything else so it shows up in Problems?

@Gama11
Copy link
Member

Gama11 commented Apr 8, 2018

I think each problem matcher can only have one problem pattern. Also, I don't think output should by default be considered as an error, there should at least be an Error: prefix or something? Since there's traces etc..

The bigger problem IMO is that VSCode allows you to "open" problems without a location.

@ncannasse
Copy link
Member Author

ncannasse commented Apr 8, 2018

@Gama11 displaying is already good enough, even with no location, so yes from what I understand this requires a Error : .* problem matcher. Do we already inject the problem matchers in haxe build tasks? If not, that's a good occasion to add both :)

@ncannasse
Copy link
Member Author

(and we should maybe actually reports everything that's written on stderr as errors, traces would go on stdout anyway)

@Gama11
Copy link
Member

Gama11 commented Apr 8, 2018

Yes, auto-generated tasks have been using the haxe problem matcher since they were introduced. It's still a bit annoying since VSCode copies the problem matchers into tasks.json when configuring a default build task. Maybe we could use the same regex for both...

I don't think we have any way to distuingish stderr / stdout with problem matchers.

@Gama11 Gama11 changed the title Haxelib missing Haxelib errors not added to problems view Apr 8, 2018
@Gama11
Copy link
Member

Gama11 commented Apr 8, 2018

Note: this also affects other Haxe error messages without file / location info, such as those you get when you're missing hxcpp with -cpp:

Error: Library hxcpp is not installed
Error: Build failed

On the plus side, they all have the Error: prefix in common.

@Gama11 Gama11 changed the title Haxelib errors not added to problems view Haxe errors without location not added to problems view Apr 8, 2018
@Gama11 Gama11 added bug and removed enhancement labels Apr 8, 2018
@Gama11 Gama11 closed this as completed in 6e7ef29 Apr 8, 2018
@Gama11
Copy link
Member

Gama11 commented Apr 8, 2018

With this, now have 4 problem matchers in total.. oh well. :) Also, VSCode seems to think these are from a file called Error:

@ncannasse
Copy link
Member Author

Thanks ! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants