Generate dgs.codegen.typemappings for shared-schema libraries

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
kotlin
領域
build-system

調査の方向性

Start by reading the Gradle generateJava configuration and the existing reader for META-INF/dgs.codegen.typemappings added for dependency JARs in PR #735. Define how exported mappings are selected and whether dependency mappings are included, then trace resource processing and JAR packaging. Done means opt-in generation produces a deterministic, tracked resource while manual resources still work when disabled and existing consumers need no configuration changes.

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

説明

enhancement

Shared-schema library maintainers must currently define type mappings twice: in generateJava.typeMapping for their own code generation and in META-INF/dgs.codegen.typemappings for downstream consumers. Adding or changing a mapping requires updating both copies, which can drift.

PR #735 added support for reading this resource from dependency JARs. Generating it was discussed there and requested again in https://github.com/Netflix/dgs-codegen/pull/735#issuecomment-2368474922, but remains unimplemented.

Please add an opt-in Gradle capability to generate the mapping resource and package it in the library JAR. For example, this configuration:

generateJava {
    typeMapping = [BigDecimal: 'java.math.BigDecimal']
}

could produce META-INF/dgs.codegen.typemappings containing:

BigDecimal=java.math.BigDecimal

The generated resource should be wired into resource processing and JAR packaging, with deterministic output and Gradle input/output tracking. Existing manually maintained resources should continue to work when generation is disabled.

Exported mappings can differ from the mappings used to generate a library's own code, so the feature should define how maintainers select or override the exported set. It should also define whether dependency mappings are exported, rather than implicitly republishing every inherited mapping. Consumers should continue using the existing reader without configuration changes.

主要言語
Kotlin
スター
220
フォーク
123
平均マージ
1日 6時間
マージ済み PR(30日)
23

環境構築

はじめの一歩

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

Netflix/dgs-codegen のほかの issue

Netflix/dgs-codegen の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

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

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