github / licensed

A Ruby gem to cache and verify the licenses of dependencies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with Ruby v3, mac and yarn project

tom-quiltt opened this issue · comments

commented

When I use github/licensed in Ruby v3 environment, it works fine for bundler project but error out when I run licensed status or licensed list for yarn project.

When I switch to Ruby v2.7, it works fine.

Note: It might be mac specific issue, Ruby v3 with licensed works fine on linux when running yarn project.

> ruby -v
ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [arm64-darwin21]
  yarn
RSTRING_PTR is returning NULL!! SIGSEGV is highly expected to follow immediately. If you could reproduce, attach your debugger here, and look at the passed string.
/Users/tomlee/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/json-2.6.1/lib/json/common.rb:216: [BUG] Segmentation fault at 0x0000000000000000
ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [arm64-darwin21]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:                    
     * ~/Library/Logs/DiagnosticReports                                     
     * /Library/Logs/DiagnosticReports                                      
   for more details.                                                        
Don't forget to include the above Crash Report log file in bug reports.     

-- Control frame information -----------------------------------------------
c:0034 p:---- s:0197 e:000196 CFUNC  :parse

thanks for opening this.

It looks like the bug you're hitting is with the json gem in version 2.6.1 which was fixed and included in the 2.6.2 release.

I was previously not setting any explicit requirement on the json gem in the gemspec because it's shipped with ruby. To fix this for versions of ruby that use the affected versions of json, I'll need to make the requirement explicit. Should be a quick fix 👍

commented

Thank you so much for fixing this!