Feature request: Qualified subdirectories (directory-based module namespaces)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- ocaml
- 領域
- compilers
調査の方向性
Read the existing recursive source scanning behavior described in the issue and the related proposals #1974, #1805, and #2459. The issue does not name implementation files or tests; first locate where subdirs: true is handled in the compiler and review its module naming rules. Done means an opt-in qualified mode supports the shown directory hierarchy and duplicate filenames while preserving the default behavior.
索引モデルが issue の本文から書いたものです。
説明
Feature request: Qualified subdirectories (directory-based module namespaces)
Hi! I've been using ReScript a bit in my free time recently, and have been really enjoying it. However I've found it quite difficult/frustrating to organize code/packages using ReScript's existing tooling (even when using the "monorepo" features).
I'd like to propose an opt-in feature similar to Dune's (include_subdirs qualified), where source directories automatically become part of the ReScript module hierarchy.
For example, given:
src/
App.res
Components/
Button.res
Input.res
Admin/
Button.res
App.res could reference Components.Button, Components.Input, and Admin.Button.
This would provide two benefits:
- Better code organization: Module hierarchies could mirror the filesystem without manually creating wrapper modules.
- Duplicate filenames: Files such as
Components/Button.resandAdmin/Button.rescould coexist without module-name collisions.
Currently, recursive source scanning (subdirs: true) places all files in a flat module namespace.
Ideally, this would be an opt-in configuration (perhaps subdirs: "qualified"), preserving existing behavior by default. Directory modules could be implemented using compile-time aliases, without introducing additional JavaScript runtime wrappers.
Related issues
- [#1974 — Allow duplicate filenames / path-derived module names](https://github.com/rescript-lang/rescript/issues/1974): Closely related proposal, including examples like
Pages__Index. - [#1805 — Namespace proposal](https://github.com/rescript-lang/rescript/issues/1805): Earlier work on package-level namespaces.
- [#2459 — Recursive subdirectory scanning](https://github.com/rescript-lang/rescript/issues/2459): Related source-discovery functionality, but without directory qualification.
References
Thanks!
Ethan
- 主要言語
- OCaml
- スター
- 7.5k
- フォーク
- 483
- 平均マージ
- 20時間
- マージ済み PR(30日)
- 219
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rescript-lang/rescript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
rescript-lang/rescript#9037 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
rescript-lang/rescript#9044 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
rescript-lang/rescript#8997 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
rescript-lang/rescript#8994 ·
メンテナーはふだん 1 日以内に返信
-
Have formatter insert newlines around multi-line expressions対応中かも @rolandpeelen が 3 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
rescript-lang/rescript#8960 ·
メンテナーはふだん 1 日以内に返信
rescript-lang/rescript の issue をすべて見る
似ている issue
-
enhancement scope:diagnostics scope:syntax
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
-
code: refactoring good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
idris-lang/Idris2#3887 ·
メンテナーはふだん 1 日以内に返信
-
severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
luainkernel/lunatik#2207 ·
メンテナーはふだん 1 日以内に返信
-
backend:X86 generated by fuzzer llvm:globalisel miscompilation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
llvm/llvm-project#235468 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:codegen backend:cuda backend:hip bug direction:input
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
CrossGL/crosstl#3061 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信