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

Feature request: optional middleware

クローズ
#4 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

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

調査の方向性

CLI REPL が :middleware を設定(deps.edn/.cljconf の起動パス)からどこで読み込むか、および各ミドルウェアシンボルがどこで解決または require されるかを特定する。最初のタスク: 提案された 2 つの設定(:missing-middleware vs :optional-middleware)のどちらを採用するかをメンテナと決定する。課題ではこの点が未確定としている。完了条件: 解決できないミドルウェアを、例外をスローする代わりに無視または警告で通知できるようにし、デフォルトの動作は変更しないこと。プロジェクトの既存のテストスイートを実行して検証する。

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

説明

Being able to control what dependencies are available via aliases (defined in deps.edn) is a convenient way to influencer the behavior of tooling: "use this dependency, if it is available on the classpath, else fallback to this other behavior".

For a long time, my own "REPL starter" library uses the availability of certain nses to control which tooling it configures at startup.

Since I wanted that behavior for the CLI REPL—especially if I am going to replace my own custom "REPL starter" with it—I find myself writing conditional loaders for middleware. See my CLI REPL middleware for examples of this for Portal and rephrase.

If there was a way to specify to the CLI REPL that middleware was optional, I wouldn't need to do this: the CLI REPL could attempt to call requiring-resolve on the middleware symbol and if it fails, could either throw (effectively the current behavior) or warn/ignore (possible new behavior).

I don't have a preference for how this might work. I can imagine several solutions, so here are a couple:

  • a new configuration setting: :missing-middleware with values :throw (default), :warn (print to stderr), or :ignore
  • a new configuration setting: :optional-middleware like :middleware except that the optional items are ignored if they cannot be required/resolved
主要言語
Clojure
スター
20
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

clojure/clojure-cli.repl のほかの issue

clojure/clojure-cli.repl の issue をすべて見る

似ている issue

Clojure の issue をもっと見る

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

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