Feature request: optional middleware
还没有人认领这个 Issue。
评估
调研方向
定位 CLI REPL 从其配置(deps.edn/.cljconf 启动路径)加载 :middleware 的位置,以及每个中间件符号被解析或 require 的位置。第一项任务:与维护者确定两个候选设置中采用哪一个(:missing-middleware vs :optional-middleware),因为 issue 对此留有余地。完成标准:无法解析的中间件可以被忽略或给出警告,而不是抛出异常,默认行为保持不变,并通过运行项目现有的测试套件进行验证。
由索引模型根据 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 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
clojure/clojure-cli.repl 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 3/5 1-2 天 新手友好度 55/100
clojure/clojure-cli.repl#5 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 72/100
clojure/clojure-cli.repl#2 · 2 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 55/100
clojure/clojure-cli.repl#1 · 1 条评论 · 2 个 reaction ·
查看 clojure/clojure-cli.repl 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
bhauman/clojure-mcp-light#34 ·
-
File import: move-top-parent-pages-to-library moves classes and properties under Library (schema violation)可能已有人在做 @tiensonqin 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
-
Podman documentation is out of date可能已有人在做 @troyvit 于 3 天前认领。 未关闭.Needs Triage Priority:P3 Type:New Feature
难度 2/5 1-3 小时 新手友好度 68/100
metabase/metabase#83625 · 1 条评论 ·
维护者通常 1 天内回复
-
bug: MCP server rejects request bodies over 100kb (express.json default) with PayloadTooLargeError未关闭needs triage
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
[Bug]: Schema-on-read: cannot retract a vector value unless it has exactly two elements可能已有人在做 @markaddleman 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
replikativ/datahike#1105 ·
维护者通常 1 天内回复