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

WIP: Fix for #846, Support code aliases break step definition stacktrace (v2.3.0) #853

Closed
wants to merge 5 commits into from

Conversation

pittgoose
Copy link

This is a WIP PR for fixing issue #846 with @charlierudolph

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.784% when pulling 9b742a1 on pittgoose:master into 5c4bb43 on cucumber:master.

@charlierudolph
Copy link
Member

Please remove the changes to the package.json file for this PR. As part of the release process, the version will be updated and new contributors will be added to the package.json file. Also do you have any attempts to solve this already or any specific questions to get started?

@pittgoose
Copy link
Author

@charlierudolph I reverted my changes to package.json.
I tried digging into this but the stacktrace was entirely in node_modules. I was not able to figure out how to find a stacktrace which contained the proper path to the step definition file. Are you familiar with the code?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.784% when pulling 7fa5551 on pittgoose:master into 5c4bb43 on cucumber:master.

@charlierudolph
Copy link
Member

charlierudolph commented Jun 12, 2017

Were you looking at this function? That gets called in defineStep / defineHook / registerHandler. We may be able to write a failing feature test for this or even a unit test. Creating a failing test case is probably the best way to start

@pittgoose
Copy link
Author

pittgoose commented Jun 12, 2017 via email

@pittgoose
Copy link
Author

pittgoose commented Jun 13, 2017

@charlierudolph I've added failing tests now for defineStep / defineHook / registerHandler.
I've traced the source of the issue to src/index.js:27 where proxySupportCode is defined. This compiles to lib/index.js:176 which is what the step definition lines are matching to. It's at this point that I'm stuck.

@pittgoose pittgoose changed the title WIP: Fix for #846, Support code aliases break JSON formatter (v2.3.0) WIP: Fix for #846, Support code aliases break step definition stacktrace (v2.3.0) Jun 13, 2017
@charlierudolph
Copy link
Member

@pittgoose so I believe we need to update the function I linked in the previous comment. That is currently assuming the user code is three up the stack. However, it now may be four up the stack when using the direct imports. In order to combat this, I think we should look through the stack searching for the first one that is not in the cucumber node module. Here is an example of getting the project path which we would need to check if the stack contains in order to tell if it in the cucumber node module.

@pittgoose
Copy link
Author

@charlierudolph could you let me know if you have some time to work on this at the same time? I'm totally confused but would really like to fix this.

@charlierudolph
Copy link
Member

superseded by #881

@lock
Copy link

lock bot commented Oct 24, 2018

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 Oct 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants