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

Generated BUILD.bazel files should use allow_empty #88

Open
shahms opened this issue Mar 1, 2021 · 3 comments
Open

Generated BUILD.bazel files should use allow_empty #88

shahms opened this issue Mar 1, 2021 · 3 comments
Labels
needs-repro A possible issue, but lacking a clear example

Comments

@shahms
Copy link

shahms commented Mar 1, 2021

Some Gems result in an empty glob inside the generated BUILD files, which causes Bazel to fail. Generated globs which may be empty should probably pass allow_empty = True to the glob() function. This is notably a problem for nokogiri.

@kigster
Copy link
Contributor

kigster commented Jul 8, 2021

Do you have an example or a repro case?

Perhaps you can add Nokogiri to the Gemfile in examples/simple_script and if you are right then it should fail on CI

@kigster kigster added the needs-repro A possible issue, but lacking a clear example label Jul 8, 2021
@shahms
Copy link
Author

shahms commented Apr 12, 2023

I can't even get that far any more as now I'm hitting:

/usr/lib/ruby/vendor_ruby/rubygems.rb:783:in `initialize': no implicit conversion of nil into String (TypeError)
        from /usr/lib/ruby/vendor_ruby/rubygems.rb:783:in `open'
        from /usr/lib/ruby/vendor_ruby/rubygems.rb:783:in `open_file'
        from /usr/lib/ruby/vendor_ruby/rubygems/stub_specification.rb:113:in `data'
        from /usr/lib/ruby/vendor_ruby/rubygems/stub_specification.rb:169:in `extensions'
        from /usr/lib/ruby/vendor_ruby/rubygems/basic_specification.rb:330:in `have_extensions?'
        from /usr/lib/ruby/vendor_ruby/rubygems/basic_specification.rb:247:in `require_paths'
        from create_bundle_build_file.rb:270:in `register_gem'
        from create_bundle_build_file.rb:215:in `block in generate!'
        from create_bundle_build_file.rb:215:in `each'
        from create_bundle_build_file.rb:215:in `generate!'
        from create_bundle_build_file.rb:350:in `<main>'

@shahms
Copy link
Author

shahms commented Apr 13, 2023

(Which may also be glob related as it seems the SPEC_PATH is what's nil)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-repro A possible issue, but lacking a clear example
Projects
None yet
Development

No branches or pull requests

2 participants