qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 3/4] qapi: Add a primitive to include other f


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v6 3/4] qapi: Add a primitive to include other files from a QAPI schema file
Date: Tue, 01 Apr 2014 08:47:48 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 04/01/2014 07:46 AM, Lluís Vilanova wrote:

>> The formatting in Benoît's series was a little nicer aesthetically:
> 
>> +Inclusion loop detected with file: multi_file_loop_include.json
>> +Path to the broken include is:
>> +    multi_file_loop_include.json
>> +    multi_loop.json
> 
>> Furthermore, it had the benefit of using the spelling provided by the
>> user, rather than the absolute path to the files.  You want to track
>> canonical paths for detecting the loop, but do NOT want to report
>> absolute paths back to the user - instead, it's nicer to report back the
>> names as they spelled it.
> 
> I think it's better reporting absolute paths, otherwise the user has to 
> mentally
> keep track of the relative paths to get to the file.

If you display the entire chain of paths that you opened as spelled by
the user, the user shouldn't have that hard a time finding the right
file.  Furthermore, I seriously doubt we will be including files from
very many subdirectories in our use of this feature - the error is there
to aid a developer adding a new include, and won't ever trigger in
normal usage.  If a developer triggers the error, they KNOW that the
error was caused by the very file that they were working on.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]