-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor API for proper sub-project generation flexibility #55
Comments
A first fix could to be to provide another overload of def customRow(
autoScalaLibrary: Boolean,
axisValues: Seq[VirtualAxis],
process: (Seq[VirtualAxis], Project) => Project
): ProjectMatrix The idea is that within the |
I tend to agree - we've worked around it in Weaver by providing syntax extensions to the ProjectMatrix, i.e. this one Along with Adding this more powerful version of |
The return type of
So once you get to it, I am guessing you can do whatever you want with it like: lazy val core12 = core.jvm("2.12.13")
.enablePlugins(....)
.settings(....) |
@eed3si9n it seems to me that the core value proposition of lazy val core = (projectMatrix in file("core"))
.settings(...)
... and have all incarnations of the If I have to split out individual module incarnations into their own |
@keynmol Interesting! Thank you for the pointer! |
ProjectRefs just contains the internal URL of the subproject so it should just work even if you split out a few of the exceptional subprojects into lazy vals. Assuming it works, I feel like that gives best of both worlds (matrix and subproject) without re-learning everything. |
The basic idea behind the plugin is great: provide a "generation" layer on top of the SBT project/module that allows for convenient, programmatic generation of sub-projects/modules along a number of axes.
However, it feels like the current API falls short of providing the user with actual and proper access to the generative power of the underlying approach. The only way in which the user can actually configure a project based of the actual point in the n-dimensional matrix is "inside" the definition of individual settings/tasks, via the
virtualAxes
key.Things that I'd like to do for certain points along the matrix axes but not for others (which are clunky or even impossible with the current API):
All of this would be easy with an API that, for example, allows the user to supply a function
(Matrix.Point, Project) => Option[Project]
along with helpers that make it easier to have things like.dependsOn(...)
point to the "right" (TM) target module.Essentially, the current API provides a limited framework, which exposes the power of the basic approach only for certain, relatively simple uses cases. It would be great to turn this around and provide a toolbox, which provides helpers to make hard things easier but doesn't artificially restrict generative power.
The text was updated successfully, but these errors were encountered: