[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding line numbers to output for "No rule to make target"
From: |
Jonny Grant |
Subject: |
Re: Adding line numbers to output for "No rule to make target" |
Date: |
Fri, 27 Nov 2015 21:49:24 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 27/11/15 17:58, address@hidden wrote:
Jonny Grant writes:
> > If you do it that way, now you've got two different formats for the
> > same message. This can be confusing to users, and certainly
> > complicates factors if there is software sitting on top of Make and
> > operating on the messages (continuous integration / automatic failure
> > triage).
>
> CI uses program return codes in my experience.
> EXIT_SUCCESS is 0
On failure, CI may operate on the output text to determine the locus
of the actual failure, and automatically file defects.
Sounds reasonable. I've not myself worked with such a CI or environment.
> > Consider the following other special cases:
> >
> > o Gnu Make has $(eval), and it's possible to generate rules that
> > don't correspond to actual Makefile lines.
>
> I thought the message only related to targets.
> Do you mean if targets are generated by $(eval) ?
Yes.
Ok, I expect the line number wouldn't have been set. Or it might have
been set to the $(eval) line that created the target - which would help
the user debugging the makefile issue :)
> > o What if there are multiple targets that refer to 'test.o'?
> > Should all be reported, or just the one that failed?
>
> Often compilation only reports the first occurrence of the error. Make
> could behave in a similar way. A more advanced solution would
> report more.
Sure, it's software; it could do lots of things. The point I'm
trying to get across is that requesting a feature in a mature product
means that many scenarios must be explored, including not breaking
existing uses.
Perhaps could add a test case for the particular compatible behaviour.
As far as I am aware, Make errors start: "make: ***" and end "Stop". A
test could be created for such lines.
I don't recall when Make started outputting line numbers for makefiles,
I imagine that impacted existing users. However the benefit dramatically
outweighed any updates necessitated.
If there is support for the change, I can file a bug now we have discussed?
Regards, Jonny