Skip to content

Commit

Permalink
Make ClojureScript dependency :provided
Browse files Browse the repository at this point in the history
Fixes #65
  • Loading branch information
vemv committed Jan 9, 2022
1 parent 01c755e commit bb41c35
Show file tree
Hide file tree
Showing 8 changed files with 235 additions and 196 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ workflows:
parameters:
jdk_version: [openjdk8, openjdk11, openjdk16, openjdk17]
clojure_version: ["1.8", "1.9", "1.10", "master"]
test_profiles: ["+test", "+test,+enrich-classpath"]
test_profiles: ["+test,-provided", "+test,+provided,+enrich-classpath"]
- util_job:
name: Code Linting, (latest LTS JDK)
jdk_version: openjdk17
Expand Down
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

## master (unreleased)

## 0.9.0 (2022-01-8)

### Changes

* [#51](https://github.com/clojure-emacs/orchard/issues/51): extend find-usages
* `orchard.xref/fn-deps` now also finds anonymous function dependencies
* added `orchard.xref/fn-deps-class` as a lower level API so you can still get the main functions deps only
* added `orchard.xref/fn-transitive-deps`
* [#51](https://github.com/clojure-emacs/orchard/issues/51): extend `find-usages`
* `orchard.xref/fn-deps` now also finds anonymous function dependencies.
* New: `orchard.xref/fn-deps-class` as a lower level API so you can still get the main functions deps only.
* New: `orchard.xref/fn-transitive-deps`.
* [#65](https://github.com/clojure-emacs/orchard/issues/65): make ClojureScript dependency `:provided`.
* If you were using Orchard for ClojureScript functionality, it might be a good idea to make sure you have an explicit `org.clojure/clojurescript` dependency.

### Bugs fixed

Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ curl -o $@ https://github.com/clojure-emacs/clojuredocs-export-edn/raw/master/ex

# .EXPORT_ALL_VARIABLES passes TEST_PROFILES to Lein so that it can inspect the active profiles, which is needed for a complete Eastwood setup:
test: clean .EXPORT_ALL_VARIABLES
lein with-profile -user,-dev,+$(VERSION),$(TEST_PROFILES) test
lein with-profile -user,-dev,+$(VERSION),$(TEST_PROFILES),-provided test

test-watch: test-resources/clojuredocs/export.edn clean
lein with-profile +$(VERSION),$(TEST_PROFILES) test-refresh
lein with-profile +$(VERSION),$(TEST_PROFILES),-provided test-refresh

eastwood:
lein with-profile -user,-dev,+$(VERSION),+eastwood,$(TEST_PROFILES) eastwood
lein with-profile -user,-dev,+$(VERSION),+eastwood,$(TEST_PROFILES),-provided eastwood

cljfmt:
lein with-profile -user,-dev,+$(VERSION),+cljfmt cljfmt check
Expand All @@ -30,17 +30,17 @@ kondo:
BUMP ?= patch

release: clean
lein with-profile -user,-dev,+$(VERSION) release $(BUMP)
lein with-profile -user,-dev,+$(VERSION),-provided release $(BUMP)

# Deploying requires the caller to set environment variables as
# specified in project.clj to provide a login and password to the
# artifact repository.

deploy: clean
lein with-profile -user,-dev,+$(VERSION) deploy clojars
lein with-profile -user,-dev,+$(VERSION),-provided deploy clojars

install: clean
lein with-profile -user,-dev,+$(VERSION) install
lein with-profile -user,-dev,+$(VERSION),-provided install

clean:
lein with-profile -user,-dev clean
10 changes: 6 additions & 4 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
:url "http://www.eclipse.org/legal/epl-v10.html"}
:scm {:name "git" :url "https://github.com/clojure-emacs/orchard"}

:dependencies [[org.clojure/clojurescript "1.10.520"]]
:exclusions [org.clojure/clojure] ; see versions matrix below
:exclusions [org.clojure/clojure ; see versions matrix below
org.clojure/clojurescript]

:aliases {"bump-version" ["change" "version" "leiningen.release/bump-version"]}

Expand All @@ -33,8 +33,10 @@

:profiles {
;; Clojure versions matrix
:provided {:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/clojure "1.10.1" :classifier "sources"]]}
:provided {:dependencies [[org.clojure/clojure "1.10.3"]
[org.clojure/clojure "1.10.3" :classifier "sources"]
[org.clojure/clojurescript "1.11.4"]]
:test-paths ["test-cljs"]}
:1.8 {:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojure "1.8.0" :classifier "sources"]]}
:1.9 {:dependencies [[org.clojure/clojure "1.9.0"]
Expand Down
23 changes: 13 additions & 10 deletions src/orchard/cljs/analysis.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@
[orchard.misc :as misc])
(:refer-clojure :exclude [find-ns find-var all-ns ns-aliases]))

(defn all-ns
[env]
(->> (:cljs.analyzer/namespaces env)
;; recent CLJS versions include data about macro namespaces in the
;; compiler env, but we should not include them in completions or pass
;; them to format-ns unless they're actually required (which is handled
;; by macro-ns-candidates below)
(into {} (filter (fn [[_ ns]]
(not (and (contains? ns :macros)
(= 1 (count ns)))))))))
(defn all-ns [{namespaces :cljs.analyzer/namespaces}]
(into {}
(remove (fn [[ns-sym ns]]
;; Remove pseudo-namespaces that the cljs analyzer
;; started returning at some point:
(or (-> ns-sym name (.startsWith "goog."))
;; recent CLJS versions include data about macro namespaces in the
;; compiler env, but we should not include them in completions or pass
;; them to format-ns unless they're actually required (which is handled
;; by macro-ns-candidates below):
(and (contains? ns :macros)
(= 1 (count ns))))))
namespaces))

(defn find-ns
[env ns]
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit bb41c35

Please sign in to comment.