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 for Maximum call stack size exceeded error #19

Conversation

maartengryp-liantis
Copy link

@maartengryp-liantis maartengryp-liantis commented Feb 9, 2023

Referencing #13

A "Maximum call stack size exceeded error" can be simulated with a POM file containing a single dependency

<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>2.0.54.Final</version>

--- maven-dependency-plugin:2.8:tree (default-cli) @ bookstore-v3 ---
be.liantis:bookstore-v3:jar:0.0.1-SNAPSHOT
- io.netty:netty-tcnative-boringssl-static:jar:2.0.54.Final:compile
+- io.netty:netty-tcnative-classes:jar:2.0.54.Final:compile
+- io.netty:netty-tcnative-boringssl-static:jar:linux-x86_64:2.0.54.Final:compile
+- io.netty:netty-tcnative-boringssl-static:jar:linux-aarch_64:2.0.54.Final:compile
+- io.netty:netty-tcnative-boringssl-static:jar:osx-x86_64:2.0.54.Final:compile
+- io.netty:netty-tcnative-boringssl-static:jar:osx-aarch_64:2.0.54.Final:compile
- io.netty:netty-tcnative-boringssl-static:jar:windows-x86_64:2.0.54.Final:compile

Transitive dependencies, e.g. netty-tcnative-boringssl-static:jar:linux-x86_64, with a classifier (linux-x86_64) are registered as dependencies with a PackageURL equal to the packageURL of the parent netty-tcnative-boringssl-static. As a result, the recursive 'addTransitiveDeps" function never ends ==> Maximum call stack size exceeded

Can be avoided by checking for an unique dependency namespace or dependency name before adding the actual dependency.... Simple test updated to reflect this special case

peter-murray added a commit that referenced this pull request Feb 22, 2023
…pect to PackageURLs so as to properly disambiguate to types and calssifiers, as reported in #19
@peter-murray
Copy link
Contributor

This was fixed by expanding the support for the Maven coordinate system in to the PackageURLs (type and classifier). Thank you for reporting and the suggested fix.

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.

2 participants