Skip to content
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

Support for mixed-style matrix dependencies #13

Closed
rtimush opened this issue May 17, 2019 · 3 comments · Fixed by #21

Comments

@rtimush
Copy link

@rtimush rtimush commented May 17, 2019

If I understand correctly, at the moment if one project depends on another they should use the same suffix ids. This makes the following scenario impossible:

lazy val core = (projectMatrix in file("core"))
  .jvmPlatform(scalaVersions = Seq("2.12.8", "2.11.12"))

lazy val coreConfigIntegration = (projectMatrix in file("config"))
  .dependsOn(core)
  .crossLibrary(
    scalaVersions = Seq("2.12.8", "2.11.12"),
    suffix = "Config1.2",
    settings = Seq(libraryDependencies += "com.typesafe" % "config" % "1.2.1")
  )
  .crossLibrary(
    scalaVersions = Seq("2.12.8"),
    suffix = "Config1.3",
    settings = Seq(libraryDependencies += "com.typesafe" % "config" % "1.3.3")
  )

The core project is cross-build for different scala versions, and the coreConfigIntegration project should use the matching scala version. It would be nice if this was supported.

@eed3si9n

This comment has been minimized.

Copy link
Member

@eed3si9n eed3si9n commented May 17, 2019

Maybe we can provide a flavor of .dependOn(...) that can specify a specific row/platform.

@rtimush

This comment has been minimized.

Copy link
Author

@rtimush rtimush commented May 17, 2019

For now, I found a verbose workaround to specify dependencies on the generated subprojects:

lazy val coreConfigIntegration12_212 = coreConfigIntegration.crossLib("Config1.2")("2.12.8").dependsOn(core.jvm("2.12.8")
lazy val coreConfigIntegration12_211 = coreConfigIntegration.crossLib("Config1.2")("2.11.12").dependsOn(core.jvm("2.11.12")
...

I remember in some other cross-building plugin there was a concept of cross-building "axes". With this concept dependsOn could select a dependency that has a matching subset of axes (like here coreConfigIntegration has a "platform" and a "config" axes, and the core project has only "platform").

@eed3si9n

This comment has been minimized.

Copy link
Member

@eed3si9n eed3si9n commented May 17, 2019

It would be interesting to explore that concept.

eed3si9n added a commit that referenced this issue Nov 4, 2019
Fixes #13
Fixes #14

This adds the notion of VirutalAxis that allows the matrix to define strong or weak axis.
@eed3si9n eed3si9n closed this in #21 Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.