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

feat: init support mvn -D verbose support #164

Closed
wants to merge 5 commits into from

Conversation

anthogez
Copy link
Member

@anthogez anthogez commented Feb 22, 2024

Co-authored-by: Or Sagie or@snyk.io

With this pull request if an user asks for -Dverbose arg that invalidates -DoutputType=dot
We will still digest the mvn cli output despite no longer having a digraph DOT format but a mvn tree.
We generate depGraph/s for single and/or aggregate projects.

@anthogez anthogez changed the title tests: introducing jest suite feat: init support mvn -D verbose support Feb 22, 2024
@anthogez anthogez force-pushed the tests/introducing-jest-suite branch 6 times, most recently from 8ad43b0 to bcbf2d4 Compare March 7, 2024 13:40
@orsagie orsagie force-pushed the tests/introducing-jest-suite branch 2 times, most recently from c390e5f to e7accac Compare March 7, 2024 22:51
@anthogez anthogez force-pushed the tests/introducing-jest-suite branch from 830c4c4 to cae7438 Compare March 8, 2024 11:33
@anthogez anthogez force-pushed the tests/introducing-jest-suite branch 2 times, most recently from 181c0c2 to 4cf2286 Compare March 8, 2024 11:35
@anthogez anthogez marked this pull request as ready for review March 8, 2024 11:35
@anthogez anthogez requested a review from a team as a code owner March 8, 2024 11:35
@anthogez anthogez force-pushed the tests/introducing-jest-suite branch 4 times, most recently from 9644170 to 5c1858a Compare March 8, 2024 12:05
@anthogez anthogez force-pushed the tests/introducing-jest-suite branch from 5c1858a to 289b5f0 Compare March 8, 2024 12:19
lib/index.ts Outdated
@@ -179,7 +179,10 @@ export async function inspect(
cwd: mvnWorkingDirectory,
},
);
const parseResult = parse(result, options.dev);

const includesVerboseFlag = mvnArgs.includes('-Dverbose');
Copy link
Contributor

Choose a reason for hiding this comment

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

not very likely, but what if the command is -Dverbose=false, which is a user trying to disable verbose

Copy link
Member Author

Choose a reason for hiding this comment

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

this is a good one, we will make sure of double check that -Dverbose will be false 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

I wasn't expecting us to reimplement so much. Can we not use -Dverbose with -DoutputType=dot?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not in all versions of the plugin, for this reason we have introduced this change, even though our preference is always -DoutputType=dot

return parseDependency(line);
}

private computeDepth(line: string): number {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this reliable? i think it may break depending what terminal you're running - it's the reason we use dot output

Copy link
Member Author

Choose a reason for hiding this comment

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

we have overly stressed this, as I said it's an incremental change for cases where mvn plugin does not support -Doutputype=dot with -DVerbose

return {
plugin: {
name: 'bundled:maven',
runtime: 'unknown',
meta: {
versionBuildInfo: {
metaBuildVersion: {
mavenVersion,
mavenFullVersion,
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 mavenVersion: mavenFullVersion

anthogez and others added 4 commits March 13, 2024 21:36
Co-authored-by: Or Sagie or@snyk.io

With this pull request if an user asks for -Dverbose arg that invalidates -DoutputType=dot
We will still digest the mvn cli output despite no longer having a digraph DOT format but a mvn tree.
We generate depGraph/s for single and/or aggregate projects.
@orsagie orsagie force-pushed the tests/introducing-jest-suite branch from 9372b43 to ee6264d Compare March 13, 2024 19:46
@anthogez
Copy link
Member Author

work continued here
#168
#169

@anthogez anthogez closed this Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants