Support tuple returns from dictionaries

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
java, swift
領域
devtools

調査の方向性

まず ObertonWalletCore/destination/JExtractSwiftPlugin/Sources/BindingStore+SwiftJava.swift の dictionaryGetJNIValue 呼び出しと、pull request #750 のコンテキストを確認します。JavaBoxable で tuple の戻り値をどのように表現すべきかを判断し、その後、tuple を含む dictionary の戻り値で報告された protocol-conformance エラーが発生しなくなったことを確認します。

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

説明

Today we skip those, thanks to https://github.com/swiftlang/swift-java/pull/750, as they may cause errors like:

ObertonWalletCore/destination/JExtractSwiftPlugin/Sources/BindingStore+SwiftJava.swift:24:41: error: type 'BindingStore.RawResponse' (aka '(requestId: UInt32, stringResponse: String, responseType: TSDKBindingResponseType, finished: Bool)') cannot conform to 'JavaBoxable' [#ProtocolTypeNonConformance]
22 | @_cdecl("Java_com_custwallet_core_BindingStore__00024getCompleteResponses__")
23 | public func Java_com_custwallet_core_BindingStore__00024getCompleteResponses__(environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass) -> jlong {
24 |   return BindingStore.completeResponses.dictionaryGetJNIValue(in: environment)
   |                                         |- error: type 'BindingStore.RawResponse' (aka '(requestId: UInt32, stringResponse: String, responseType: TSDKBindingResponseType, finished: Bool)') cannot conform to 'JavaBoxable' [#ProtocolTypeNonConformance]
   |                                         `- note: only concrete types such as structs, enums and classes can conform to protocols
25 | }

Because the tuple cannot conform to JavaBoxable. We could find some way to support these?

主要言語
Swift
スター
1.3k
フォーク
127
平均マージ
2日 14時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

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

swiftlang/swift-java のほかの issue

swiftlang/swift-java の issue をすべて見る

似ている issue

Swift の issue をもっと見る

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

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