Feature request: optional middleware
まだ誰も着手していません。
評価
調査の方向性
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-middlewarewith values:throw(default),:warn(print tostderr), or:ignore - a new configuration setting:
:optional-middlewarelike:middlewareexcept that the optional items are ignored if they cannot be required/resolved
- 主要言語
- Clojure
- スター
- 20
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
clojure/clojure-cli.repl のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
clojure/clojure-cli.repl#5 · リアクション 1 件 ·
clojure/clojure-cli.repl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信