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

Wire protocol broke backwards compatibility for docstrings #1183

Closed
muggenhor opened this issue Aug 22, 2017 · 10 comments · Fixed by cucumber/cucumber-ruby-wire#15
Closed

Wire protocol broke backwards compatibility for docstrings #1183

muggenhor opened this issue Aug 22, 2017 · 10 comments · Fixed by cucumber/cucumber-ruby-wire#15
Labels
🐛 bug Defect / Bug

Comments

@muggenhor
Copy link

Summary

Starting from no later than cucumber 2.0 backwards compatibility of the wireprotocol got broken for passing docstrings.

Given this step definition (cucumber-cpp):

GIVEN("some step with a docstring")
{
  REGEX_PARAM(std::string, docstring);
  EXPECT_EQ("doc string goes here", docstring);
}

and this feature:

Feature: test
  Scenario: test
    Given some step with a docstring
      """
      doc string goes here
      """
    When not implemented
    Then not implemented

Expected Behavior

I expect the step definition to be called and passed the doc string. This requires this bit of JSON to fly across the wire (the id field is an example):

["invoke",
  {
    "id":"27",
    "args":[
      "doc string goes here"
    ]
  }
]

Current Behavior

With cucumber 1.3.8 (delivered with Ubuntu Trusty 14.04) the expectation is met, with Cucumber 2.0.0 (delivered with Ubuntu Xenial 16.04) however this fails. Instead an exception is thrown, from the implementation of the REGEX_PARAM macro, carrying the message "Parameter not found". This is the result of the transmitted JSON not being usable anymore, because it now looks like this instead:

["invoke",
  {
    "id":"27",
    "args":[
      {
        "delegate_sd_obj":{
          "content":"doc string goes here",
          "content_type":"",
          "location":"features/some-file.feature:25..27",
          "delegate_sd_obj":"doc string goes here"
        }
      }
    ]
  }
]

Possible Solution

This seems to be the cause of serializing Delegator structures internally.

Steps to Reproduce (for bugs)

Running the FeatureShowcase example on the docstring-wire-bug branch of muggenhor/cucumber-cpp with cucumber 1.3.8 will succeed, with 2.0 it will fail.

Context & Motivation

This keeps my company from being able to upgrade our CI infrastructure to more recent Ubuntu versions as it ships with Cucumber 2.0.

Your Environment

Ubuntu Xenial 16.04 with Cucumber 2.0, cucumber-cpp HEAD.

@muggenhor muggenhor added the 🐛 bug Defect / Bug label Aug 22, 2017
muggenhor pushed a commit to muggenhor/cucumber-ruby-wire that referenced this issue Aug 24, 2017
muggenhor pushed a commit to muggenhor/cucumber-ruby-wire that referenced this issue Aug 24, 2017
muggenhor pushed a commit to muggenhor/cucumber-ruby-wire that referenced this issue Aug 24, 2017
@stale
Copy link

stale bot commented Nov 8, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Nov 8, 2017
@muggenhor
Copy link
Author

The issue still exists, I don't have the ruby chops to fix it, but it's still relevant.

@stale stale bot removed the ⌛ stale Will soon be closed by stalebot unless there is activity label Nov 9, 2017
@stale
Copy link

stale bot commented Jan 8, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Jan 8, 2018
@stale
Copy link

stale bot commented Jan 15, 2018

This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective.

@stale stale bot closed this as completed Jan 15, 2018
@muggenhor
Copy link
Author

Problem still exists.

@muggenhor muggenhor reopened this Jan 22, 2018
@stale stale bot removed the ⌛ stale Will soon be closed by stalebot unless there is activity label Jan 22, 2018
@stale
Copy link

stale bot commented Mar 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Mar 23, 2018
@muggenhor muggenhor removed the ⌛ stale Will soon be closed by stalebot unless there is activity label Mar 26, 2018
@muggenhor
Copy link
Author

ping

@stale
Copy link

stale bot commented May 25, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label May 25, 2018
@muggenhor muggenhor removed the ⌛ stale Will soon be closed by stalebot unless there is activity label May 25, 2018
@tooky
Copy link
Member

tooky commented May 25, 2018

@raphaelmeyer was it this you mentioned today?

brasmusson pushed a commit to cucumber/cucumber-ruby-wire that referenced this issue Jul 23, 2018
@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Jul 24, 2018
@cucumber cucumber deleted a comment from stale bot Jul 24, 2018
@stale stale bot removed the ⌛ stale Will soon be closed by stalebot unless there is activity label Jul 24, 2018
brasmusson pushed a commit to cucumber/cucumber-ruby-wire that referenced this issue Jul 26, 2018
@lock
Copy link

lock bot commented Aug 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Defect / Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants