createInterface indents a copied type by its source column
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 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} 這樣的一行 module 是否也有相同問題。完成標準是產生的介面在輸出位置縮排複製的型別宣告;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 分鐘
- 30 天內合併 PR
- 255
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
rescript-lang/rescript 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 74/100
rescript-lang/rescript#9132 ·
維護者通常 1 天內回覆
-
Printed type declarations drop @tag, @notUndefined and runtime annotations可能已有人在做 @cknitt 今天認領。 未關閉
難度 4/5 1-2 天 新手友好度 25/100
rescript-lang/rescript#9134 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 35/100
rescript-lang/rescript#9130 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 1-2 天 新手友好度 55/100
rescript-lang/rescript#9122 ·
維護者通常 1 天內回覆
-
Dev dependencies interacting可能已有人在做 @CarlOlson 於 2 天前認領。 未關閉
難度 4/5 1-2 天 新手友好度 25/100
rescript-lang/rescript#9089 · 1 則留言 ·
維護者通常 1 天內回覆
查看 rescript-lang/rescript 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 4 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
CanadaHonk/porffor#426 ·
-
難度 2/5 1-3 小時 新手友好度 77/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
compiler-rt:asan llvm:transforms
難度 2/5 1-3 小時 新手友好度 72/100
llvm/llvm-project#236682 ·
維護者通常 1 天內回覆