Reputation: 703
sbt "scopes" its tasks and settings. Documentation talks about the "scope axes" One of them is the "configuration axis" which seems to be magically selected for the evaluation of a task. Evaluate "compile" and the configuration scope is "Compile". Evaluate "test" and the configuration scope is "Test".
I cannot find anything in the documentation on how this selection is done. The most specific description on this topic I found was in James Roper's "all that jazz" blog. It says:
When you don’t specify a scope, sbt will choose a default scope, in this case it has chosen the "compile" scope. The logic in how it makes that decision we won’t cover here.
Pretty terse, actually. So, my questions:
Is there anywhere else a coverage on that specific "logic"?
How does sbt choose the "configuration" scope it applies to the task/settings evaluation?
Which "configuration" scope values exist? Is this a fixed list? Where do the existing configuration scope values come from? How (and why) to create new ones?
Is there any "general idea" behind this whole scoping thing?
I feel that this is a key to understand sbt in general but I must admin that I currently have almost no clue on how sbt acts here and why it acts like this. Can anyone enlighten me?
Upvotes: 0
Views: 111