Don't unwrap CLJC lib specs when cleaning a namespace
まだ誰も着手していません。
評価
調査の方向性
まず、namespace の :require フォームを処理する cljr-clean-ns エントリポイントを追跡し、CLJC reader-conditionals がどのように展開されるかに注目します。この issue のサンプル namespace を入力として使用し、既存の条件構造が完全に展開されるのではなく保持されること、また、すでに完全に展開されたフォームは変更されないことを確認します。
索引モデルが issue の本文から書いたものです。
説明
We have a namespace like this:
(ns my.app.ns
(:require [vlad.core :as vlad :refer [attr chain join present Validation]]
#? (:cljs [goog.date.Interval :as Interval])
[clojure.string :as string]
[cemerick.url :as url]))
after running cljr-clean-ns, it fully expands the clj and cljs versions to:
(ns my.app.ns
#?@
(:clj
[(:require
[cemerick.url :as url]
[clojure.string :as string]
[vlad.core :as vlad :refer [attr chain join present Validation]])]
:cljs
[(:require
[cemerick.url :as url]
[clojure.string :as string]
[goog.date.Interval :as Interval]
[vlad.core :as vlad :refer [attr chain join present Validation]])]))
This namespace form is twice as long, and (IMO) obscures which parts of the namespace differ between clj and cljs. To tell the difference, you need to check each line and find the corresponding one in the other branch.
Would you consider a feature request to not fully expand CLJC forms in the :require?
I'd argue this should be the default behaviour, but could also see it being an option if people liked this kind of expansion. The new feature wouldn't automatically convert fully expanded CLJC forms back, it would just preserve what was already there.
- 主要言語
- Clojure
- スター
- 261
- フォーク
- 68
- 平均マージ
- 10時間 36分
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
clojure-emacs/refactor-nrepl のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
clojure-emacs/refactor-nrepl#444 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
clojure-emacs/refactor-nrepl#443 ·
-
Analyse some real-world projects in CI再び着手できるかも @vemv が 1962 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
clojure-emacs/refactor-nrepl#322 · コメント 4 件 · リアクション 1 件 · 担当者 1 名 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
clojure-emacs/refactor-nrepl#195 · コメント 39 件 · リアクション 7 件 ·
clojure-emacs/refactor-nrepl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
clojure-emacs/cider#4235 ·
メンテナーはふだん 1 日以内に返信
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
`batch-transact-with-temp-conn!` leaves `:max-tx` behind its datoms, so the next transaction reuses a tx id対応中かも @tiensonqin が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Server logs every websocket send at DEBUG since #8844, adding lag under load対応中かも @matthewlehew が 1 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
.Team/Graphy
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
metabase/metabase#87741 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信