Skip to content

RootModule and Cross cannot be applied to the same module (500USD Bounty) #3693

Description

@lihaoyi

From the maintainer Li Haoyi: I'm putting a 500USD bounty on this issue, payable by bank transfer on a merged PR implementing this.

See https://github.com/orgs/com-lihaoyi/discussions/6 for other bounties and the terms and conditions that bounties operate under


Both of them are classs, so neither one can be mixed in.

This couldn't be fixed in Scala 2, as they both need to take parameters (implicit for RootModule, explicit for Cross), and so cannot be traits. But now that main is on Scala 3, this should be doable. Apart from making them both traits, we may need to update the macros in CrossMacros.scala and elsewhere to remove any assumption that these types are classes, and update the parser to allow the Segments string to start with a Segment.Cross e.g. [3.6.3].foo.bar.baz

The end result should be an test build in integration/feature demonstrating both a build.mill and a subfolder/package.mill with object package extends RootModule with Cross(...), and the tests exercising both subfolder[foo].bar as well as [foo].bar` query strings

Metadata

Metadata

Assignees

No one assigned

    Labels

    bountyThe fix/close of this issue is rewarded with a bounty

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions