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

Generating rbi for cucumber results in "There are parse errors in the generated RBI files." #969

Closed
thomasdziedzic-census opened this issue Jun 5, 2022 · 1 comment · Fixed by #974 or #987

Comments

@thomasdziedzic-census
Copy link

When I installed cucumber and ran bin/tapioca gem I got the following message.

This seems related to a bug in Tapioca.
Please open an issue at https://github.com/Shopify/tapioca/issues/new with the following information:

Tapioca v0.8.1

Command:
  bin/tapioca gem

Gems:
  actioncable (7.0.3)
  actionmailbox (7.0.3)
  actionmailer (7.0.3)
  actionpack (7.0.3)
  actiontext (7.0.3)
  actionview (7.0.3)
  active_link_to (1.0.5)
  activejob (7.0.3)
  activemodel (7.0.3)
  activerecord (7.0.3)
  activestorage (7.0.3)
  activesupport (7.0.3)
  addressable (2.8.0)
  ast (2.4.2)
  bindex (0.8.1)
  bootsnap (1.12.0)
  builder (3.2.4)
  capybara (3.37.1)
  childprocess (4.1.0)
  coderay (1.1.3)
  concurrent-ruby (1.1.10)
  crass (1.0.6)
  cssbundling-rails (1.1.0)
  cucumber-ci-environment (9.0.4)
  cucumber-core (11.0.0)
  cucumber-cucumber-expressions (15.2.0)
  cucumber-gherkin (23.0.1)
  cucumber-html-formatter (19.2.0)
  cucumber-messages (18.0.0)
  cucumber-tag-expressions (4.1.0)
  cucumber (8.0.0)
  debug (1.5.0)
  diff-lcs (1.5.0)
  digest (3.1.0)
  erubi (1.10.0)
  et-orbi (1.2.7)
  factory_bot (6.2.1)
  factory_bot_rails (6.2.0)
  ffi (1.15.5)
  fugit (1.5.3)
  globalid (1.0.0)
  good_job (2.15.1)
  i18n (1.10.0)
  io-console (0.5.11)
  irb (1.4.1)
  jbuilder (2.11.5)
  jsbundling-rails (1.0.2)
  loofah (2.18.0)
  mail (2.7.1)
  marcel (1.0.2)
  matrix (0.4.2)
  method_source (1.0.0)
  mime-types-data (3.2022.0105)
  mime-types (3.4.1)
  mini_mime (1.1.2)
  minitest (5.15.0)
  msgpack (1.5.2)
  multi_test (1.1.0)
  net-imap (0.2.3)
  net-pop (0.1.1)
  net-protocol (0.1.3)
  net-smtp (0.3.1)
  nio4r (2.5.8)
  nokogiri (1.13.6)
  parallel (1.22.1)
  parser (3.1.2.0)
  pg (1.3.5)
  pry (0.14.1)
  public_suffix (4.0.7)
  puma (5.6.4)
  raabro (1.4.0)
  racc (1.6.0)
  rack-test (1.1.0)
  rack (2.2.3.1)
  rails-dom-testing (2.0.3)
  rails-html-sanitizer (1.4.2)
  rails (7.0.3)
  railties (7.0.3)
  rake (13.0.6)
  rbi (0.0.14)
  redis (4.6.0)
  regexp_parser (2.5.0)
  reline (0.3.1)
  rexml (3.2.5)
  rspec-core (3.11.0)
  rspec-expectations (3.11.0)
  rspec-mocks (3.11.1)
  rspec-rails (6.0.0.rc1)
  rspec-support (3.11.0)
  rubyzip (2.3.2)
  selenium-webdriver (4.2.1)
  spoom (1.1.11)
  sprockets-rails (3.4.2)
  sprockets (4.0.3)
  stimulus-rails (1.0.4)
  strscan (3.0.3)
  sys-uname (1.2.2)
  tapioca (0.8.1)
  thor (1.2.1)
  timeout (0.3.0)
  turbo-rails (1.1.1)
  tzinfo (2.0.4)
  unparser (0.6.5)
  web-console (4.2.0)
  webdrivers (5.0.0)
  webrick (1.7.0)
  websocket-driver (0.7.5)
  websocket-extensions (0.1.5)
  websocket (1.2.9)
  xpath (3.2.0)
  yard-sorbet (0.6.1)
  yard (0.9.28)
  zeitwerk (2.5.4)

Errors:
  sorbet/rbi/gems/[email protected]:1300: unexpected token tINTEGER (2001)
  sorbet/rbi/gems/[email protected]:1900: unexpected token "end" (2001)

I took a look at what could have gone wrong and it looks like tapioca generated an integer as a method name:

...
module Cucumber::Glue::Dsl
  def 7(regexp, symbol = T.unsafe(nil), options = T.unsafe(nil), &proc); end
...
Morriar added a commit that referenced this issue Jun 6, 2022
Fixes #969.

Signed-off-by: Alexandre Terrasa <[email protected]>
@Morriar
Copy link
Collaborator

Morriar commented Jun 13, 2022

#974 was only the first step into fixing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants