@@ -187,7 +187,7 @@ bool WorkspaceUpdate::Run(Deployer* deployer) {
187
187
the<ResourceResolver> resolver (
188
188
Service::instance ().CreateResourceResolver (
189
189
{" schema" , " " , " .schema.yaml" }));
190
- auto build_schema = [&](const string& schema_id) {
190
+ auto build_schema = [&](const string& schema_id, bool as_dependency = false ) {
191
191
if (schemas.find (schema_id) != schemas.end ()) // already built
192
192
return ;
193
193
LOG (INFO) << " schema: " << schema_id;
@@ -199,8 +199,13 @@ bool WorkspaceUpdate::Run(Deployer* deployer) {
199
199
else {
200
200
schema_path = schemas[schema_id];
201
201
}
202
- if (schema_path.empty ()) {
203
- LOG (WARNING) << " missing schema file for '" << schema_id << " '." ;
202
+ if (schema_path.empty () || !fs::exists (schema_path)) {
203
+ if (as_dependency) {
204
+ LOG (WARNING) << " missing input schema; skipped unsatisfied dependency: " << schema_id;
205
+ } else {
206
+ LOG (ERROR) << " missing input schema: " << schema_id;
207
+ ++failure;
208
+ }
204
209
return ;
205
210
}
206
211
the<DeploymentTask> t (new SchemaUpdate (schema_path));
@@ -228,7 +233,8 @@ bool WorkspaceUpdate::Run(Deployer* deployer) {
228
233
if (!dependency)
229
234
continue ;
230
235
const string& dependency_id = dependency->str ();
231
- build_schema (dependency_id);
236
+ bool as_dependency = true ;
237
+ build_schema (dependency_id, as_dependency);
232
238
}
233
239
}
234
240
}
0 commit comments