Support setting public static fields in classes
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
調査の方向性
例を使って clojure.lang.Agent.soloExecutor に対する set! の失敗を再現し、Invalid assignment target を報告するアナライザーの経路を調査します。フィールドアクセスと代入がどのように処理されるかを追跡し、その後、既存の代入動作を変更せずに soloExecutor のような public static フィールドに代入できることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
I stumbled onto this when trying to override the Executor for clojure.lang.Agent. The minimum code that needs to run:
(import '[clojure.lang Agent]
'[java.util.concurrent Executors])
(set! (.-soloExecutor Agent) (Executors/newFixedThreadPool 10))
Currently, as setting of the public static fields in a class isn't supported, this results in the following error:
----- Error --------------------------------------------------------------------
Type: clojure.lang.ExceptionInfo
Message: Invalid assignment target
Data: {:type :sci/error, :line 4, :column 1, :file "foo.clj", :phase "analysis"}
Location: foo.clj:4:1
Phase: analysis
----- Context ------------------------------------------------------------------
1: (import '[clojure.lang Agent]
2: '[java.util.concurrent Executors])
3:
4: (set! (.-soloExecutor Agent) (Executors/newFixedThreadPool 10))
^--- Invalid assignment target
----- Stack trace --------------------------------------------------------------
user - foo.clj:4:1
Describe the solution you'd like
I should be able to set that field and other public static fields in a class.
Describe alternatives you've considered
None
Additional context
This is mainly for the ability to be able to override the Executors to support virtual threads in core constructs like (future ...)
- 主要言語
- Clojure
- スター
- 1.4k
- フォーク
- 109
- 平均マージ
- 1分
- マージ済み PR(30日)
- 26
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
babashka/sci のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
babashka/sci#1097 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
JVM: implement a host (Clojure) protocol from sci — copy-var on a protocol var (ADR 0013, half 1)対応中かも @yogthos が 80 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
Explore forkable SCI runtime worlds再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
babashka/sci#1040 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nextjournal/clerk#830 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
IOP tokens release blocker team qa team qa autotests WG adoption
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
penpot/penpot#13540 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
izhangzhihao/intellij-rainbow-brackets#2903 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100