update messages-go to v16.0.1 bump gomod version comment on log line in std os.Stderr examples to non rc version go mod tidy update circle (tbd)
4 КиБ
We are excited to announce the release of godog v0.9.0.
Here follows a summary of Notable Changes, the Non Backward Compatible Changes and Deprecation Notices. The full change log is available here.
Notable Changes
Most importantly, note that the gherkin core is changed to gherkin-go.
Non Backward Compatible Changes
Install godog
With the change of dependencies for godog, which relies on go modules, installing godog now requires go modules to be active.
If you are running within the $GOPATH, you would need to install godog like this:
GO111MODULE=on go get github.com/cucumber/godog/cmd/godog@v0.9.0
- Adding
GO111MODULE=onwill allow go get and go mod to work together as intended. - Adding
@v0.9.0will install v0.9.0 specifically instead of master.
If you are running outside of the $GOPATH, you should still specify a version.
I you encounter this error, please try adding GO111MODULE=on:
/go# go get github.com/cucumber/godog/cmd/godog
package github.com/cucumber/gherkin-go/v19: cannot find package "github.com/cucumber/gherkin-go/v19" in any of:
/usr/local/go/src/github.com/cucumber/gherkin-go/v19 (from $GOROOT)
/go/src/github.com/cucumber/gherkin-go/v19 (from $GOPATH)
package github.com/cucumber/messages-go/v10: cannot find package "github.com/cucumber/messages-go/v10" in any of:
/usr/local/go/src/github.com/cucumber/messages-go/v10 (from $GOROOT)
/go/src/github.com/cucumber/messages-go/v10 (from $GOPATH)
Gherkin Core
The following types have been switched for messages-go.
| old | new |
|---|---|
| gherkin.Feature | messages.GherkinDocument |
| gherkin.Scenario | messages.Pickle |
| gherkin.ScenarioOutline | messages.Pickle |
| gherkin.Step | messages.Pickle_PickleStep |
| gherkin.DocString | messages.PickleStepArgument_PickleDocString |
| gherkin.DataTable | messages.PickleStepArgument_PickleTable |
Step Defintions
StepDefhas been renamed toStepDefinition- Steps that earlier accepted
*gherkin.DocStringor*gherkin.DataTableneeds to be updated to use*messages.PickleStepArgument_PickleDocStringresp.*messages.PickleStepArgument_PickleTable. Example.
Hooks
The updated hooks can be found here.
BeforeFeatureandAfterFeaturehooks now accept*messages.GherkinDocumentinstead of*gherkin.FeatureBeforeScenarioandAfterScenariohooks now accept*messages.Pickleinstead ofinterface{}BeforeStepandAfterStephooks now accept*messages.Pickle_PickleStepinstead*gherkin.Step
Formatter
The formatter interface have recieved some updates, the updated version can be found here.
Featurenow accepts*messages.GherkinDocumentinstead of*gherkin.FeatureNodehas been renamed toPickleand now accepts*messages.Pickleinstead ofinterface{}Defined,Failed,Passed,Skipped,Undefined,Pendingnow takes*messages.Pickleas the first argument and*gherkin.Step, *StepDefhave been updated to*messages.Pickle_PickleStep, *StepDefinition
Deprecation Notices
Hooks
BeforeFeatureandAfterFeaturehooks are now considered deprecated and will be removed inv0.10.0.
Full change log
See CHANGELOG.md.