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

Re: [XEN PATCH for-4.17 v5 16/17] tools/golang/xenlight: Rework gengotypes.py and generation of *.gen.go


  • To: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Fri, 14 Oct 2022 11:37:18 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xexaGvKf7M9a2R/drz2m64q0kubX8NKk+tLk12Wzn2M=; b=Ydrsc8OX1U/4CaFCXnxoRj47tK19L6GKN4RjZpZf9z0AfmPryjkPvgqXSird7OtpveCvTrUJa8utLrTCbnnTY1iAbO+pAXfBuu55DJXgLTibnnZZRjkDR2S9704UTbnEW4njtSdHiQZEY4h4iDclN+QjTOx9EJi/Kt0mfh9bq2R1I9aU4+DDg6I7hLrubWk3cAChnyX1t3NDrEzJJXxfeYBUgfsKeHBn+reHaGp3OYr6HAP7rEP40W5oxtRiRWkYZLgMPraXNZp0ZaMFf7bqPG8Az3T/zZ2jkz01lV5zYG237LzCEpkAOgBH5HysDzuJTuMiT3KhVvb58hwvEPrmvA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EmRreud4cKgfseT+BdayHcVAiOo80o8JH9l03bwU8WKZHLHZI/AKZHcRqLaJGTwU8RZg1DYnEKRH2t4aGmNtS5SPThATT7Q73agwAJkxjV0AKVRRjJ/cOSOe7CMjSujH4sbuW7oTINqYTjdqRYXEV2cZVxsNIajLfrD6uB04b3/eQsG8HP8dGQ/gXDEr26XBMfh3/XaFT2jsVEmrEU+OBNKyNjh/zridVuPN3LJijAjo2+wkk26o7vQySGw/rieazSJie5ERiE+lNwM/57moUHdOfSvcBvnyxe+ELqy2a+TyoLr+FORHsnYRx1PCQ36dTMKv/YQjMsCmRx37nINg8Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, Nick Rosbrook <rosbrookn@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 14 Oct 2022 11:37:41 +0000
  • Ironport-data: A9a23:nBcILq28+QCIzqJhyfbD5e5wkn2cJEfYwER7XKvMYLTBsI5bp2RSy DYWCjrVbq3eZGahLtx3at6w9EIHvZ7QzYdiTQtkpC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefSAOKU5NfsYkhZXRVjRDoqlSVtkus4hp8AqdWiCkaGt MiaT/f3YTdJ4BYpdDNJg06/gEk35q6r4GpE5gZWic1j5zcyqVFEVPrzGonpR5fIatE8NvK3Q e/F0Ia48gvxl/v6Ior4+lpTWhRiro/6ZWBiuFIPM0SRqkEqShgJ+rQ6LJIhhXJ/0F1lqTzTJ OJl7vRcQS9xVkHFdX90vxNwS0mSNoUekFPLzOTWXWV+ACQqflO1q8iCAn3aMqUW6OgtGiZSz 8dAOWsyYD2suuab0py0H7wEasQLdKEHPas5k1Q5l3T8MqxjRprOBaLX+dVfwTE8wNhUGurTb NYYbjwpawncZxpIOREcD5dWcOWA3yGjNWEH7gzL4/Zri4TQ5FUZPLzFGdzZYNGVA+5SmV6Vv Dnu9GXlGBAKcteYzFJp91r83LSRzH+gBer+EpWy295AgHat4FAsBUc5aFylgMuFoUyHDoc3x 0s8v3BGQbIJ3FymSJzxUgO1pFaAvwUAQJxAHusi8gaPx6HIpQGDCQAsbjNHcs1gi8YwShQjz FrPlNTsbRR1t6afU3Wa9bG8oja7OCxTJmgHDQcbSSMV7t+lp5s85i8jVf5mGa+xy9jqQzf5x mnQqDBk3+lPy8kWy6+84FbLxSq2oYTERRI04QORWX+56gR+Z8iuYInABUXn0Mus5b2xFjGp1 EXoUeDHhAzSJflhTBCwfdg=
  • Ironport-hdrordr: A9a23:/YCAWK6AKwlWr76nKgPXwWuBI+orL9Y04lQ7vn2ZFiY5TiXIra qTdaogviMc0AxhI03Jmbi7Scq9qeu1z+853WBjB8bZYOCAghrlEGgC1/qp/9SEIUHDH4FmpM BdmsRFaeEYSGIK9foSgzPIXOrIouP3lpxA7N22pxgCcegpUdAY0+4TMHf4LqQCfngjOXNPLu v42iMonVqdUEVSSv7+KmgOXuDFqdGOvonhewQ6Cxku7xTLpS+06ZbheiLonys2Yndq+/MP4G LFmwv26uGIqPeg0CLR0GfV8tB/hMbh8N1eH8aB4/JlagkEyzzYJ7iJaYfy+Qzdk9vfrGrCV+ O85CvICv4DqU85uFvF5ycFlTOQiQrGoEWStGNwyUGT3fARAghKRfapzLgpDCcwoSAbza5B+b MO0GSDu5VNCxTc2Cz7+tjTThlv0lG5uHw4jIco/jViuKYlGchsRLYkjTVoOYZFGDi/5JEsEe FoAs2Z7PFKcUmCZ3ScumV02tSjUnk6Ax/DGyE5y4eo+ikTmGo8w1oTxcQZkHtF/JUhS4Nc7+ CBNqhzjrlBQsIfcKo4DuYcRsm8DHDLXHv3QSqvCEWiELtCN2PGqpbx7rlw7Oa2eIYQxJ93g5 jFWEMwjx9HR6svM7z64HRmyGG/fIzmZ0Wd9ih33ekIhpTsALz2LCaEVFci18O9vvR3OLyoZ8 qO
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHY3wYExc++jpfrd0yvyakMPv5Mw64MavoAgAFV9YCAAAOmAA==
  • Thread-topic: [XEN PATCH for-4.17 v5 16/17] tools/golang/xenlight: Rework gengotypes.py and generation of *.gen.go

