I am trying to migrate my sources from source files to my local directory. The files are imported correctly but while generating rules I am running into below error.
Error running command vscode-ibmi-projectexplorer.projectExplorer.migrateSource: Request generateBuildFile failed with message: All service programs must be in the same directory.. This is likely caused by the extension that contributes vscode-ibmi-projectexplorer.projectExplorer.migrateSource.
This does not happen when there is only single service program.
I have tried many things and it appears that I am doing something wrong. I am attaching a sample project I have created and replicated the error. I tried to ask on the ibmi-bob repository as well but did not get any response yet and figured this is the correct place as the error is generated here.
|
if (this.targets.binderRequired()) { |
|
const servicePrograms = this.targets.getResolvedObjects(`SRVPGM`); |
|
const relativePaths = servicePrograms.map(sp => path.dirname(sp.relativePath)); |
|
|
|
if (relativePaths.length === 1) { |
|
// We know the rules |
|
bnddirRulesDir = relativePaths[0]; |
|
} else if (relativePaths.length > 1) { |
|
throw new Error(`All service programs must be in the same directory.`); |
|
} |
|
} |
|
|
I think the array relativePaths needs to be filtered on unique values before checking if(relativePaths.length === 1) as it will likely to have more than 1 path values. Appears to be a bug.
Sample source: EmpMgmt.zip
Do let me know if anything else is required.
I am trying to migrate my sources from source files to my local directory. The files are imported correctly but while generating rules I am running into below error.
Error running command vscode-ibmi-projectexplorer.projectExplorer.migrateSource: Request generateBuildFile failed with message: All service programs must be in the same directory.. This is likely caused by the extension that contributes vscode-ibmi-projectexplorer.projectExplorer.migrateSource.This does not happen when there is only single service program.
I have tried many things and it appears that I am doing something wrong. I am attaching a sample project I have created and replicated the error. I tried to ask on the ibmi-bob repository as well but did not get any response yet and figured this is the correct place as the error is generated here.
sourceorbit/cli/src/builders/bob.ts
Lines 56 to 67 in 4eaf426
I think the array relativePaths needs to be filtered on unique values before checking
if(relativePaths.length === 1)as it will likely to have more than 1 path values. Appears to be a bug.Sample source: EmpMgmt.zip
Do let me know if anything else is required.