Support for multi src path analysis
まだ誰も着手していません。
評価
調査の方向性
weasel.repl.websocket/websocket-setup-env から開始し、cljs.repl/analyze-source の呼び出しを追跡してから、issue に記載されているコンパイラー環境の処理を確認します。:src-paths オプションをサポートし、以前のコンパイラー・ルートを保持したまま各ソース・ルートを解析します。依存する namespace が報告された誤検知警告なしで読み込まれれば完了です。
索引モデルが issue の本文から書いたものです。
説明
When I piggyback into the Weasel REPL, many "false-positive" code analysis warnings are emitted. These are mostly of the form "Referred var some.namespace/var-name does not exist," but other similar warnings are emitted. Nothing breaks for me, and the REPL functions.
This occurs when (cljs.repl/analyze-source (:src this)) is called from within weasel.repl.websocket/websocket-setup-env.
I've traced the root cause down to an inability of the ClojureScript compiler to locate the source of dependent namespaces to analyze. To fix this appears to require two changes:
- The
:rootin the ClojureScript compiler environment needs to be set to the source root. This root needs to follow the JVM classpath convention. In other words it needs to be precisely at the level containing the namespace directories. Using the weasel project structure itself as an example, this would besrc/cljs/. - For projects that have multiple roots (
:source-pathsperlein-cljsbuild) a separate analysis needs to be done for each distinct root. Thus, Weasel would need to accomodate a:src-pathsoption in lieu of its current:srcoption.
With a :src-paths option, if I replace (cljs.repl/analyze-source (:src this)) with the following form
(let [compiler-env (::env/compiler this)
previous-root (:root @compiler-env)]
(doseq [src-path (:src-paths this)]
(swap! compiler-env assoc :root (File. src-path))
(env/with-compiler-env compiler-env
(cljs.repl/analyze-source src-path)))
(swap! compiler-env assoc :root previous-root))
then piggybacking into Weasel works without any "false-positive" warnings, and if you inspect the ClojureScript compiler's behavior, you can see that it succeeds in loading dependent namespaces and analyzing them.
- 主要言語
- Clojure
- スター
- 323
- フォーク
- 31
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nrepl/weasel のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
似ている issue
-
.Needs Triage Administration/People Priority:P2 Type:Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
metabase/metabase#85503 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: Editing the L value in HSL mode resets H and S to 0対応中かも @makesomethingshit が 1 日前に担当しました。 オープンneeds triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
pgwire tokens-reqd
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
software-mansion/starknet-jvm#641 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
nrepl/piggieback#163 ·