Don't implement support for multiple workspace #470
Replies: 7 comments 4 replies
-
Well, I was very skeptical of the multiple workspaces (in a single repo) right from the get-go so I'm glad to hear you now think this is unreasonably complex to support. I was never convinced that mixed Clojure/Script projects really needed separate workspaces that shared code -- either a single workspace (for shared code) or completely separate repos (for no shared code). I do accept that something needs to be done to support |
Beta Was this translation helpful? Give feedback.
-
We never were looking for multiple workspaces but mainly for support of ClojureScript to be honest. I don't really see why you would need separate workspaces for backend and frontend. To me that seem like different projects. |
Beta Was this translation helpful? Give feedback.
-
The only real need for us would be CLJS support in polylith, and even that, it's just 'nice to have'. I think if I ever leveraged multiple workspaces feature, my team would think i've complected our codebase. I haven't had time to dive deep yet into polylith support for publishing libraries, but that's something I would use, e.g. we have a sister java project that can reuse some of our clojure code packaged in a lib, and maybe that is also a good way to share code with a CLJS project, that's located in a different git repo. |
Beta Was this translation helpful? Give feedback.
-
Wow, this is terrible news! 😞 And it seems like I'm the only one who sees real value in how this feature can become a lever to benefit a real business use case. I've been waiting for it for all these months. For my undertaking, this solution was a workable way to split a monorepo into multiple workspaces, most of which are for end products (with deliverables), and the remaining code is allocated to the common platform. This approach allows us to achieve the following goals:
and probably even more. All these while preserving the main advantages that the Polylith architecture provides, i.e allowing the teams, especially the platform one, to make changes to shared components in a predictable and controlled manner, with immediate feedback from the entire codebase (thanks to the fact that it's still a monorepo and not a set of interdependent versioned libraries). Leaving aside the organizational aspect, we can also talk about the goals related to structuring / factoring:
I understand that this level of complexity is not what an average Polylith workspace requires. Even the largest ones get away with what is available OOTB (salute, @seancorfield). And, of course, I will accept any decision you make, Joaquim @tengstrand. |
Beta Was this translation helpful? Give feedback.
-
Complex life forms definitely cross this line. For example, the human body is a sheer engineer nightmare. 😄 |
Beta Was this translation helpful? Give feedback.
-
Hi @marksto!
This is already supported by a single workspace.
Yes, that's true, but fortunately we don't have to maintain the body as code! |
Beta Was this translation helpful? Give feedback.
-
In my view, this feature is critical both to my needs and to Polylith's future. Without this feature, sure, modules (components, bases, projects, views, etc.) can be broken down into bricks, so that as long as everything fits within a single repo everything's fine, but producing an source code artifact is limited to pulling together repo-internal bricks and external projects, but even the docs discourage generating more than one source code artifact from a workspace and recommends using multiple workspaces instead, which naturally without this feature is difficult to do. While I agree that supporting (and necessitating this) is overkill just for cljs support, with this feature, workspaces are self-similar enough to where we won't be limited in composing and splitting workspaces even across repos, allowing e.g.:
Not that we usually have these things for external dependencies, but this feature would allow us to enjoy these benefits for external dependencies which happen to be polylith workspaces, which would enable a polylith-all-the-way-down situation as long as you stay within polylith land, so to speak. All of this would require decoupling the concepts of 'repo' and 'workspace' thoroughly throughout the code, or else allow composability with some arbitrary restriction like "only one workspace per repo", and though I haven't went over the code I'm presuming most of aforementioned "ugly complexity" this feature necessitated is related to this, in particular as it relates to the CLI, so perhaps it is pertinent to make some concessions, but some form of this feature is critical to my using polylith and, I believe, to the future of polylith. |
Beta Was this translation helpful? Give feedback.
-
I've been working on supporting multiple workspaces (issue #431) for several months now, by pushing 20 snapshot releases to the master branch, and now I'm thinking of reverting all that work.
There are two main reasons for this:
projects
directory. All the bricks will be mixed in thecomponents
andbases
directories.The complexity price just got too high. See also discussion #301.
My number one design rule for the last twenty years has been "If it's ugly then it's wrong" ("Är det fult så är det fel" in Swedish). This time, that rule struck.
Beta Was this translation helpful? Give feedback.
All reactions