Skip to content

Releases: polyfy/polylith

Version 0.3.32

29 Dec 13:40
4b41adb

Choose a tag to compare

Included in this 0.3.32 release:

Issues and PRs:

  • Fix npm scoped package handling in libs command, PR 593
  • Upgrade to edamame 1.5.36, PR 595/596

Doc updates

Thanks borkdude for PR 595.

Version 0.3.31

17 Nov 06:50
95bdceb

Choose a tag to compare

Included in this 0.3.31 release:

Issues and PRs:

  • Fix Java 21 compatibility by upgrading core.rrb-vector to 0.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

18 Oct 11:32
20b2a8b

Choose a tag to compare

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:

RealWorld example

For existing workspaces:

  • Set :validations in workspace.edn, see example here.
  • Make sure to use the latest 0.7.0 version of the external test runner (if you use it).

Changes:

  • The :libraries attributes has been added to the workspace structure, and the version has been bumped to 5.1.
    See versions for details.
  • The :workspaces key is no longer mandatory in the workspace root package.json file.
  • Warnings are no longer shown when starting a shell with the stand-alone poly command.
  • The set argument is introduced to simplify creation of images with the polyx command (mainly used by maintainers of the poly tool).

Issues and PRs:

  • Filter on libraries in the libs command, issue 558
  • Report libraries using different versions in the workspace, issue 562
  • Use configuration passed in by -Sdeps, issue 574

Version 0.3.0

03 Oct 06:27
e3ce9c3

Choose a tag to compare

clojure script

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 :dialects in workspace.edn, see example here and here.
  • Set :template-data in workspace.edn, see example here.
  • Add a :jvm-opts to your :poly alias in ./deps.edn if you want to remove warnings when starting a shell with clojure -M:poly, see example here.
  • To support ClojureScript:
    • Create a package.json file 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 workspace command:
    • If dialects:DIALECTS is provided, it will be used to set :dialects in workspace.edn to DIALECTS, 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"]) a package.json file will be created.
  • The create component, create base, and create project commands:
    • If DIALECT in dialect:DIALECT is set to cljs, a package.json file will be created.
    • Suggests the dialect argument in the shell, if cljs is listed among the :dialects in workspace.edn.
    • If dialect is not specified, clj will 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.
  • The libs command:
    • NPM dependencies are now included in the list of library dependencies (read from package.json files).
    • The :outdated parameter also checks for outdated npm dependencies.
    • The :update parameter also updates npm dependencies in package.json files.
      • :keep-lib-versions also works for npm dependencies.
      • The libraries:LIBS filtering 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.
  • The info command:
    • If the :dialect argument 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 example j for clj.

      RealWorld example
  • 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 (or switch-ws in 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 c97747aa2b1fdf03c46c7e435cca7c2608740a2a in this section.
    This version ignores cljs namespaces, which would otherwise have caused errors when running the test command.
  • 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

23 Jun 10:29
2790bc3

Choose a tag to compare

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-repo will 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-patterns in 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

10 Aug 20:07
44f5ecb

Choose a tag to compare

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

15 Jul 19:06
73da9a7

Choose a tag to compare

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-versions works 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 the info command when reading the workspace from file.
  • New poly-rcf example workspace that shows how to run 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.

Doc updates

Thanks Mark Sto for PR 482
Thanks Lee Read for PR 490

Version 0.2.19

16 Feb 04:56
e488b44

Choose a tag to compare

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 :test key in :settings in 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 check and test functions to the clj-poly library, documented here.
  • Custom data can be stored in the reserved :custom key 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

Version 0.2.18

20 Dec 07:09
e8feb79

Choose a tag to compare

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 interface and ifc + what's specified in :interface-ns, issue #187.

  • Addition of the new polyx tool that supports the creation of images from the command's output. It includes all functionality in poly plus 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 :include and :exclude for 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 :necessary by that project, see poly help check (warning 207) for details, issue #282.

  • Availability of switch-ws in the shell, outside a workspace, issue #286.

  • The ability to show all available options in a shell, issue #289.

  • Inability to :commit when 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 :outdated to the libs command, issue #294.

  • Updates of outdated examples/docs (solved by issue #312), issue #304.

  • Recognition of test-resources as 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.clj files, issue #316.

  • Use of cljdoc for the poly tool documentation, issue #318.

  • 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 :all option 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 :tap which is equivalent to poly 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-ws in 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 :outdated has 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-changes will now work properly.
  • Removed support for running poly as 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 @sundbry for PR #275

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...

Read more

Version 0.2.17-alpha

09 Dec 12:25
a1581cc

Choose a tag to compare

This release of the poly tool includes PR #266, which solves the bug introduced in the latest release and reported in issue #265.

Thanks, @svdo, for pointing out this issue.