Thank you for response. I think that I found solution, but I am not sure about it correctness.
> Please elaborate. What do you mean by "wrong"?
I mean that I need settings from 'This' scope, but task returns settings from other scopes like:
[info] core == root
[info] ui-view-modificator-dialogs == root
[info] ui-model-definition-dialogs == root
[info] root == root
[success] Total time: 0 s, completed 14.04.2013 22:58:48
So I want to
core == core
ui-view-modificator-dialogs == ui-view-modificator-dialogs
an so on.
> It is rarely necessary to use State in a task. It is really intended for commands. What is the use case?
The case is that I need more than 15 argument and I don't want to define
implicit def t22ToTable22[A,B,C,D,E,F,G,H,I,J,K,L,N,O,P, ....](t15: (ScopedTaskable[A], ...
Right now I find the next working scheme
state, thisProjectRef, ... =>
val extracted: Extracted = Project.extract(state)
val thisScope = Load.projectScope(thisProjectRef)
val result = for {
appConfiguration <- appConfiguration in thisScope get extracted.structure.data
ivyLoggingLevel <- ivyLoggingLevel in thisScope get extracted.structure.data
ivyScala <- ivyScala in thisScope get extracted.structure.data
name <- name in thisScope get extracted.structure.data
pathTarget <- target in thisScope get extracted.structure.data
updateConfiguration <- updateConfiguration in thisScope get extracted.structure.data
dependencyAddCustom <- dependencyAddCustom in thisScope get extracted.structure.data
dependencyIgnoreConfiguration <- dependencyIgnoreConfiguration in thisScope get extracted.structure.data
dependencyResourceFilter <- dependencyResourceFilter in thisScope get extracted.structure.data
} yield { ...
Is there more legal way to do this?
SBT has beautiful, easy to read code, but there are no comment in interesting places for me.
And I have no time to read it all :-( for complete understanding of your logic.
Thank you very much for SBT.
King regards,
Alexey
понедельник, 15 апреля 2013 г., 19:11:54 UTC+4 пользователь Mark Harrah написал: