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

Feature request: Qualified subdirectories (directory-based module namespaces)

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

メンテナーはふだん 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.res and Admin/Button.res could 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
References

Thanks!
Ethan

主要言語
OCaml
スター
7.5k
フォーク
483
平均マージ
20時間
マージ済み PR(30日)
219

環境構築

Codespaces で開く

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

はじめの一歩

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

rescript-lang/rescript のほかの issue

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

似ている issue

Compilers の issue をもっと見る

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

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