Skip to content

Support adding brick as :extra-deps for a Polylith workspace in development #2554

@tengstrand

Description

@tengstrand

The Polylith architecture comes with the poly tool written for Clojure that is based on tools.deps.

I've been working on issue-66 for a while in the issue-66 branch to support defining bricks as :extra-deps instead of :extra-paths, see deps.edn.

This works fine in e.g. Emacs/Cider and VSCode/Calva but not in IDEA/Cursive.
What happens is that the src directories are not recognised by Cursive and will therefore not show up as green.

Instead of this:
brick-defined-using-extra-paths

...we get this:
brick-defined-using-extra-deps

The good part is that the code is recognised by the REPL, but unfortunately not by the IDE.

The workaround is to add them as :extra-paths, but it would be much better if they could be added as :extra-deps instead:

  • It would be consistent with how bricks are added to other projects (development is a special kind of project).
  • Instead of defining two paths, src and resources, we can define one dependency per brick, resulting in less code.
  • If a resources directory is added or removed from a brick, the change will automatically be detected by tools.deps.

Some teams will probably start to use the :extra-deps way of defining bricks in development, which unfortunately will stop people that joins the team from using Cursive. With better support in Cursive, this could be avoided.

Regards,
Joakim Tengstrand

Metadata

Metadata

Assignees

No one assigned

    Labels

    newMarks issues describing new featuresreleasedMarks issues which have had the fixes released in a stable build

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions