-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: - #485, #486, #488: These are part of the streaming changes that are still in progress in the streamdev branch and should not be released without the rest of those changes. - #507, #508: These changes by @jparise record and expose column numbers for AST identities. These cannot be released without #522, which is not yet ready. 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.
- Loading branch information
Showing
54 changed files
with
1,260 additions
and
386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: FOSSA Analysis | ||
on: push | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'thriftrw' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: FOSSA analysis | ||
uses: fossas/fossa-action@v1 | ||
with: | ||
api-key: ${{ secrets.FOSSA_API_KEY }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
BUILD_DIR = $(shell pwd)/build | ||
RAGEL_VERSION = 6.9 | ||
RAGEL_VERSION = 6.10 | ||
|
||
export GOBIN = $(BUILD_DIR)/bin | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (c) 2021 Uber Technologies, Inc. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
|
||
package ast | ||
|
||
// Position represents a position in the parsed document. | ||
type Position struct { | ||
Line int | ||
} | ||
|
||
// Pos attempts to return the position of a Node in the parsed document. | ||
// For most use cases, prefer to use idl.Info to access positional information. | ||
func Pos(n Node) (Position, bool) { | ||
if nl, ok := n.(nodeWithLine); ok { | ||
return Position{Line: nl.lineNumber()}, true | ||
} | ||
return Position{}, false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.