Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Conversation

keynmol
Copy link
Contributor

@keynmol keynmol commented Nov 18, 2020

I thought that it would be useful for, say, defining project-wide settings that vary depending on the platform.

Having access to all of the axes can help separate the settings from the raw project matrix definition.

If this doesn't fit with projectmatrix vision, I'm happy not to pursue and just add the recommended approach (once I know it) to the documentation :)

TODO:

  • Document the new task key

@eed3si9n
Copy link
Member

So you want to make the subproject self-aware about their virtual axes? I think that's a great idea.

.gitignore Outdated
Comment on lines 1 to 17
.bloop
.metals

target

project/.bloop
project/target
project/project/target

*.class

metals.sbt

src/sbt-test/projectMatrix/projectAxes/target
src/sbt-test/projectMatrix/projectAxes/project/target


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove it from the PR, can always keep a local copy for myself :)

@@ -0,0 +1 @@
sbt.version=1.4.0-M1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think so, I copypasted the one of the jvm ones I think :)

It's also present in two other projects:

./src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/project/build.properties
./src/sbt-test/projectMatrix/jvm-sandwich/project/build.properties

I can remove those if you want?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently those are the only ones that were actually needed :D Kept them.

import scala.language.experimental.macros

trait ProjectMatrixKeys {
val projectAxes = settingKey[Seq[VirtualAxis]]("Virtual axes for the project")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling this projectAxes I think is confusing because we already have subproject axis. What do you think about calling it virtualAxes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, will rename

@eed3si9n eed3si9n changed the title Expose project axes Make the generated subproject self-aware about its own virtual axes Nov 18, 2020
@keynmol keynmol force-pushed the expose-project-axes branch from 88b094b to c58f78c Compare November 19, 2020 12:55
@keynmol
Copy link
Contributor Author

keynmol commented Nov 19, 2020

Seems like the test on native has been failing before these changes: https://github.com/sbt/sbt-projectmatrix/runs/1371093404

I'm gonna try to track it down with the lovely folks from SN: https://gitter.im/scala-native/scala-native?at=5fb676fbc10273610a15bdba

UPDATE: doesn't seem to be related to projectmatrix, I've reproduced it in scala-native/scala-native#2024 on a regular build

@eed3si9n eed3si9n merged commit 0843222 into sbt:master Dec 2, 2020
@keynmol keynmol deleted the expose-project-axes branch December 2, 2020 08:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants