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

Fix support for go1.18 #466

Merged
merged 6 commits into from Mar 26, 2022
Merged

Fix support for go1.18 #466

merged 6 commits into from Mar 26, 2022

Conversation

vearutop
Copy link
Member

@vearutop vearutop commented Mar 17, 2022

🤔 What's changed?

New version of Go was released and unfortunately there is a compatibility issue with godog test builder.

⚡️ What's your motivation?

Fixes #464.

🏷️ What kind of change is this?

  • 🐛 Bug fix (non-breaking change which fixes a defect)

♻️ Anything particular you want feedback on?

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

@vearutop
Copy link
Member Author

Tests in go1.18 are failing due to golang/go#51774.

@codecov
Copy link

codecov bot commented Mar 26, 2022

Codecov Report

Merging #466 (f4c7828) into main (5efecba) will decrease coverage by 0.17%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main     #466      +/-   ##
==========================================
- Coverage   81.58%   81.41%   -0.18%     
==========================================
  Files          27       27              
  Lines        2183     2195      +12     
==========================================
+ Hits         1781     1787       +6     
- Misses        309      312       +3     
- Partials       93       96       +3     
Impacted Files Coverage Δ
internal/builder/builder.go 54.58% <50.00%> (-0.29%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5efecba...f4c7828. Read the comment docs.

@vearutop
Copy link
Member Author

There is no known workaround for the Go issue mentioned above.

In godog that issue manifests as <autogenerated> instead of file name:

                          Scenario: should fail multistep              # features/multistep.feature:23
                            Given a feature "failed.feature" file:     # <autogenerated>:1 -> *godogFeaturesScenario
                              """
                              Feature: failed feature
                              
                                Scenario: run failing multistep
                                  Given passing step
                                  When failing multistep
                                  Then I should have 1 scenario registered
                              """
                            When I run feature suite                   # <autogenerated>:1 -> *godogFeaturesScenario
                            Then the suite should have failed          # <autogenerated>:1 -> *godogFeaturesScenario
                            And the following step should be failed:   # <autogenerated>:1 -> *godogFeaturesScenario

Because of that CI upgrade to go1.18 is not feasible yet, I reverted those changes.

@vearutop vearutop marked this pull request as ready for review March 26, 2022 09:15
@vearutop vearutop merged commit 6f877d6 into main Mar 26, 2022
@vearutop vearutop deleted the upd-go1.18 branch March 26, 2022 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Godog command returns an error with Go 1.18
1 participant