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

Reduce One Level of Indirection When Generating CI Tests #154

Open
khajavi opened this issue Mar 11, 2023 · 0 comments
Open

Reduce One Level of Indirection When Generating CI Tests #154

khajavi opened this issue Mar 11, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@khajavi
Copy link
Member

khajavi commented Mar 11, 2023

Currently, when we want to generate CI Tests, we need to create these two sbt settings manually:

  • supportedScalaVersions
  • supportedJavaVersions

An example of supportedScalaVersions:

supportedScalaVersions := Map(
      (core.js / thisProject).value.id                  -> (core.js / crossScalaVersions).value,
      (core.jvm / thisProject).value.id                 -> (core.jvm / crossScalaVersions).value,
      (core.native / thisProject).value.id              -> (core.native / crossScalaVersions).value,
      (coreTests.js / thisProject).value.id             -> (coreTests.js / crossScalaVersions).value,
      (coreTests.jvm / thisProject).value.id            -> (coreTests.jvm / crossScalaVersions).value,
      (coreTests.native / thisProject).value.id         -> (coreTests.native / crossScalaVersions).value,
      ...
      ...
      ...
  )

Currently, we must manually create the supportedScalaVersions and supportedJavaVersions settings in sbt when generating CI tests. However, this approach becomes tedious and error-prone, particularly as the number of submodules increases. To address this issue, we need to develop a way to automatically generate these settings by iterating over each project and extracting its settings.

However, we cannot simply use a regular map or flatMap function to iterate over the submodules. Instead, we must leverage internal sbt functionalities and macros to achieve this. The current workaround of manually creating these settings is not a sustainable solution, and we should seek to automate this process for improved efficiency and maintainability.

@khajavi khajavi added enhancement New feature or request help wanted Extra attention is needed labels Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant