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

Release v1.28.0 #528

Merged
merged 17 commits into from
Jul 26, 2021
Merged

Release v1.28.0 #528

merged 17 commits into from
Jul 26, 2021

Conversation

abhinav
Copy link
Contributor

@abhinav abhinav commented Jul 23, 2021

This release v1.28.0, which includes a series of changes cherry-picked from
dev. It skips the following changes that are currently on dev:

Besides that, all changes from dev are included in this change.

Here's an API comparison between the last release (v1.27.0) and this release,
generated with the help of apidiff.

--- go.uber.org/thriftrw/ast ---
Compatible changes:
- Field.IDUnset: added
- Pos: added
- Position: added
--- go.uber.org/thriftrw/gen ---
Compatible changes:
- GeneratorOptions.EnumTextMarshalStrict: added
- Options.EnumTextMarshalStrict: added
--- go.uber.org/thriftrw/gen/internal/tests/enum-text-marshal-strict ---
NEW PACKAGE
--- go.uber.org/thriftrw/idl ---
Compatible changes:
- Config: added
- Error: added
- Info: added
- ParseError: added
--- go.uber.org/thriftrw/idl/internal ---
Incompatible changes:
- Parse: changed from func([]byte) (*go.uber.org/thriftrw/ast.Program, error) to func([]byte) (ParseResult, []ParseError)
Compatible changes:
- NodePositions: added
- ParseError: added
- ParseResult: added
--- go.uber.org/thriftrw/version ---
Incompatible changes:
- Version: value changed from "1.27.0" to "1.28.0"

Of the two incompatible changes:

  • One is the version number change. This is desirable.
  • The other is an internal API. This is safe.

abhinav and others added 16 commits May 19, 2021 18:53
Go back to development after releasing v1.27.0.
Add a FOSSA check to the build steps for ThriftRW Go.

Refs GO-468
Currently, the FOSSA analysis is set to run as part of CI. This makes it
impossible to run builds for incoming pull requests because PRs don't
have access to the secrets needed for the FOSSA analysis.

Resolve this by running the FOSSA analysis only when we push to a
branch of the repository.
Thrift allows implicit assignment of field identifiers. This is legacy
syntax, but it's useful to support it for compatibility with old files.

Auto-assigned fields start at -1 and get increasingly negative. If a
negative field identifier is explicitly given, it will be used as the
new basis for any additional auto-assigned fields. This behavior is
consistent with the Apache Thrift implementation.
Add a changelog entry for #481.
Previously, parse errors (`idl.internal.parseError`) weren't visible to
`idl.Parse()`'s callers. This was inconvenient because it's useful to have
access to (a) the full list of parse errors and (b) the line number that
caused each parse error.

This change introduces `idl.ParseError` which provides a list of errors
and their lines.

Fixes #489
The templating language used for code generation uses `<` and `>` as its
delimiters.  This results in syntax errors when trying to use the beginning
delimiter as an actual character, not as invoking a template.  Add an explicit
command (`<lessthan>`) to inject `<` as needed.
Line-based data types are too limiting should we add support for other
positional information, such as offsets/columns.
This change does two things:

First, it records document positions for parsed nodes that cannot store
their own position data. This primarily applies to primitive constants.

Second, it makes this information available through a new Config-based
parsing interface using an optional idl.Info structure. Node positions
are available though idl.Info.Pos(), which first attempts to return a
node's "native" position (line) value before falling back to its
internal nodePositions map.

Closes #493
With idl.Position moved to ast.Position, there's no need for a separate
internal.Position type.
This improves stack-level reports for test failures more accurate.
This doesn't change anything in current practice aside from moving to
the latest stable version of Ragel. From the changelog:

Ragel 6.10 - Mar 24, 2017
=========================
 -C codegen: test P vs PE in goto/call/ret statements in EOF actions, just
  before re-entering. If at the end of the input block then the EOF check is
  jumped to. This change prevents overrunning the buffer if control flow is
  issued in an EOF action without fixing the input pointer first. If a program
  properly issues an fhold before the control flow the program won't be
  affected.
 -Updated action label generation. The previous set of conditions for
  generating the label didn't cover actions coming from the eofAction pointer
  (eof trans covered since it points into the set of transitions).
 -Use separate signed/unsigned values for host type min/max. Using separate
  values avoids the need to type cast before the data goes into FsmCtx structs.
  Keep it in native types until it is used.
 -Optionally do not generate entry point variables. Adds noentry write option
  for data.
 -Various warning elimination and build updates.
Add a new hidden flag `--enum-text-marshal-strict` that will cause the
MarshalText and MarshalJSON methods methods for enums to fail with an
error if the enum being serialized is unknown.

This change is necessary because some clients crash during
serialization of JSON or YAML if they receive an integer instead of a
string (for unknown enums).

Refs EDGE-577

Co-authored-by: Abhinav Gupta <abg@uber.com>
@codecov
Copy link

codecov bot commented Jul 23, 2021

Codecov Report

Merging #528 (a710cb8) into master (d51e118) will increase coverage by 0.04%.
The diff coverage is 80.97%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #528      +/-   ##
==========================================
+ Coverage   78.98%   79.02%   +0.04%     
==========================================
  Files         125      129       +4     
  Lines       16055    16199     +144     
==========================================
+ Hits        12681    12802     +121     
- Misses       2064     2086      +22     
- Partials     1310     1311       +1     
Impacted Files Coverage Δ
ast/definition.go 70.45% <ø> (ø)
gen/internal/tests/collision/collision.go 82.37% <ø> (ø)
gen/internal/tests/constants/constants.go 100.00% <ø> (ø)
gen/internal/tests/containers/containers.go 70.87% <ø> (ø)
gen/internal/tests/enum_conflict/enum_conflict.go 83.52% <ø> (ø)
gen/internal/tests/enums/enums.go 86.60% <ø> (ø)
gen/internal/tests/exceptions/exceptions.go 82.84% <ø> (ø)
.../internal/tests/hyphenated-file/hyphenated-file.go 84.31% <ø> (ø)
.../internal/tests/hyphenated_file/hyphenated_file.go 84.31% <ø> (ø)
...en/internal/tests/non_hyphenated/non_hyphenated.go 27.50% <ø> (ø)
... and 27 more

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 d51e118...a710cb8. Read the comment docs.

Update the changelog to reflect the commits going in this release.
@r-hang r-hang merged commit 8e55b5a into master Jul 26, 2021
@r-hang r-hang deleted the release branch July 26, 2021 21:24
@r-hang r-hang restored the release branch July 26, 2021 21:45
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.

6 participants