@@ -40,16 +40,16 @@ final case class InputsComposer(
40
40
def getModuleInputs : Either [BuildException , Seq [ModuleInputs ]] =
41
41
if allowForbiddenFeatures then
42
42
findModuleConfig match {
43
- case Right (Some (path )) =>
44
- val configText = os.read(path )
43
+ case Right (Some (moduleConfigPath )) =>
44
+ val configText = os.read(moduleConfigPath )
45
45
for {
46
46
table <-
47
47
toml.Toml .parse(configText).left.map(e =>
48
48
ModuleConfigurationError (e._2)
49
49
) // TODO use the Address value returned to show better errors
50
50
modules <- readAllModules(table.values.get(Keys .modules))
51
51
_ <- checkForCycles(modules)
52
- moduleInputs <- fromModuleDefinitions(modules)
52
+ moduleInputs <- fromModuleDefinitions(modules, moduleConfigPath )
53
53
} yield moduleInputs
54
54
case Right (None ) => basicInputs
55
55
case Left (err) => Left (err)
@@ -177,7 +177,7 @@ final case class InputsComposer(
177
177
* @return
178
178
* a list of module inputs for the extracted modules
179
179
*/
180
- private def fromModuleDefinitions (modules : Seq [ModuleDefinition ])
180
+ private def fromModuleDefinitions (modules : Seq [ModuleDefinition ], moduleConfigPath : os. Path )
181
181
: Either [BuildException , Seq [ModuleInputs ]] = either {
182
182
val moduleInputsInfo = modules.map(m => m -> value(inputsFromArgs(m.roots)))
183
183
@@ -188,6 +188,7 @@ final case class InputsComposer(
188
188
val moduleDeps : Seq [ProjectName ] = moduleDef.dependsOn.map(projectNameMap)
189
189
190
190
inputs.dependsOn(moduleDeps)
191
+ inputs.withForcedWorkspace(moduleConfigPath / os.up)
191
192
}
192
193
193
194
moduleInputs
0 commit comments