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

createInterface indents a copied type by its source column

オープン 初心者向け
#9,135 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
ocaml
領域
compilers

調査の方向性

analysis/src/create_interface.mlから始め、特に Source_file_extractor.extract と process_signature の Sig_type ケースを確認してください。issueでは、コピーされたテキストとインデント処理が指摘されています。提供された Make の例で再現し、module M = {type t = int} のような1行のモジュールでも同じ問題が起きるか確認してください。生成されたインターフェースで、コピーされた型宣言が出力位置に合わせてインデントされれば完了です。payloadにはテストファイルの指定はありません。

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

説明

createInterface copies a type declaration from the source with the column it has there as its indentation, instead of the indentation of the place it is printed at.

module Make = (X: {type t}) => {
  type u = X.t
}

generates

module Make: (
  X: {
                   type t
  },
) =>
{
  type u = X.t
}

type t is at column 19 in the source. Source_file_extractor.extract (analysis/src/create_interface.ml) prefixes the first line of the copied text with col_start spaces, and the Sig_type case of process_signature adds that text without its indent. A type in a module written on one line, such as module M = {type t = int}, is likely affected the same way.

主要言語
OCaml
スター
7.5k
フォーク
484
平均マージ
21時間 9分
マージ済み PR(30日)
255

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

rescript-lang/rescript のほかの issue

rescript-lang/rescript の issue をすべて見る

似ている issue

Compilers の issue をもっと見る

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

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