Skip to content

Fix parsing of gradle dependency tree - #500

Merged
zlav merged 3 commits into
fossas:masterfrom
pascal-hofmann:master
Aug 9, 2019
Merged

zlav merged 3 commits into
fossas:masterfrom
pascal-hofmann:master

Conversation

@pascal-hofmann

@pascal-hofmann pascal-hofmann commented Aug 5, 2019 •

Copy link
Copy Markdown
Contributor

In one of my projects I have a gradle dependency tree that looks like this:

-api (n)
No dependencies

-runtime (n)
\--- org.jetbrains.kotlin:kotlin-stdlib:1.3.30 (n)
[…]

This breaks the gradle analyzer. It bails out with the error message

FATAL Could not analyze: bad depth: 1 -api (n) []string{"-api (n)", "-", "api (n)"}

This PR improves the regex used to match gradle dependencies based on the possible output generated by gradle (see https://github.com/gradle/gradle/blob/e975872ae2cf1d521b73f1107cae772ca09c63cd/subprojects/core/src/main/java/org/gradle/internal/graph/GraphRenderer.java)

@CLAassistant

CLAassistant commented Aug 5, 2019 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment thread buildtools/gradle/gradle.go Outdated
@codecov

codecov Bot commented Aug 5, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #500 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #500   +/-   ##
======================================
  Coverage    52.4%   52.4%           
======================================
  Files         103     103           
  Lines        5761    5761           
======================================
  Hits         3019    3019           
  Misses       2461    2461           
  Partials      281     281
Impacted Files Coverage Δ
buildtools/gradle/gradle.go 59.19% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 235c833...d5ce1f3. Read the comment docs.

@pascal-hofmann

pascal-hofmann commented Aug 5, 2019 •

Copy link
Copy Markdown
Contributor Author

cla-assistant.io is down right now. Will sign the CLA once it is back up…

Edit: This is done (signed) now.

@dchenk dchenk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for the proposed fix. One comment about the regex.

Comment thread buildtools/gradle/gradle.go Outdated
Co-Authored-By: Dmitriy <dchenk@users.noreply.github.com>
@pascal-hofmann

Copy link
Copy Markdown
Contributor Author

Hey, do I still need to do something to get this merged?

@dchenk

dchenk commented Aug 7, 2019

Copy link
Copy Markdown

Apologies for the delayed response. I was going to investigate why the CI tests failed. I'd like to get this merged soon.

Comment thread buildtools/gradle/gradle.go Outdated
Co-Authored-By: Dmitriy <dchenk@users.noreply.github.com>

@dchenk dchenk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks a lot!

@zlav
zlav merged commit 7e64aa9 into fossas:master Aug 9, 2019
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.

5 participants