qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org, "Luiz Capitulino" <lcapitulino@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Benoît Canet" <benoit.canet@irqsave.net>
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	[thread overview]
Message-ID: <533AD194.8030806@redhat.com> (raw)
In-Reply-To: <87ob0lrwl7.fsf@fimbulvetr.bsc.es>

[-- Attachment #1: Type: text/plain, Size: 1361 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2014-04-01 14:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 19:16 [Qemu-devel] [PATCH v6 0/4] qapi: Allow modularization of QAPI schema files Lluís Vilanova
2014-03-31 19:16 ` [Qemu-devel] [PATCH v6 1/4] qapi: [trivial] Break long command lines Lluís Vilanova
2014-03-31 19:32   ` Eric Blake
2014-03-31 19:16 ` [Qemu-devel] [PATCH v6 2/4] qapi: Use an explicit input file Lluís Vilanova
2014-03-31 19:42   ` Eric Blake
2014-04-01 14:05     ` Lluís Vilanova
2014-03-31 19:16 ` [Qemu-devel] [PATCH v6 3/4] qapi: Add a primitive to include other files from a QAPI schema file Lluís Vilanova
2014-03-31 20:00   ` Eric Blake
2014-04-01 13:46     ` Lluís Vilanova
2014-04-01 14:47       ` Eric Blake [this message]
2014-04-01 16:05         ` Lluís Vilanova
2014-03-31 19:16 ` [Qemu-devel] [PATCH v6 4/4] qapi: Add tests for the "include" directive Lluís Vilanova
2014-03-31 20:17   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=533AD194.8030806@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=benoit.canet@irqsave.net \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).