Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add guidance on when to use AOT compilation

未关闭
#633 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
停滞
技术栈
clojure

调研方向

首先查看 issue 中链接的现有 AOT 编译参考资料,并确定应在何处加入有关使用和不使用的指导。为应用程序作者和库作者添加文档化的指导,包括所列出的依赖项、元数据和 Clojure 版本相关注意事项。完成的标准是文档清楚说明何时适合使用 AOT,以及库作者如何安全地使用它。

由索引模型根据 Issue 内容生成。

描述

There is a good reference on AOT compilation, but I don't see strong guidance on when to use it, or more specifically when to not use it.

My understanding is that it is relatively safe to employ AOT compilation for an app.

But sometimes a library author will naively use AOT compilation when creating their release jar without realizing the problems this can cause for users of their library. These problems include (additions and corrections most welcome):

  • aot compilation will create class files for library dependencies, this effectively brings in these dependencies (or portions of dependencies) at jar creation time, rather than runtime. A user might bring in different versions of those dependencies. Having multiple instances of a dependency on the classpath at runtime leads to confusion.
  • a class file will not include metadata such as original clojure filename and line number.
  • different versions of Clojure can generate different bytecode

I suppose a note on how/when to safely employ AOT compilation for a lib might also be helpful.

主要语言
HTML
星标
259
派生
275
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

clojure/clojure-site 的其他 Issue

查看 clojure/clojure-site 的全部 Issue

相似的 Issue

更多 Compilers Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。