question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Matchers: Error annotations catch things that are not errors and not even in Go code

See original GitHub issue

Consider the (totally valid) makefile:

all: foo
	echo Done

include Foo.mk

Foo.mk:
        printf 'foo:\n\techo foo\n' > $@

On the first run of make, this generates

Makefile:4: Foo.mk: No such file or directory
printf 'foo:\n\techo foo\n' > Foo.mk
echo foo
foo
echo Done
Done

There isn’t really a good way to suppress this warning (see this StackOverflow question I asked) without massively complicating the Makefile. I don’t mind seeing this warning on the first make. However, my github actions go job decides that this is an error (it’s not; it’s non-fatal), and annotates every single pull request on my repository with an error on the relevant line on the Makefile. Please fix the annotation to not do this.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
JasonGrosscommented, Mar 31, 2020

Seems to work well, thanks! image

2reactions
bryanmacfarlanecommented, Mar 27, 2020

I think the solution is to have a much tighter regex for compile errors and then if there’s things it misses, problem matchers supports having multiple matchers.

I’ll have a PR soon for the v2-beta lineage.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with Errors in Go 1.13
The Go 1.13 errors package includes two new functions for examining errors: Is and As . The errors.Is function compares an error to...
Read more >
How to Add Extra Information to Errors in Go - DigitalOcean
In Go 1.13, new features were added to make it easier to add extra information to errors: fmt.Errorf, errors.Is , and errors.
Read more >
Has there been any talks recently to improve Error Handling in ...
I love the way Go treats errors as values and forces you to deal with them right there, makes code way more readable....
Read more >
Dave Cheney - Dont Just Check Errors Handle Them Gracefully
GopherCon 2022: Jeremy Brown - Parsing w/o Code Generators: Parser Combinators in Go with Generics. Gopher Academy. Gopher Academy.
Read more >
30. Errors and Exception Handling | Python Tutorial
An exception is an error that happens during the execution of a program. Exceptions are known to non-programmers as instances that do not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found