Derive access level of generate CodingKeys from @Codable model
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 32/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- swift
調査の方向性
The issue gives a public @Codable model and shows the generated CodingKeys declaration as internal; it does not name implementation files or tests. Start by reading the macro implementation and its tests for generated CodingKeys access levels. Done means generated keys use the model’s access level and are accessible from another package; the issue has had no comment for 1,031 days.
索引モデルが issue の本文から書いたものです。
説明
Right now @Codable macro will generate CodingKeys with internal access level.
@Codable
@CodingKeys(.PascalCase)
public struct MessageReceiver {
public let userId: UUID
public let status: OData.Enum<Int>
}
extension MessageThread.Response.MessageReceiver {
enum CodingKeys: String, CodingKey {
case userId = "UserId"
case status = "Status"
}
}
It would great to generate CodingKeys with the same access level (public) as MessageReceiver. This would allow access to CodingKeys in multi package application. As of my particular use case I would like to build OData requests using CodingKeys instead of String from the domain layer of application.
Really appreciate effort in open sourcing the project, unfortunately internal macros plugin implementation is quite complicated to be able to make a quick PR with solution.
- 主要言語
- Swift
- スター
- 779
- フォーク
- 46
- 平均マージ
- 9時間 7分
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SwiftyLab/MetaCodable のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
SwiftyLab/MetaCodable#169 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
SwiftyLab/MetaCodable#82 · コメント 6 件 ·
SwiftyLab/MetaCodable の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
Realtime swift
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
supabase/supabase-swift#1647 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NobiResearch/Ovenbird#148 ·
メンテナーはふだん 1 日以内に返信
-
auth type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
googleapis/google-cloud-swift#1549 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
shanselman/TinyToolTown#883 ·
メンテナーはふだん 5 日以内に返信