Releases: polyfy/polylith
Version 0.3.32
Included in this 0.3.32 release:
Issues and PRs:
Doc updates
- New section Number of downloads on Clojars
- Link to Tetris playing AI the Polylith way - Part 1 in blog posts
Version 0.3.31
Included in this 0.3.31 release:
Issues and PRs:
- Fix Java 21 compatibility by upgrading
core.rrb-vectorto0.2.0, issue 579- Note: This was not the source of the problem!
- Handle invalid keywords correctly when exporting workspaces to disk, issue 581
- Replace badgen.net with shields.io (on-demand generated icons), to fix the icons on the start page (readme.md), issue 583
Doc updates
- New video: Gerben Dekker explains how you can ship faster and collaborate better, using Polylith and other tools (in Python). He starts talking about Polylith at 9:20.
Version 0.3.30
This release skips directly from 0.3.0 to 0.3.30 to avoid conflicts caused by an old 0.3.21-SNAPSHOT release from 2024 that was still lingering and creating issues.
This release introduces two new main features. The ability to filter by library name in the libs command (see examples here) and support for detecting inconsistent library versions in the check command.
Libraries that use different versions are highlighted in yellow (warnings) or red (errors), see documentation here:
For existing workspaces:
- Set
:validationsin workspace.edn, see example here.- Make sure to use the latest
0.7.0version of the external test runner (if you use it).
Changes:
- The
:librariesattributes has been added to the workspace structure, and the version has been bumped to5.1.
See versions for details. - The
:workspaceskey is no longer mandatory in the workspace root package.json file. - Warnings are no longer shown when starting a shell with the stand-alone
polycommand. - The set argument is introduced to simplify creation of images with the
polyxcommand (mainly used by maintainers of the poly tool).
Issues and PRs:
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
Version 0.2.22
This version includes improved Windows support, better error messages when running tests, use of the template engine Selmer for generating bricks in the create command, among other improvements.
Don't forget to update :tag-patterns in workspace.edn (issue 534), e.g.:
:tag-patterns {:stable "^stable-*"
:release "^v[0-9]*"}
Issues and PRs
-
Allow slash in profile names, issue 508
-
Include warnings in the check function in the API, issue 509
-
Improved error handling for empty namespaces and when running tests, issue 523 + PR 548
-
Cause poly test to fail when no tests are run (optionally using extra arg to the command), issue 530
-
:mvn/local-repowill be used when running tests, if specified in a project, issue 532 -
Ensure maps with tag literals as keys in test namespaces don't break test runner, issue 533
-
Use correct regex in
:tag-patternsin workspace.edn, issue 534 -
Handle paths correctly in Windows (and get rid of warning 205), issue 549
-
Change Clojure version from 1.11.1 to 1.12.0, PR 517
-
Ignore Calva's new REPL file, PR 519
-
Start using Selmer templates for create fragments, PR 520
-
Update circleci to use Clojure 1.12, PR 521
-
Update dep info of polylith-external-test-runner to v0.6.1, PR 522
-
Fix comparing maven version numbers, PR 535
Other changes
- If no project other than development, and we include development in a test run, then only print that there are no tests to run.
- Print improved error message if edamame can't parse a file.
Thanks Sean Corfield for PR 517, 519, 520, and 521
Thanks Jeroen van Dijk for PR 522 and 547 (replaced by 548)
Thanks Brett for PR 535
/Joakim Tengstrand
Version 0.2.21
This release contains a bug fix, support for Clojure 1.12, and some documentation updates.
| Issue | Description |
|---|---|
| 504 | Bug fix. Caused an exception if there were validation errors. |
| Other changes |
|---|
Rename next-release.adoc to next-release.md (changed from AsciiDoc to Markdown) |
| Support Clojure 1.12 syntax, by bumping Edamame to 1.4.26. |
| Doc updates |
|---|
| New Visualize the repo page, that shows how the polylith repo has evolved over time using git-of-theseus |
| The manual release process on how to create snapshot and stable releases. |
| A talk by Vedang Manerikar from the IN/Clojure 2024 conference, added to the list of videos. |
| Make sure the integrant-system overview image is correct + move its example repository. |
Thanks Mitchell Horning and Kevin Downey for helping out with issue 504!
Version 0.2.20
This release has largely been about cleaning up issues and preparing for the work of supporting ClojureScript. After four months of work, I abandoned the attempt to support multiple workspaces, and chose to roll back these changes. Sometimes it takes time to understand the full extent of a change, but today I'm very happy that I made this decision, and I'm convinced that it will be for the best in both the short and long term. In addition to this insight, some good has also come out of this in the form of some code simplifications that have been implemented.
Issues and PRs
- When creating a workspace, honor user git config for default main branch name, issue 420
- Switch workspace via shortcuts, issue 443
- Support snippets of test configuration to be merged into settings, issue 457
- Show an error if a brick depends on another brick in its deps.edn file, issue 458
- Make sure
:keep-lib-versionsworks when updating libs for components (bug fix), issue 465 - Cannot run poly tool in folder containing deps.edn (but no workspace.edn), issue 477
- Support generating images with light or transparent background, issue 484
- Create an example project showing how to use Polylith with Integrant, PR 482
Other changes
- Allow the use of
+(to show all profiles) in theinfocommand when reading the workspace from file. - New poly-rcf example workspace that shows how to run Hyperfiddle rcf tests with the
polytool. - If
:hide-lib-sizeis given to thelibscommand, values in theKBcolumn appear as-. Used for testing purposes.
Doc updates
- A note informing that old
SNAPSHOTreleases are removed on an ongoing basis. - Added the video How the polylith repo has evolved over time to the Developing poly and Doc pages. Can be accessed with
poly doc more:videos:how-the-polylith-repo-has-evolved-over-time. - New State page, that links to examples that use Component and Integrant.
- Updated the Libraries section and better explained the issues with building multiple libraries from a Polylith workspace.
- New sponsors: Taehee Kim (김태희), Sanghyun Kim, and PremiScale
- Translated and reworked version of the
0.2.19poly tool documentation in Japanese, by Shinsei Taro (しんせいたろう). Can be accessed withpoly doc more:in-japanese - Added Integrant system to the list of example systems.
- Updated the overview diagram of World Singles Networks.
- Removed Funnel as example production system.
Version 0.2.19
The main focus in this release has been to clean up the workspace structure by moving keys to where they belong (issue 315). This clean up of the workspace structure was introduced to simplify future maintenance of the tool. It unfortunately broke the Test Runner contract (tests has been added, so this hopefully will not happen again). The good part is that the improved inner workspace structure will make it easier to implement test runners in the future. We decided to skip the idea of storing project and brick configuration in separate files because it made it harder to edit it and get an overview (they can still be found in :projects and :bricks in workspace.edn).
Important: If you use a test runner other than the built-in one, make sure to use at least 0.8.4 of the Kaocha test runner, and 0.4.0 of the External test runner.
Issues and PRs
- Clean up the workspace structure (changes are listed here), issue 315.
- Update Edamame dependency to 1.4.25, to make it work with Clojure 1.12 Alpha 7.
- Link to affected 3rd party test runners in docstring, PR 426.
- Restore global test configuration, PR 427.
Other changes
- Reintroduced the global
:testkey in:settingsin the workspace structure (taken from workspace.edn), see versions (bug fix). - Make sure we also update libraries for the development project when we execute
poly libs :update(bug fix). - Changed lib name prefix from "poly" to "polylith" in the polylith workspace itself, to minimise the risk of name clashes for the users of the clj-poly library.
- Added
checkandtestfunctions to the clj-poly library, documented here. - Custom data can be stored in the reserved
:customkey at the root of workspace.edn and under each project and brick, see custom configuration. - The test-runners example project was added. It uses the Kaocha and External test runners, and is executed before we make a release (from create-example) to reduce the risk that we break the Test Runner API in the future.
- Removed the migrate command, that can migrate a workspace from the old format where each brick didn’t store its own deps.edn file (created by 0.1.0-alpha9 or earlier). Use 0.2.18 if you still need to migrate old workspaces.
- Print a deprecation message if the shorter form of "create component/project/workspace" is used, e.g.
create c name:mycomp. - Print a deprecation message if
::is used (that looks up the workspace root). This feature will be removed in the future, and the reason is that it’s no longer needed since we introduced the shell command. - Make sure we can create a workspace, even if it exists a non-polylith deps.edn file at the root.
Doc updates
- Fixed three broken images on the Testing page.
- Show snapshot number, e.g.
0.2.19-SNAPSHOT #7for the badge at the top of the start page for snapshot releases. - Added a warning that you should use a more unique prefix (lib name) for your bricks in project
deps.ednfiles, if the code is exposed outside the workspace, e.g. as a library. Thanks Imre Kószó for pointing this out! - Added a tip on how to refresh your workspace from a shell.
- Added a note that old workspaces can be read by the tool (both from exported files and from disk).
- Added Leveraging Polylith to improve consistency, reduce complexity and increase changeability to the list of blog posts. These can also be accessed by the doc command.
- Added Demo Rama Electric to the list of example systems.
- Converted this documentation from next-release.txt to AsciiDoc.
Version 0.2.18
The focus of this release is to improve internal quality by using clojure.edn and Edamame when reading files. Rewriting the dependency calculations and moving the documentation back to where the code lives, has been done to better handle future maintenance and support for cljs and code sharing between workspaces.
The documentation has not only been moved, but new pages have been added: Artifacts, Doc, Tap, Test Runners, Validations, Source code, Polylith CI setup, Polyx, and Versions. Around 90% of the documentation has been reviewed by @lread, which has taken hundreds of hours, where Lee has done most of the work. This effort is invaluable and will facilitate the maintenance work, as changes to code and documentation can from now on be made coherently. Worth mentioning is that Cljdoc is an excellent documentation platform and that Asciidoc is a very good alternative to Markdown, which is also supported by GitHub.
Since Cursive 1.13.0, it's possible to use the :local/root syntax together with Cursive for the development project, and all examples now use the :local/root syntax! Read more about it here and under "Cursive users" in Testing. I want to give a special thanks to Colin Fleming for fixing this in Cursive and all the hard work made by Imre Kószó in issue 2554 and all the good support from Furkan.
Another change is how we build and release the poly tool and its documentation, which is described here. We only build clj-poly for use as a library, which includes everything that was included in clj-api. Note that the poly tool documentation is version controlled and if you work from the master branch, you should use the latest SNAPSHOT version (e.g. 0.2.19-SNAPSHOT when that is released).
The content of all configuration files is stored in the configs key in the workspace structure. The internal error handling has been improved and centralised into the config-reader component. We now use clojure.edn when reading edn files and if a file can't be parsed, a detailed error message that includes row and column is shown.
The dependency calculations are several times quicker which make commands run noticeably faster for big workspaces.
Note that the alpha has been dropped from 0.2.18 and that's because we depend on tools.deps instead of tools.deps.alpha.
Issues and PRs:
-
Support for more than one interface. Always accept
interfaceandifc+ what's specified in:interface-ns, issue #187. -
Addition of the new
polyxtool that supports the creation of images from the command's output. It includes all functionality inpolyplus the overview command that generates the info/deb/libs image, issue #205. -
Inclusion of bases in the circular dependency check (error 104), issue #249.
-
Checks for unreadable namespace (error 111), issue #259.
-
Improved error messages for workspace.edn and deps.edn config files, issue #264.
-
Option to display inverted deps grid, by swapping the x and y axes, issue #271.
-
Checking of test dependencies with the check command (solved by issue 293 and 274), issue #272.
-
Support for exclusion of bricks to test so that we support both
:includeand:excludefor projects in workspace.edn, issue #274. -
Improved warning 205 by also showing non-top namespace files. Error 106 and 108 are not displayed in some edge cases, issue #277.
-
Trigger error 111 if a source file doesn't have a namespace, issue #279.
-
Improved reporting of the check/info/test commands, which now report unnecessary components (warning 207). If a component is not referred to but is still needed, it can be marked as
:necessaryby that project, seepoly help check(warning 207) for details, issue #282. -
Availability of
switch-wsin the shell, outside a workspace, issue #286. -
The ability to show all available options in a shell, issue #289.
-
Inability to
:commitwhen creating a workspace within an existing repo, issue #290. -
Correct handling of bases that depend on other bases, issue #293.
-
Support for showing outdated libraries by passing in
:outdatedto the libs command, issue #294. -
Updates of outdated examples/docs (solved by issue #312), issue #304.
-
Recognition of
test-resourcesas a resources directory, issue #305. -
Improved performance of the poly commands by optimising the dependency calculations, issue #309.
-
Build docs/example code should not use build-clj, issue #312.
-
NPE when importing Java sub namespace, issue #313.
-
Don't validate
data_readers.cljfiles, issue #316. -
Updates of all libraries to the latest version with
poly libs :update, issue #376. -
New use of tools.deps instead of tools.deps.alpha, issue #268.
-
Requirement for clojure.tools.deps correctly in build.clj, PR #275.
-
Tweaks to bb doc task that offers cljdoc previews, PR #319.
-
Fix of NPE when taking the size of a directory, PR #323.
-
Fix of filename/namespace mismatch in profile.adoc, PR #324.
-
Addition of clj-kondo config exports, PR #332.
Other improvements:
- Exclude license files when building an uberjar.
- We no longer include tools.deps as a library when creating projects.
- Removed the
:alloption for the deps and libs commands, so that we no longer include bricks that don't have a lib dep. - Also include missing bases in validation error 107.
- A shell can be started using
poly :tapwhich is equivalent topoly shell :tap. This will start a shell and open up a portal window at the same time. Other valid first parameters::all,:fake-poly,:github,:local,:ws-file, and:ws-dir. - The portal window now only includes the workspace structure, which makes it an alternative way to browse the workspace.
- In the deps command, we now exclude empty columns (bricks that don't use any library).
- If we use
switch-wsin a shell and execute a command and give the color-mode, then it will be used by that command. - The autocomplete now works when starting a shell outside a workspace, which can be useful when creating a workspace, or if we want to switch to another workspace.
- The test that executed
libs :outdatedhas been removed, so that it doesn't fail intermittently. Earlier, the tests for a PR could suddenly start failing if a newer version of a used library was released. - If we switch to a file using e.g.
switch-ws file:ws.edn, the:no-changeswill now work properly. - Removed support for running
polyas a Clojure Tool. - Show size as dash (- instead of 0) in the libs command, if a library hasn't been downloaded yet. This stopped working in 0.2.17-alpha.
- Handle spacing between bricks correctly in the libs command when passing in
skip:dev.
Thanks @seancorfield for helping out with issue #312 and for PR #268 and #269.
Thanks @lread for PR #319, #332, #327, and more!
Thanks @john-shaffer for PR #323.
Thanks Borkdude for creating Edamame and the support to get started with it.
Worth mentioning is that the clojure2d worked really well for imag...