On 14/10/2022 12:24, George Dunlap wrote:
>> On 13 Oct 2022, at 16:00, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx> wrote:
>>
>> On 13/10/2022 14:05, Anthony Perard wrote:
>>> diff --git a/tools/golang/xenlight/gengotypes.py 
>>> b/tools/golang/xenlight/gengotypes.py
>>> index ac1cf060dd..ff4c2ad216 100644
>>> --- a/tools/golang/xenlight/gengotypes.py
>>> +++ b/tools/golang/xenlight/gengotypes.py
>>> @@ -723,7 +723,13 @@ def xenlight_golang_fmt_name(name, exported = True):
>>>     return words[0] + ''.join(x.title() for x in words[1:])
>>>
>>> if __name__ == '__main__':
>>> +    if len(sys.argv) != 4:
>>> +        print("Usage: gengotypes.py <idl> <types.gen.go> 
>>> <helpers.gen.go>", file=sys.stderr)
>> This breaks with Py2.7.  Needs a
>>
>> from __future__ import print_function
>>
>> inserting at the top.
> Out of curiosity, did you notice this by inspection, or  because you 
> specifically tested Python 2.7, or because a system you were using is still 
> actually using Python 2.7?

Xen's build system can't actually create a build which supports Py2 and
Py3, because xen.lowlevel.{xc,xs} only get built once.  It would be nice
to fix this, but -ETUITS, so we state a specific version in the specfile
and mock ensures there is no trace of the other one.

XenServer is in the process of trying to retire Py2, but it turns out
that Xen isn't actually fully Py3 clean yet, so we use Py2 for Xen.

The build breaks because the libxl build writes the .go files even when
we don't actually want go bindings in the end.

~Andrew

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.