Version 0.3.0
The biggest change in this 0.3.0 release is that the poly tool now supports ClojureScript!
The work of finding a good and simple solution has been a long journey, and many ideas have been rejected along the way. We are therefore happy and proud that the day has finally come where the tool handles cljs source code files as well as package.json configuration files!
This release is backwards compatible with 0.2.22.
If you’re using the standalone poly tool, you need at least Java 21
If you already have a workspace, we recommend making the following changes:
- Set
:dialectsin workspace.edn, see example here and here.- Set
:template-datain workspace.edn, see example here.- Add a
:jvm-optsto your:polyalias in./deps.ednif you want to remove warnings when starting a shell withclojure -M:poly, see example here.- To support ClojureScript:
- Create a
package.jsonfile to your workspace root as well as to projects, components, and bases, see the RealWorld example app as an example.- Ensure to use the latest versions of the External and Kaocha test runners (if you use any of these). This is important if you start adding cljs source files, see example here.
Main changes:
- The
create workspacecommand:- If
dialects:DIALECTSis provided, it will be used to set:dialectsin workspace.edn toDIALECTS, e.g.["clj"]or["clj" "cljs"].- Only the dialects selected will be read from disk (+
cljc). - If no dialect is specified,
["clj"]will be used. - If any of the values are set to
"cljs"(["cljs"]or["clj" cljs"]) apackage.jsonfile will be created.
- Only the dialects selected will be read from disk (+
- If
- The
create component,create base, andcreate projectcommands:- If
DIALECTindialect:DIALECTis set tocljs, apackage.jsonfile will be created. - Suggests the
dialectargument in the shell, ifcljsis listed among the:dialectsin workspace.edn. - If
dialectis not specified,cljwill be used. - The new attribute :template-data can be used to add custom data, and to override the Clojure version and shadow cljs version used by Selmer templates.
- If
- The
libscommand:- NPM dependencies are now included in the list of library dependencies (read from
package.jsonfiles). - The
:outdatedparameter also checks for outdated npm dependencies. - The
:updateparameter also updates npm dependencies in package.json files.:keep-lib-versionsalso works for npm dependencies.- The
libraries:LIBSfiltering works as expected (outdated npm libraries are suggested when run from a shell).
- The lag has been removed when retrieving outdated libraries with
libraries:LIBS.
- NPM dependencies are now included in the list of library dependencies (read from
- The
infocommand:-
If the
:dialectargument is provided, a dialect column is added to the table, showing which source types are used by the bricks and projects (and their bricks), where:
j--= clj (Clojure)
-c-= cljc (Clojure Common)
--s= cljs (ClojureScript)
The pattern here is that the last letter of the file extension is used, for examplejforclj.
-
- New attributes have been added to the workspace structure, and the version has been bumped to
5.0, see versions for details.
Issues and PRs:
- Support for ClojureScript, issue 481 and PR 524
- Fix typo in the documentation, PR 560
- Fix reflection warnings, issue 563
- Remove lag when retrieving outdated libraries in the libs command, issue 568
Other changes:
- Ensure exported workspaces with symbols (e.g. a test runner namespace) are readable when used by
ws-file:FILE(orswitch-wsin a shell). - Suppress warning "WARNING: A restricted method in java.lang.System has been called" when starting a shell.
- When parsing an invalid namespace, display Error 111 without printing the full namespace.
Doc updates
- Changed the sha for Sean's External test runner to
c97747aa2b1fdf03c46c7e435cca7c2608740a2ain this section.
This version ignores cljs namespaces, which would otherwise have caused errors when running thetestcommand. - Mention that tests should be run with Deps here.
- Updated links to use the cljs-frontend branch of the Realworld example app.
- Added Clojure Script section to the Source Code page.
Special thanks go to Furkan Bayraktar, whose help in supporting ClojureScript has been invaluable, and for his work with the RealWorld example app. Thanks also to Sean Corfield for continuously testing this delivery and providing good feedback as always.
Finally, I would like to thank everyone who contributed to the discussions around ClojureScript support!
/Joakim Tengstrand