No report output: how to debug

187 views
Skip to first unread message

Glyn Normington

unread,
May 13, 2016, 7:40:25 AM5/13/16
to license-finder
I’m having trouble with license finder 2.1.0. The report option runs perfectly on Mac but produces no output on Ubuntu. I couldn't find the `—debug` option which was mentioned in the README. What's the best way to debug this behaviour?

Mike Dalessio

unread,
May 13, 2016, 7:45:00 AM5/13/16
to Glyn Normington, license-finder

What command are you running?

I recommend using the"report" command to generate a csv that summarizes dependencies and licenses.

Unfortunately the default action does appear to have everything some  us which were reported to me for the first time yesterday.

On May 13, 2016 7:40 AM, "Glyn Normington" <gnorm...@pivotal.io> wrote:
I’m having trouble with license finder 2.1.0. The report option runs perfectly on Mac but produces no output on Ubuntu. I couldn't find the `—debug` option which was mentioned in the README. What's the best way to debug this behaviour?

--
You received this message because you are subscribed to the Google Groups "license-finder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to license-finde...@googlegroups.com.

Glyn Normington

unread,
May 13, 2016, 10:58:24 AM5/13/16
to Mike Dalessio, license-finder
I'm running:

$ license_finder report --gradle-command=./gradlew --recursive

I've tried various Ruby versions (1.9.3, 2.0.0, 2.3.1) to no avail. Strangely, I can get this command to run fine (sometimes) in an Ubuntu virtualbox VM, but it always seems to produce no output inside a Concourse job.

Debugging the Ruby code a bit, it seems like the Gradle package manager isn't getting a look in. I put a print statement inside the package_path method, thus:

def package_path
      puts "Gradle::package_path"
      project_path.join('build.gradle')
end

and this did not appear in the output (but other print statement output did). Also, when I force debug on by editing cli/main.rb, the following logs were produced:

LicenseFinder::GoDep: is not installed
LicenseFinder::GoWorkspace: is not installed
LicenseFinder::GoVendor: is not installed
LicenseFinder::Bundler: is installed
LicenseFinder::Bundler: is not active
LicenseFinder::NPM: is not installed
LicenseFinder::Pip: is not installed
LicenseFinder::Bower: is not installed
LicenseFinder::Maven: is not installed
LicenseFinder::Gradle: is not installed
LicenseFinder::CocoaPods: no command defined
LicenseFinder::CocoaPods: is not active
LicenseFinder::Rebar: is not installed
LicenseFinder::Nuget: no command defined
LicenseFinder::Nuget: is not active
--
Regards,
Glyn

Mike Dalessio

unread,
May 13, 2016, 11:47:53 AM5/13/16
to Glyn Normington, license-finder
Hi Glyn,

Running the `report` command writes to a `license_report.csv` file containing the output. Generally speaking, license finder emits very little information to STDOUT.

I'm happy to pair with you a bit on this when you're back from holiday.

-m

Glyn Normington

unread,
May 16, 2016, 4:06:06 AM5/16/16
to Mike Dalessio, license-finder
Thanks Mike. I'll probably take you up on the offer, modulo our time difference.

Please note that the same version of license finder produces plenty of standard output on Mac but none on Ubuntu/Concourse.
--
Regards,
Glyn

Mike Dalessio

unread,
May 16, 2016, 8:06:13 AM5/16/16
to Glyn Normington, license-finder

On Mon, May 16, 2016 at 4:06 AM, Glyn Normington <gnorm...@pivotal.io> wrote:
Please note that the same version of license finder produces plenty of standard output on Mac but none on Ubuntu/Concourse.

Not sure why this would be. The only thing I can think of without debugging your particular situation is that it is possible you have a decisions file on your local Mac that's not checked in and therefore not available to the concourse job?


Glyn Normington

unread,
May 24, 2016, 12:21:10 PM5/24/16
to license-finder, gnorm...@pivotal.io
Mike found that license finder was using a hard-coded gradle command regardless of the value specified on the --gradle-command switch. A fix will appear in due course.

Mike Dalessio

unread,
May 26, 2016, 6:52:31 PM5/26/16
to Glyn Normington, license-finder
I've created https://github.com/pivotal/LicenseFinder/issues/222 to track this issue.

Glyn, thanks again for reporting this and helping me understand it!


Reply all
Reply to author
Forward
0 new messages