Skip to content

Is it possible to extend a dynamic cross module in package.mill? #4102

Answered by lihaoyi
asarkar asked this question in Q&A
Discussion options

You must be logged in to vote

No, module-level package.mills always translate into normal Modules, not Cross modules. And modules can only be defined in one place, so if it's defined in build.mill it cannot be defined in a nested package.mill, and vice versa

If you are finding a lot of modules needing special configuration, then instead of using a cross module you can use normal modules and traits to extract out the commonalities. That would let you more easily mix and max things, e.g. having each module inherit different sets of traits, or easily adding overrides specific to each specific module

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by asarkar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants