-
Notifications
You must be signed in to change notification settings - Fork 53
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
Release v1.30.0 #567
Release v1.30.0 #567
Conversation
These pieces haven't been touched in a while so I'm fixing a number of issues: 1. `make clean` did not delete the thriftrw binary previously, so if you ran `make clean && make` inside gen/internal/tests, it would use the old binary to generate the test code. 2. `make` with no arguments in the root of the repository built just the development tools, not ThriftRW. Changed it to build ThriftRW. 3. We had vendored an old copy of github.com/fatih/struccttag in this repository for reasons; those reasons are no longer valid and we can just declare the dependency now. 4. gomock was severly out of date and didn't play nicely with some Go module corner cases. This caused a couple random error messages to be printed when we ran `make generate`. To fix this, I had to update gomock, and change the version of Go in the go.mod to 1.15. 5. CI wasn't yet testing against Go 1.17.
Now that all generated types support streaming, there's no reason to separate thriftType and streamingThriftType.
Backport tests inside gen/ that (de)serialize structs to wire or back, gto also test with streaming. The following tests were affected: - [x] collision_test - [x] TestStruct - [x] TestWithDefault - [x] container_test - [x] TestCollectionsOfPrimitives - [x] TestEnumContainers - [x] TestListOfStructs - [x] TestCrazyTown - [x] TestContainerValidate - [x] TestEmptyContainersRoundTrip - [x] service_test - [x] TestServiceArgsAndResult - [x] TestServiceTypesEnveloper - [x] TestArgsAndResultValidation - [x] struct_test - [x] TestStructRoundTripAndString - [x] TestPrimitiveRequiredMissingFields - [x] TestBasicException - [x] TestCollisionException - [x] TestStructFromWireUnrecognizedField - [x] TestUnionFromWireInconsistencies - [x] TestStructWithDefaults - [x] TestStructValidation - [x] TestEmptyPrimitivesRoundTrip - [x] typedef_test - [x] TestTypedefI64 - [x] TestTypedefString - [x] TestTypedefBinary - [x] TestTypedefStruct - [x] TestTypedefContainer - [x] TestUnhashableSetAlias - [x] TestUnhashableMapKeyAlias - [x] TestBinarySet - [x] TestTypedefAnnotatedSetToSlice - [x] list_test - [x] TestListRequiredToWire - [x] TestListRequiredFromWire - [x] TestRoundtripOptionalListFields - [x] TestListOptionalFromWire - [x] enum_test - [x] TestEnumDefaultWire - [x] TestEnumWithDuplicateValuesWire - [x] TestUnknownEnumValue - [x] TestOptionalEnum This gives us a much higher level of confidence in the streaming implementation. Co-authored-by: Abhinav Gupta <[email protected]>
Added thriftbreak, a linter that integrates with git by comparing HEAD and HEAD~, finding a list of all changed .thrift files and detecting the following changes: - a required field was added to an existing struct - a field was changed from optional to required for an existing struct - a service was deleted - one of service's methods was deleted Note, one of the limitations of this linter is that we cannot yet detect changes if a struct was renamed and then a required field was added. Ref GO-835
…ile (#550) Before this change, if a new file is added in addition to other thrift changes, the detector would cause a panic when trying to find all Thrift changes. Ref GO-963
Adding --json flag to thriftbreak to output results as JSON. This enables integration with tools like Phabricator. Ref GO-938
Returning `FilePath` instead of `File` for better integration with CI tooling. Also addressing feedback from #551. Co-authored-by: Abhinav Gupta <[email protected]> Co-authored-by: Sung Yoon Whang <[email protected]>
If the underlying type is a string, we can optimize `String()` by returning the string as-is instead of `fmt.Sprintf`-ing it.
This is a proactive change to remove noise from future work that needs `make generate`'s output.
Test ThriftRW Go with the latest two Go minor releases. Update the go.mod directive to require at least Go 1.17, (this changes how `go mod tidy` behaves), and update linters and fix issues.
* Add check for changed types * Update error message * Update struct name
* idl: Fix parsing of hex integer values * Address comments * Fix literal space in Makefile
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20211015210444-4f30a5c0130f to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/commits/v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add new TemplateOption AddTemplate This enables consumers to split their template across multiple files and reference define blocks from other files. * Update plugin/template.go Address PR feedback Co-authored-by: Moises Vega <[email protected]> * Turn additionalTmpl into a map so users can provide a name * Update documentation --------- Co-authored-by: Moises Vega <[email protected]>
Update changelog for the v1.30.0 release.
The thriftrw release instructions call for running `make generate` and seeing no changes to verify the state of dev before creating a release commit PR on master. This change is the result of running `make generate`.
|
Codecov Report
@@ Coverage Diff @@
## master #567 +/- ##
==========================================
+ Coverage 67.32% 68.09% +0.77%
==========================================
Files 135 139 +4
Lines 23531 23838 +307
==========================================
+ Hits 15842 16233 +391
+ Misses 4593 4544 -49
+ Partials 3096 3061 -35
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The commit merged in (#567) was never tagged and released as v1.30.0 as a bug was found in that commit before we officially cut a release for it. This commit serves as the v1.30.0 release. This release contains the following changes: - AddTemplate template option. - thriftbreak: support for changed types, new files, and optional JSON output. - String() performance improvements for string type definitions.
The commit merged in (#567) was never tagged and released as v1.30.0 as a bug was found in that commit before we officially cut a release for it. This commit serves as the v1.30.0 release. This release contains the following changes: - AddTemplate template option. - thriftbreak: support for changed types, new files, and optional JSON output. - String() performance improvements for string type definitions.
This commit serves as the v1.30.0 release. The commit merged in (#567) was never tagged and released as v1.30.0 as a bug was found in that commit before we tagged a release for it. This commit contains the fix for the aforementioned bug. This release contains the following changes: - AddTemplate template option. - thriftbreak: support for changed types, new files, and optional JSON output. - String() performance improvements for string type definitions.
This commit serves as the v1.30.0 release. The commit merged in (#567) was never tagged and released as v1.30.0 as a bug was found in that commit before we tagged a release for it. This commit contains the fix for the aforementioned bug. This release contains the following changes: - AddTemplate template option. - thriftbreak: support for changed types, new files, and optional JSON output. - String() performance improvements for string type definitions.
This commit serves as the v1.30.0 release. The commit merged in (#567) was never tagged and released as v1.30.0 as a bug was found in that commit before we tagged a release for it. This commit contains the fix for the aforementioned bug. This release contains the following changes: - AddTemplate template option. - thriftbreak: support for changed types, new files, and optional JSON output. - String() performance improvements for string type definitions.
This commit serves as the v1.30.0 release. The commit merged in (#567) was never tagged and released as v1.30.0 as a bug was found in that commit before we tagged a release for it. This commit contains the fix for the aforementioned bug. This release contains the following changes: - AddTemplate template option. - thriftbreak: support for changed types, new files, and optional JSON output. - String() performance improvements for string type definitions.
This release contains the following changes: