Skip to content

Commit

Permalink
Snapshot 022027 (#483)
Browse files Browse the repository at this point in the history
* Added reference to the reworked Japanese version of the poly tool, by Shinsei Taro.
* Print warnings in the 'check' and 'test' command (if any), issue #480.
* Allow the use of + for the info command (to show all profiles) when reading the workspace from file.
* Update the overview diagram of World Singles Networks.
* Added Integrant system as example workspace.
* 0.2.20-SNAPSHOT (27)
  • Loading branch information
tengstrand authored Jul 5, 2024
1 parent 7322300 commit bd7eb9f
Show file tree
Hide file tree
Showing 18 changed files with 57 additions and 23 deletions.
8 changes: 4 additions & 4 deletions components/check/src/polylith/clj/core/check/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:error-messages error-messages}))

(defn print-check [{:keys [messages] :as workspace} color-mode]
(let [error-messages (validator/error-messages messages)]
(if (empty? error-messages)
(println (color/ok color-mode "OK"))
(validator/print-messages workspace))))
(if (empty? messages)
(println (color/ok color-mode "OK"))
(validator/print-messages workspace)))

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

(defn validate [profiles {:keys [active-profiles]} color-mode]
(let [existing (set (map :name profiles))
missing (set/difference active-profiles existing)
missing (set/difference active-profiles existing #{""})
s (if (= 1 (count missing)) "" "s")
missing-msg (color/profile (str/join ", " missing) color-mode)]
(when (-> missing empty? not)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
:who-made-this {:url "https://polylith.gitbook.io/polylith/conclusion/who-made-polylith"}}
:slack {:url "https://clojurians.slack.com/archives/C013B7MQHJQ"}
:python-tool {:url "https://davidvujic.github.io/python-polylith-docs"}
:in-japanese {:url "https://zenn.dev/shinseitaro/books/clojure-polylith"}
:blog-posts {:url "https://polylith.gitbook.io/polylith/#read-a-blog-post"
:understanding-polylith-through-the-lens-of-hexagonal-architecture {:url "https://medium.com/@joakimtengstrand/understanding-polylith-through-the-lens-of-hexagonal-architecture-8e7c8757dab1"}
:leveraging-polylith-to-improve-consistency-reduce-complexity-and-increase-changeability {:url "https://medium.com/qantas-engineering-blog/leveraging-polylith-to-improve-consistency-reduce-complexity-and-increase-changeability-2031dd3d5f3d"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

(def font-size 20)
(def font-width 12) ;(c2d/char-width graphics \x)
(def font-height 24) ; (c2d/font-height graphics))
(def font-height 24) ; (c2d/font-height graphics)

(defn set-text! [{:keys [color text x]} y graphics]
(let [[r g b] (color/color->rgb color)]
Expand Down Expand Up @@ -41,7 +41,7 @@
(doseq [{:keys [x y w h]} canvas-areas]
(c2d/set-color graphics 36 39 43)
(c2d/rect graphics x y w h))
(if (nil? canvas-areas)
(when (nil? canvas-areas)
(c2d/set-background graphics 36 39 43))
(c2d/set-font graphics font)
(c2d/set-font-attributes graphics font-size)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@
bricks (str/join ", " (concat components bases))]
(println (str "Bricks to run tests for: " bricks)))))

(defn print-warnings-if-any [{:keys [messages] :as workspace}]
(when (seq messages)
(validator/print-messages workspace)
(println)))

(defn run [{:keys [components bases projects changes settings messages] :as workspace} is-verbose color-mode]
(if (validator/has-errors? messages)
(do (validator/print-messages workspace)
Expand All @@ -204,6 +209,7 @@
(if (empty? projects-to-test)
(print-no-tests-to-run-if-only-dev-exists settings projects)
(do
(print-warnings-if-any workspace)
(print-projects-to-test projects-to-test color-mode)
(print-bricks-to-test component-names base-names bricks-to-test color-mode)
(println)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[polylith.clj.core.util.interface.str :as str-util]))

(defn brick-path? [path]
(and (-> path nil? not)
(and path
(or (str/starts-with? path "../../bases/")
(str/starts-with? path "../../components/"))))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
(def minor 2)
(def patch 20)
(def revision SNAPSHOT) ;; Set to SNAPSHOT or RELEASE.
(def snapshot 26) ;; Increase by one for every snapshot release, or set to 0 if a release.
(def snapshot 27) ;; Increase by one for every snapshot release, or set to 0 if a release.
;; Also update :snapshot-version: at the top of readme.adoc.
(def snapshot? (= SNAPSHOT revision))

Expand All @@ -37,7 +37,7 @@

(def tool (if system/extended? "polyx" "poly"))

(def date "2024-06-26")
(def date "2024-07-05")

;; Execute 'poly doc version' to see when different changes was introduced.
(def api-version {:breaking 1, :non-breaking 0})
Expand Down
5 changes: 5 additions & 0 deletions development/src/dev/dev_common.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@
(-> (user-input/extract-arguments (concat [command (str "ws-dir:" ws-dir) "replace:/Users/joakimtengstrand:USER-HOME"]
args))
(command/execute-command)))

(defn execute-from-file [command ws-file & args]
(-> (user-input/extract-arguments (concat [command (str "ws-file:" ws-file) "replace:/Users/joakimtengstrand:USER-HOME"]
args))
(command/execute-command)))
14 changes: 9 additions & 5 deletions development/src/dev/jocke.clj
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@

;; Execute commands
;(dev-common/execute "info" ".")
;(dev-common/execute-from-file "info" "profiles.edn" "+")

;(dev-common/execute "libs" ".")
;(dev-common/execute "info" "../sandbox/polylith218")
;(dev-common/execute "test :all" ".")
;(dev-common/execute "test" "." ":all")

;(def workspace (-> (dev-common/ws-from-file "info" "../sandbox/polylith218/ws.edn")))


;(println (sh/execute "java" "-jar" "projects/poly/target/poly.jar" "check"))
;(println (sh/execute "java" "-jar" "projects/poly/target/poly.jar" "test" ":all" "project:okay:setup-fails:x-okay" :dir "examples/for-test"))
;(println (sh/execute "java" "-jar" "projects/poly/target/poly.jar" "test" ":all" "project:okay:setup-fails:x-okay" "ws-dir:examples/for-test"))

(def workspace (-> ;(dev-common/dir ".")
;(dev-common/dir "examples/doc-example")
;(dev-common/dir "examples/for-test")
(dev-common/dir "examples/multiple-workspaces/backend")
;(dev-common/dir "examples/profiles")
;(dev-common/dir "examples/profiles" "+")
;(dev-common/dir "examples/illegal-brick-deps")
;(dev-common/dir "examples/test-runners" "with:default-test-runner")
;(dev-common/dir "examples/local-dep" "changed-files:components/util/")
;(dev-common/dir "examples/test-runners" "skip:external-inherit-from-global:multiple-test-runners:development")
Expand All @@ -55,6 +55,10 @@
workspace/workspace))


(:messages workspace)
(:user-input workspace)


(-> workspace :workspaces)

(-> workspace :projects second :lib-deps)
Expand Down
2 changes: 1 addition & 1 deletion doc/commands.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ poly help

[source,text]
----
poly 0.2.20 (2024-06-25) - https://github.com/polyfy/polylith
poly 0.2.20 (2024-07-05) - https://github.com/polyfy/polylith
poly CMD [ARGS] - where CMD [ARGS] are:
Expand Down
10 changes: 7 additions & 3 deletions doc/doc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ The `more` argument covers all other documentation and links that are not specif
[source,text]
----
example$ doc more:
blog-posts slack
high-level videos
blog-posts python-tool
high-level slack
in-japanese videos
podcasts workspaces
python-tool
----
Let's dig into the different categories:
Expand Down Expand Up @@ -307,6 +307,10 @@ Open a specific page, for example, the https://polylith.gitbook.io/polylith/conc
example$ doc more:high-level:faq
----
=== in japanese
https://x.com/shinseitaro[Shinsei Taro] (しんせいたろう) has translated and reworked version 0.2.19 of the `poly` tool in Japanese, https://zenn.dev/shinseitaro/books/clojure-polylith[here].
=== podcasts
You can open the https://podcasts.apple.com/se/podcast/s4-e21-polylith-with-joakim-james-and-furkan-part-1/id1461500416?i=1000505948894[first episode] of the only podcast we have with:
Expand Down
8 changes: 7 additions & 1 deletion doc/example-systems.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@ https://github.com/furkan3ayraktar[Furkan Bayraktar] has made a full-blown https

image::images/example-systems/user-manager.png[link="images/example-systems/user-manager.png"]

https://github.com/seancorfield[Sean Corfield] has made a full-blown https://github.com/seancorfield/usermanager-example/tree/polylith[usermanager] web application, which can be compared with non-Polylith systems living in other branches of the repository.
https://github.com/seancorfield[Sean Corfield] has made a full-blown https://github.com/seancorfield/usermanager-example/tree/polylith[usermanager] web application, which can be compared with non-Polylith systems living in other branches of the repository, .

== Demo Rama Electric

image::images/example-systems/demo-rama-electric.png[link="images/example-systems/demo-rama-electric.png"]

https://github.com/jeans11[Jean Boudet] has made a https://github.com/jeans11/demo-rama-electric[demo web app] to show the use of Rama and Electric together.

== Integrant system

image::images/example-systems/demo-rama-electric.png[link="images/example-systems/integrant-system.png"]

https://github.com/marksto[Mark Sto] has made a small https://github.com/polyfy/polylith/tree/master/examples/integrant-system[example system] to show how you can use https://github.com/weavejester/integrant[Integrant] in Polylith.

== Game of Life

image::images/example-systems/game-of-life.png[link="images/example-systems/game-of-life.png"]
Expand Down
Binary file added doc/images/example-systems/integrant-system.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/production-systems/world-singles-networks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/integrant-system/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
:test {:extra-paths ["bases/system/test"]}

:poly {:main-opts ["-m" "polylith.clj.core.poly-cli.core"]
:extra-deps {polylith/clj-poly {:mvn/version "0.2.18"}}}}}
:extra-deps {polylith/clj-poly {:local/root "../../projects/poly"}}}}}
8 changes: 8 additions & 0 deletions next-release.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@
|===
| PR | Author | Description

| https://github.com/polyfy/polylith/pull/482[482]
| https://github.com/marksto[Mark Sto]
| Create an https://github.com/polyfy/polylith/tree/master/examples/integrant-system[example project] showing how to use Polylith with an Integrant system
|===

|===
| Other changes

| Allow the use of `+` (to show all profiles) in the `info` command when reading the workspace from file.

| New https://github.com/polyfy/polylith/blob/master/examples/poly-rcf/readme.md[poly-rcf] example workspace that shows how to run https://github.com/hyperfiddle/rcf[Hyperfiddle rcf] tests with the `poly` tool.

| If `:hide-lib-size` is given to the `libs` command, values in the `KB` column appear as `-`. Used for testing purposes.
Expand All @@ -39,6 +44,9 @@

| New sponsors: https://github.com/taehee-sp[taehee-sp] (김태희), https://github.com/tlonist-sang, https://github.com/premiscale

| Translated and https://zenn.dev/shinseitaro/books/clojure-polylith[reworked version] of the 0.2.19 poly tool documentation in Japanese, by https://x.com/shinseitaro[Shinsei Taro] (しんせいたろう). Can be accessed with `poly doc more:in-japanese`

| Update the overview diagram of https://github.com/polyfy/polylith/blob/master/doc/images/production-systems/world-singles-networks.png[World Singles Networks].

| Remove Funnel as example production system.

Expand Down
2 changes: 1 addition & 1 deletion readme.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
image::doc/images/logo.png[width=400]
:snapshot-version: 26
:snapshot-version: 27
:cljdoc-doc-url: https://cljdoc.org/d/polylith/clj-poly/CURRENT/doc

https://cljdoc.org/d/polylith/clj-poly/0.2.19/doc/readme[image:https://badgen.net/badge/doc/0.2.19/blue[]]
Expand Down
2 changes: 1 addition & 1 deletion scripts/output/help/help.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
poly 0.2.20 (2024-06-25) - https://github.com/polyfy/polylith
poly 0.2.20 (2024-07-05) - https://github.com/polyfy/polylith

poly CMD [ARGS] - where CMD [ARGS] are:

Expand Down

0 comments on commit bd7eb9f

Please sign in to comment.