Skip to content
  • Markus Armbruster's avatar
    qapi: The #optional tag is redundant, drop · 1d8bda12
    Markus Armbruster authored
    We traditionally mark optional members #optional in the doc comment.
    Before commit 3313b612, this was entirely manual.
    
    Commit 3313b612
    
     added some automation because its qapi2texi.py relied
    on #optional to determine whether a member is optional.  This is no
    longer the case since the previous commit: the only thing qapi2texi.py
    still does with #optional is stripping it out.  We still reject bogus
    qapi-schema.json and six places for qga/qapi-schema.json.
    
    Thus, you can't actually rely on #optional to see whether something is
    optional.  Yet we still make people add it manually.  That's just
    busy-work.
    
    Drop the code to check, fix up and strip out #optional, along with all
    instances of #optional.  To keep it out, add code to reject it, to be
    dropped again once the dust settles.
    
    No change to generated documentation.
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Message-Id: <1489582656-31133-18-git-send-email-armbru@redhat.com>
    1d8bda12