[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mesa3d-dev
Subject:    Re: [Mesa-dev] [PATCH] glcpp: Reject #version after the version has been resolved.
From:       Kenneth Graunke <kenneth () whitecape ! org>
Date:       2014-01-31 8:53:17
Message-ID: 52EB647D.8070902 () whitecape ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On 01/30/2014 02:24 PM, Carl Worth wrote:
> Matt Turner <mattst88@gmail.com> writes:
>> +		if (parser->version_resolved) {
>> +			glcpp_error(& @1, parser, "#version after
>> version is resolved");
> 
> The phrasing "after version is resolved" makes a lot of sense from the
> point-of-view of the implementation, but it's not ideal for guiding the
> user to a solution.
> 
> Perhaps better would be something like:
> 
> 	#version must be on first line
> 
> You might come up with better wording, still. I don't know if it's worth
> trying to clarify that comment lines or blank lines can appear before
> #version.
> 
> It would also be possible to distinguish a separate "Duplicate #version"
> error case, but that would require additional state in the parser so is
> likely not worth it. And the "first line" wording should guide the user
> appropriately even if there are duplicate #version directives.
> 
> Regardless of the specific wording finally chosen:
> 
> Reviewed-by: Carl Worth <cworth@cworth.org>
> 
> -Carl

I do agree with Carl - "#version after version is resolved" isn't very
clear for the application author, and that's who these messages are for.

"#version must be on first line" seems pretty clear.  I suppose you
could add "(ignoring comments)" or the like, but either way, it's a
nicer message IMHO.


["signature.asc" (application/pgp-signature)]

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic