Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pacmak): go local replace do not respect --outdir in some cases #2584

Merged
merged 4 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/jsii-pacmak/lib/targets/go.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ export class Golang extends Target {
const moduleDir = tryFindLocalModule(baseDir, dep);
if (moduleDir) {
replace[dep.goModuleName] = moduleDir;

// we found a replacement for this dep, we can stop searching
break;
}
}

Expand Down
6 changes: 3 additions & 3 deletions packages/jsii-pacmak/test/build-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ OPTS="--dotnet-nuget-global-packages-folder=${NUGET_CACHE}"
# Single target, recursive build to a certain location
clean_dists
echo "Testing SINGLE TARGET, RECURSIVE build."
../bin/jsii-pacmak ${OPTS} -o ${outdir} --recurse ../../jsii-calc
../bin/jsii-pacmak ${OPTS} -v -o ${outdir} --recurse ../../jsii-calc

# Multiple targets, build one-by-one into own directory
clean_dists
echo "Testing ONE-BY-ONE build."
for dir in $packagedirs; do
../bin/jsii-pacmak ${OPTS} $dir
../bin/jsii-pacmak ${OPTS} -v $dir
done

# Multiple targets, build all at once into own directory
clean_dists
echo "Testing ALL-AT-ONCE build."
../bin/jsii-pacmak ${OPTS} --no-parallel $packagedirs
../bin/jsii-pacmak ${OPTS} -v --no-parallel $packagedirs