Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Generated Python code is not interoperable when a union contains a member called "value"

オープン
#338 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

  • #339 @Miko997 による — マージされずにクローズ

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
c, python

調査の方向性

提供された QualifiedName IDL を使用し、Python と C の hello-world 例で問題を再現することから始めます。value という名前の union メンバーと the_value の場合について、生成されたコードと wire の動作を比較します。publisher と reader が一致し、変更されていない value を使って正常に通信できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

When using an IDL file which defines a union, which contains a member called "value" - the generated python code is no longer interoperable with other language implementations.

For example:

module AddressSpace {

    union QualifiedName switch (boolean) {
        case TRUE:
            string value;
    };

    struct Node {
        long node_id;
        QualifiedName browse_name;
        string display_name;
    };

};

I used this IDL as a replacement for the "hello world" examples in both the python and C repositories (C acting as the publisher, python as the subscriber). With the IDL file exactly as above, the publisher never matches with a reader. Simply changing the above IDL file to replace the "value" member with something else (say, for example "the_value"), and regenerating the C and python code - causes everything to work as expected.

I am also aware of the @optional IDL syntax - but unfortunately cannot use it in this case.

主要言語
Python
スター
110
フォーク
68
平均マージ
1日 15時間
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eclipse-cyclonedds/cyclonedds-python のほかの issue

eclipse-cyclonedds/cyclonedds-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。