if(!pendingKey.empty()){r.error="truncated array";return r;} if(!any){r.error="empty vix.module";return r;} if(!r.manifest.name.empty()&&!valid_name(r.manifest.name)){r.error="invalid module name";return r;} for(auto &d:r.manifest.gitDependencies){if(d.git.empty()){r.error="Git dependency '"+d.name+"' is missing field 'git'";return r;} int n=(!d.tag.empty())+(!d.branch.empty())+(!d.rev.empty());if(n>1){r.error="Git dependency '"+d.name+"' must use only one of tag, branch, or rev";return r;} if(!d.target.empty())d.targets.push_back(d.target); std::set<std::string> opts;for(constauto&o:d.cmakeOptions)if(!opts.insert(o.first).second){r.error="duplicate CMake option: "+o.first;return r;}} return r;