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: reinstate --all-sub-project support for Gradle #732

Merged
merged 1 commit into from
Aug 13, 2019

Conversation

kyegupov
Copy link
Contributor

@kyegupov kyegupov commented Aug 13, 2019

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

Fixes --all-sub-project flag broken by the Gradle plugin upgrade.
Also, fully use the plugin type definitions from the snyk-cli-interface package.

@kyegupov kyegupov requested a review from a team as a code owner August 13, 2019 19:08
@ghost ghost requested review from dkontorovskyy and lwywoo August 13, 2019 19:08
@kyegupov kyegupov self-assigned this Aug 13, 2019
Copy link
Contributor

@orsagie orsagie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If changing to scannedProject, please do so everywhere.

};
} else {
// We are using "options" to store some information returned from plugin that we need to use later,
// but don't want to send to Registry in the Payload.
// TODO(kyegupov): decouple inspect and payload so that we don't need this hack
options.subProjectNames = inspectRes.depRoots.map((depRoot) => depRoot.depTree.name);
options.subProjectNames = inspectRes.scannedProjects.map((depRoot) => depRoot.depTree.name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to scannedProject variable name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed (+ all mentions of "depRoot" ever)

@@ -263,7 +262,7 @@ async function assembleLocalPayloads(root, options: Options & TestOptions): Prom
const deps = await getDepsFromPlugin(root, options);
analytics.add('pluginName', deps.plugin.name);

for (const depRoot of deps.depRoots) {
for (const depRoot of deps.scannedProjects) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@@ -632,7 +632,7 @@ test('`test gradle-app --all-sub-projects` returns correct multi tree meta', asy
async inspect() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add the return type here, so we know it's the right one we are building?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@kyegupov kyegupov merged commit 1c72746 into master Aug 13, 2019
@kyegupov kyegupov deleted the fix/all-sub-projects branch August 13, 2019 20:15
@snyksec
Copy link

snyksec commented Aug 13, 2019

🎉 This PR is included in version 1.216.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants