Jump to page: 1 25  
Page
Thread overview
DMD now has colorized syntax highlighting in error messages
May 14, 2017
Walter Bright
May 14, 2017
Andre Pany
May 14, 2017
Walter Bright
May 14, 2017
Jacob Carlborg
May 14, 2017
Basile B.
May 14, 2017
cym13
May 14, 2017
Vladimir Panteleev
May 14, 2017
Basile B.
May 15, 2017
Jacob Carlborg
May 14, 2017
MysticZach
May 15, 2017
ketmar
May 15, 2017
Russel Winder
May 15, 2017
Jacob Carlborg
May 15, 2017
Walter Bright
[OFF TOPIC] Re: DMD now has colorized syntax highlighting in error messages
May 15, 2017
Russel Winder
May 15, 2017
ketmar
May 15, 2017
Paolo Invernizzi
May 16, 2017
Joakim
May 15, 2017
H. S. Teoh
May 15, 2017
Jonathan M Davis
May 15, 2017
Walter Bright
May 15, 2017
Adam D. Ruppe
May 15, 2017
Walter Bright
May 15, 2017
Adam D. Ruppe
May 16, 2017
Jacob Carlborg
May 15, 2017
Adam D. Ruppe
May 15, 2017
Walter Bright
May 15, 2017
Adam D. Ruppe
May 16, 2017
Ali Çehreli
May 16, 2017
Walter Bright
May 16, 2017
Adam D. Ruppe
May 16, 2017
Walter Bright
May 16, 2017
H. S. Teoh
May 16, 2017
Walter Bright
May 16, 2017
Adam D. Ruppe
May 16, 2017
Walter Bright
May 16, 2017
Adam D. Ruppe
May 16, 2017
Jonathan M Davis
May 18, 2017
Adam D. Ruppe
May 18, 2017
MysticZach
May 16, 2017
Mike James
May 16, 2017
Random D user
May 14, 2017
https://github.com/dlang/dmd/pull/6777

It turned out to be unexpectedly easy to implement.

The only downside is now we have to rather tediously tweak the error message texts so they use backticks.
May 14, 2017
On Sunday, 14 May 2017 at 14:07:20 UTC, Walter Bright wrote:
> https://github.com/dlang/dmd/pull/6777
>
> It turned out to be unexpectedly easy to implement.
>
> The only downside is now we have to rather tediously tweak the error message texts so they use backticks.

Thanks a lot. In my opinion these kind of changes are small but have huge impact on the acceptance of a language.

Kind regards
André
May 14, 2017
On 5/14/2017 9:04 AM, Andre Pany wrote:
> Thanks a lot. In my opinion these kind of changes are small but have huge impact
> on the acceptance of a language.

I agree. A couple other improvements needed for error messages:

1. print out the offending line

2. have a clickable link to a more exhaustive explanation on dlang.org

Anyone interested in taking either of these on?

May 14, 2017
On 2017-05-14 18:25, Walter Bright wrote:

> 1. print out the offending line

I hope this one will be optional/configurable. I don't think it necessary to print the offending line within an editor/IDE. They usually can already map the error to the offending line.

-- 
/Jacob Carlborg
May 14, 2017
On Sunday, 14 May 2017 at 17:54:38 UTC, Jacob Carlborg wrote:
> On 2017-05-14 18:25, Walter Bright wrote:
>
>> 1. print out the offending line
>
> I hope this one will be optional/configurable. I don't think it necessary to print the offending line within an editor/IDE. They usually can already map the error to the offending line.

Yes +1 for configurable. IDEs already parse and make things clickable.
It's not just +1, it's mandatory. If you implement this you must add a new compiler switch.
May 14, 2017
On Sunday, 14 May 2017 at 19:11:32 UTC, Basile B. wrote:
> On Sunday, 14 May 2017 at 17:54:38 UTC, Jacob Carlborg wrote:
>> On 2017-05-14 18:25, Walter Bright wrote:
>>
>>> 1. print out the offending line
>>
>> I hope this one will be optional/configurable. I don't think it necessary to print the offending line within an editor/IDE. They usually can already map the error to the offending line.
>
> Yes +1 for configurable. IDEs already parse and make things clickable.
> It's not just +1, it's mandatory. If you implement this you must add a new compiler switch.

Can't the IDE remove the line itself if it troubles him? I don't think such a small thing should burden the compiler with a flag just for the sake of a tool.
May 14, 2017
On Sunday, 14 May 2017 at 16:25:36 UTC, Walter Bright wrote:
> On 5/14/2017 9:04 AM, Andre Pany wrote:
>> Thanks a lot. In my opinion these kind of changes are small but have huge impact
>> on the acceptance of a language.
>
> I agree. A couple other improvements needed for error messages:

In the PR you say that someone with a better color sense ought to choose the default colors. I don't have such a sense myself. But I recognize that as a real task for which help should be sought. Maybe this thread is a good place to get a volunteer?
May 14, 2017
On Sunday, 14 May 2017 at 19:11:32 UTC, Basile B. wrote:
> Yes +1 for configurable. IDEs already parse and make things clickable.
> It's not just +1, it's mandatory. If you implement this you must add a new compiler switch.

No problem, it could only print out the line if the output is a terminal, same as for how it decides whether to output colors by default.

May 14, 2017
On Sunday, 14 May 2017 at 23:17:42 UTC, Vladimir Panteleev wrote:
> On Sunday, 14 May 2017 at 19:11:32 UTC, Basile B. wrote:
>> Yes +1 for configurable. IDEs already parse and make things clickable.
>> It's not just +1, it's mandatory. If you implement this you must add a new compiler switch.
>
> No problem, it could only print out the line if the output is a terminal, same as for how it decides whether to output colors by default.

Yes that another option. But maybe my answer was a bit excessive. Let's wait and see how it looks.
May 15, 2017
Walter Bright wrote:

> https://github.com/dlang/dmd/pull/6777
>
> It turned out to be unexpectedly easy to implement.
>
> The only downside is now we have to rather tediously tweak the error message texts so they use backticks.

sorry for being rude, but this is exactly the example of things programmers like to write: fun, quite easy, and absolutely useless. most of the time it will be filtered away by ide/editor, and otherwise it is *harder* to read, 'cause it will almost certainly not match editor's syntax coloring settings, so reader will have to mentally strip the colors first.

while much harder task -- showing which exactly template failed in template constraint -- is very hard to implement (i tried it, i know it), but will immediately benefit *anyone*, and will be really useful.

i'm not trying to say that you should drop the things you like to work on, and switch to the things i like, of course. but this patch, IMO, doesn't deserve a dedicated NG post.

sorry again, i'm frustrated by dmd inability to generate valid .o file from completely valid source, so can be harsh today.
« First   ‹ Prev
1 2 3 4 5