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

[Gradle] GRADLE_MULTI_THREADED throws an error #1335

Closed
malice00 opened this issue Aug 27, 2024 · 2 comments · Fixed by #1337
Closed

[Gradle] GRADLE_MULTI_THREADED throws an error #1335

malice00 opened this issue Aug 27, 2024 · 2 comments · Fixed by #1337

Comments

@malice00
Copy link
Contributor

To try and speed up the generation of our SBOMs, I tried using GRADLE_MULTI_THREADED. However, this throws an error:

Executing /Users/malice/workspace/android/gradlew properties -q --console plain --build-cache in .
file:///Users/malice/.npm/_npx/ef501a5e90c3661e/node_modules/@cyclonedx/cdxgen/utils.js:2881
    rootProject: subProject,
                 ^

ReferenceError: subProject is not defined
    at executeParallelGradleProperties (file:///Users/malice/.npm/_npx/ef501a5e90c3661e/node_modules/@cyclonedx/cdxgen/utils.js:2881:18)
    at createJavaBom (file:///Users/malice/.npm/_npx/ef501a5e90c3661e/node_modules/@cyclonedx/cdxgen/index.js:1642:37)
    at createBom (file:///Users/malice/.npm/_npx/ef501a5e90c3661e/node_modules/@cyclonedx/cdxgen/index.js:6390:18)
    at file:///Users/malice/.npm/_npx/ef501a5e90c3661e/node_modules/@cyclonedx/cdxgen/bin/cdxgen.js:508:26
    at file:///Users/malice/.npm/_npx/ef501a5e90c3661e/node_modules/@cyclonedx/cdxgen/bin/cdxgen.js:739:3
    at ModuleJob.run (node:internal/modules/esm/module_job:262:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:485:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:109:5)

I think part of this code was copied from the single project call, but there is no parameter subProject. I would have written a PR, but I can't figure out when this object would be used -- not in the code, that's obvious, but I can't reproduce the error that would trigger its usage...

@prabhu
Copy link
Contributor

prabhu commented Aug 27, 2024

@ajmalab any ideas?

@malice00
Copy link
Contributor Author

I took a stab at it, but since I can't reproduce the case where this default fallback object is needed, I'm not sure it this is actually a good/useful solution... If someone can give some input on how to reproduce it, I'll gladly take look at my solution again and make necessary changes. And of course someone else can have a go if they want as well. 😉

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 a pull request may close this issue.

3 participants