Skip to content

Commit

Permalink
Protoscript (#24)
Browse files Browse the repository at this point in the history
## Results

<!--- RESULTS-START -->
| Implementation | JavaScript | TypeScript | Standard<br>Plugin |
Required tests | Recommended tests |

|-----------------------------------------|:------------------:|:------------------:|:------------------:|:-------------------------------------:|:----------------------------------------:|
| [Protobuf-ES](impl/protobuf-es) | :heavy_check_mark: |
:heavy_check_mark: | :heavy_check_mark: | <sub><img
src="https://progress-bar.dev/100?width=100&suffix=%25+passing"
height="25" width="125" /></sub><br><sup>(0&nbsp;failures)<sub> |
<sub><img
src="https://progress-bar.dev/99?width=100&suffix=.8%25+passing"
height="25" width="125" /></sub><br><sup>(1&nbsp;failures)<sub> |
| [protobuf-ts](impl/protobuf-ts) | ✔️ |
✔️ | ✔️ | <sub><img
src="https://progress-bar.dev/99?width=100&suffix=.6%25+passing"
height="25" width="125" /></sub><br><sup>(6&nbsp;failures)<sub> |
<sub><img
src="https://progress-bar.dev/99?width=100&suffix=.1%25+passing"
height="25" width="125" /></sub><br><sup>(5&nbsp;failures)<sub> |
| [protoscript](impl/protoscript) | ✔️ |
✔️ | ✔️ | <sub><img
src="https://progress-bar.dev/36?width=100&suffix=.9%25+passing"
height="25" width="125" /></sub><br><sup>(934&nbsp;failures)<sub> |
<sub><img
src="https://progress-bar.dev/11?width=100&suffix=.1%25+passing"
height="25" width="125" /></sub><br><sup>(487&nbsp;failures)<sub> |
| [google-protobuf](impl/google-protobuf) | ✔️ | ❌ |
✔️ | <sub><img
src="https://progress-bar.dev/73?width=100&suffix=.9%25+passing"
height="25" width="125" /></sub><br><sup>(387&nbsp;failures)<sub> |
<sub><img
src="https://progress-bar.dev/60?width=100&suffix=.6%25+passing"
height="25" width="125" /></sub><br><sup>(216&nbsp;failures)<sub> |
| [protobuf.js](impl/protobuf.js) | ✔️ |
✔️ | ❌ | <sub><img
src="https://progress-bar.dev/37?width=100&suffix=.3%25+passing"
height="25" width="125" /></sub><br><sup>(928&nbsp;failures)<sub> |
<sub><img
src="https://progress-bar.dev/14?width=100&suffix=.1%25+passing"
height="25" width="125" /></sub><br><sup>(471&nbsp;failures)<sub> |
| [protoc-gen-ts](impl/protoc-gen-ts) | ❌ | ✔️ |
✔️ | <sub><img
src="https://progress-bar.dev/26?width=100&suffix=.7%25+passing"
height="25" width="125" /></sub><br><sup>(1085&nbsp;failures)<sub> |
<sub><img
src="https://progress-bar.dev/32?width=100&suffix=.7%25+passing"
height="25" width="125" /></sub><br><sup>(369&nbsp;failures)<sub> |
| [ts-proto](impl/ts-proto) | ❌ | ✔️ |
✔️ | <sub><img
src="https://progress-bar.dev/42?width=100&suffix=.7%25+passing"
height="25" width="125" /></sub><br><sup>(848&nbsp;failures)<sub> |
<sub><img
src="https://progress-bar.dev/3?width=100&suffix=.65%25+passing"
height="25" width="125" /></sub><br><sup>(528&nbsp;failures)<sub>
  • Loading branch information
noahseger committed Jun 29, 2023
1 parent 3b7027f commit 87c30a2
Show file tree
Hide file tree
Showing 17 changed files with 19,684 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ test: $(BIN)/conformance_test_runner ## Run conformance tests
cd impl/protobuf-es; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/protobuf-ts; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/protoc-gen-ts; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/protoscript; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/baseline; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
node report.js

Expand All @@ -54,6 +55,7 @@ testci: ## Run conformance tests in CI
cd impl/protobuf-es; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/protobuf-ts; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/protoc-gen-ts; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/protoscript; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
cd impl/baseline; PATH="$(abspath $(BIN)):$(PATH)" ./test.sh
node report.js

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The current implementations being tested are:
* protobuf.js: https://github.com/protobufjs/protobuf.js/
* protoc-gen-ts: https://github.com/thesayyn/protoc-gen-ts
* ts-proto: https://github.com/stephenh/ts-proto
* protoscript: https://github.com/TateThurston/protoscript

## Results

Expand All @@ -21,6 +22,7 @@ The current implementations being tested are:
|-----------------------------------------|:------------------:|:------------------:|:------------------:|:-------------------------------------:|:----------------------------------------:|
| [Protobuf-ES](impl/protobuf-es) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | <sub><img src="https://progress-bar.dev/100?width=100&suffix=%25+passing" height="25" width="125" /></sub><br><sup>(0&nbsp;failures)<sub> | <sub><img src="https://progress-bar.dev/99?width=100&suffix=.8%25+passing" height="25" width="125" /></sub><br><sup>(1&nbsp;failures)<sub> |
| [protobuf-ts](impl/protobuf-ts) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | <sub><img src="https://progress-bar.dev/99?width=100&suffix=.6%25+passing" height="25" width="125" /></sub><br><sup>(6&nbsp;failures)<sub> | <sub><img src="https://progress-bar.dev/99?width=100&suffix=.1%25+passing" height="25" width="125" /></sub><br><sup>(5&nbsp;failures)<sub> |
| [protoscript](impl/protoscript) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | <sub><img src="https://progress-bar.dev/36?width=100&suffix=.9%25+passing" height="25" width="125" /></sub><br><sup>(934&nbsp;failures)<sub> | <sub><img src="https://progress-bar.dev/11?width=100&suffix=.1%25+passing" height="25" width="125" /></sub><br><sup>(487&nbsp;failures)<sub> |
| [google-protobuf](impl/google-protobuf) | :heavy_check_mark: | :x: | :heavy_check_mark: | <sub><img src="https://progress-bar.dev/73?width=100&suffix=.9%25+passing" height="25" width="125" /></sub><br><sup>(387&nbsp;failures)<sub> | <sub><img src="https://progress-bar.dev/60?width=100&suffix=.6%25+passing" height="25" width="125" /></sub><br><sup>(216&nbsp;failures)<sub> |
| [protobuf.js](impl/protobuf.js) | :heavy_check_mark: | :heavy_check_mark: | :x: | <sub><img src="https://progress-bar.dev/37?width=100&suffix=.3%25+passing" height="25" width="125" /></sub><br><sup>(928&nbsp;failures)<sub> | <sub><img src="https://progress-bar.dev/14?width=100&suffix=.1%25+passing" height="25" width="125" /></sub><br><sup>(471&nbsp;failures)<sub> |
| [protoc-gen-ts](impl/protoc-gen-ts) | :x: | :heavy_check_mark: | :heavy_check_mark: | <sub><img src="https://progress-bar.dev/26?width=100&suffix=.7%25+passing" height="25" width="125" /></sub><br><sup>(1085&nbsp;failures)<sub> | <sub><img src="https://progress-bar.dev/32?width=100&suffix=.7%25+passing" height="25" width="125" /></sub><br><sup>(369&nbsp;failures)<sub> |
Expand Down
7 changes: 7 additions & 0 deletions impl/protoscript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ProtoScript

[ProtoScript](https://github.com/TateThurston/protoScript)

## Caveats

Compiles BigInt literals, so TypeScript must target ES2020.
6 changes: 6 additions & 0 deletions impl/protoscript/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: v1
plugins:
- name: protoscript
path: node_modules/protoscript/compiler.js
opt: language=typescript
out: gen
1,421 changes: 1,421 additions & 0 deletions impl/protoscript/failing_tests.txt

Large diffs are not rendered by default.

112 changes: 112 additions & 0 deletions impl/protoscript/failing_tests_text_format.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateFirstOnlyBytes
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateFirstOnlyString
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogatePairBytes
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogatePairString
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateSecondOnlyBytes
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateSecondOnlyString
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapesBytes.ProtobufOutput
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapesBytes.TextFormatOutput
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapesString.ProtobufOutput
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapesString.TextFormatOutput
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeBytes.ProtobufOutput
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeBytes.TextFormatOutput
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeString.ProtobufOutput
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeString.TextFormatOutput
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateFirstOnlyBytes
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateFirstOnlyString
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairBytes
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairString
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateSecondOnlyBytes
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateSecondOnlyString
Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortBytes
Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortString
Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairShortLongBytes
Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairShortLongString
Required.Proto2.TextFormatInput.GroupFieldEmpty.ProtobufOutput
Required.Proto2.TextFormatInput.GroupFieldEmpty.TextFormatOutput
Required.Proto2.TextFormatInput.GroupFieldNoColon.ProtobufOutput
Required.Proto2.TextFormatInput.GroupFieldNoColon.TextFormatOutput
Required.Proto2.TextFormatInput.GroupFieldWithColon.ProtobufOutput
Required.Proto2.TextFormatInput.GroupFieldWithColon.TextFormatOutput
Required.Proto3.TextFormatInput.AlphabeticallySortedMapBoolKeys.ProtobufOutput
Required.Proto3.TextFormatInput.AlphabeticallySortedMapBoolKeys.TextFormatOutput
Required.Proto3.TextFormatInput.AlphabeticallySortedMapIntKeys.ProtobufOutput
Required.Proto3.TextFormatInput.AlphabeticallySortedMapIntKeys.TextFormatOutput
Required.Proto3.TextFormatInput.AlphabeticallySortedMapStringKeys.ProtobufOutput
Required.Proto3.TextFormatInput.AlphabeticallySortedMapStringKeys.TextFormatOutput
Required.Proto3.TextFormatInput.AnyField.ProtobufOutput
Required.Proto3.TextFormatInput.AnyField.TextFormatOutput
Required.Proto3.TextFormatInput.AnyFieldWithInvalidType
Required.Proto3.TextFormatInput.AnyFieldWithRawBytes.ProtobufOutput
Required.Proto3.TextFormatInput.AnyFieldWithRawBytes.TextFormatOutput
Required.Proto3.TextFormatInput.BytesFieldBadUTF8Hex.ProtobufOutput
Required.Proto3.TextFormatInput.BytesFieldBadUTF8Hex.TextFormatOutput
Required.Proto3.TextFormatInput.BytesFieldBadUTF8Octal.ProtobufOutput
Required.Proto3.TextFormatInput.BytesFieldBadUTF8Octal.TextFormatOutput
Required.Proto3.TextFormatInput.DuplicateMapKey.ProtobufOutput
Required.Proto3.TextFormatInput.FloatField.ProtobufOutput
Required.Proto3.TextFormatInput.FloatField.TextFormatOutput
Required.Proto3.TextFormatInput.FloatFieldLargerThanInt64.ProtobufOutput
Required.Proto3.TextFormatInput.FloatFieldLargerThanInt64.TextFormatOutput
Required.Proto3.TextFormatInput.FloatFieldLargerThanUint64.ProtobufOutput
Required.Proto3.TextFormatInput.FloatFieldLargerThanUint64.TextFormatOutput
Required.Proto3.TextFormatInput.FloatFieldMaxValue.ProtobufOutput
Required.Proto3.TextFormatInput.FloatFieldMaxValue.TextFormatOutput
Required.Proto3.TextFormatInput.FloatFieldMinValue.ProtobufOutput
Required.Proto3.TextFormatInput.FloatFieldMinValue.TextFormatOutput
Required.Proto3.TextFormatInput.FloatFieldNaNValue.ProtobufOutput
Required.Proto3.TextFormatInput.FloatFieldNaNValue.TextFormatOutput
Required.Proto3.TextFormatInput.FloatFieldNegInfValue.ProtobufOutput
Required.Proto3.TextFormatInput.FloatFieldNegInfValue.TextFormatOutput
Required.Proto3.TextFormatInput.FloatFieldPosInfValue.ProtobufOutput
Required.Proto3.TextFormatInput.FloatFieldPosInfValue.TextFormatOutput
Required.Proto3.TextFormatInput.FloatFieldTooLarge.ProtobufOutput
Required.Proto3.TextFormatInput.FloatFieldTooLarge.TextFormatOutput
Required.Proto3.TextFormatInput.FloatFieldTooSmall.ProtobufOutput
Required.Proto3.TextFormatInput.FloatFieldTooSmall.TextFormatOutput
Required.Proto3.TextFormatInput.FloatFieldWithInt32Max.ProtobufOutput
Required.Proto3.TextFormatInput.FloatFieldWithInt32Max.TextFormatOutput
Required.Proto3.TextFormatInput.FloatFieldWithVeryPreciseNumber.ProtobufOutput
Required.Proto3.TextFormatInput.FloatFieldWithVeryPreciseNumber.TextFormatOutput
Required.Proto3.TextFormatInput.HelloWorld.ProtobufOutput
Required.Proto3.TextFormatInput.HelloWorld.TextFormatOutput
Required.Proto3.TextFormatInput.Int32FieldMaxValue.ProtobufOutput
Required.Proto3.TextFormatInput.Int32FieldMaxValue.TextFormatOutput
Required.Proto3.TextFormatInput.Int32FieldMinValue.ProtobufOutput
Required.Proto3.TextFormatInput.Int32FieldMinValue.TextFormatOutput
Required.Proto3.TextFormatInput.Int32FieldTooLarge
Required.Proto3.TextFormatInput.Int32FieldTooSmall
Required.Proto3.TextFormatInput.Int64FieldMaxValue.ProtobufOutput
Required.Proto3.TextFormatInput.Int64FieldMaxValue.TextFormatOutput
Required.Proto3.TextFormatInput.Int64FieldMinValue.ProtobufOutput
Required.Proto3.TextFormatInput.Int64FieldMinValue.TextFormatOutput
Required.Proto3.TextFormatInput.Int64FieldTooLarge
Required.Proto3.TextFormatInput.Int64FieldTooSmall
Required.Proto3.TextFormatInput.StringFieldBadUTF8Hex
Required.Proto3.TextFormatInput.StringFieldBadUTF8Octal
Required.Proto3.TextFormatInput.StringLiteralBasicEscapesBytes.ProtobufOutput
Required.Proto3.TextFormatInput.StringLiteralBasicEscapesBytes.TextFormatOutput
Required.Proto3.TextFormatInput.StringLiteralBasicEscapesString.ProtobufOutput
Required.Proto3.TextFormatInput.StringLiteralBasicEscapesString.TextFormatOutput
Required.Proto3.TextFormatInput.StringLiteralConcatBytes.ProtobufOutput
Required.Proto3.TextFormatInput.StringLiteralConcatBytes.TextFormatOutput
Required.Proto3.TextFormatInput.StringLiteralConcatString.ProtobufOutput
Required.Proto3.TextFormatInput.StringLiteralConcatString.TextFormatOutput
Required.Proto3.TextFormatInput.StringLiteralHexEscapesBytes.ProtobufOutput
Required.Proto3.TextFormatInput.StringLiteralHexEscapesBytes.TextFormatOutput
Required.Proto3.TextFormatInput.StringLiteralHexEscapesString.ProtobufOutput
Required.Proto3.TextFormatInput.StringLiteralHexEscapesString.TextFormatOutput
Required.Proto3.TextFormatInput.StringLiteralIncludesLFBytes
Required.Proto3.TextFormatInput.StringLiteralIncludesLFString
Required.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeTooLargeBytes
Required.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeTooLargeString
Required.Proto3.TextFormatInput.StringLiteralOctalEscapesBytes.ProtobufOutput
Required.Proto3.TextFormatInput.StringLiteralOctalEscapesBytes.TextFormatOutput
Required.Proto3.TextFormatInput.StringLiteralOctalEscapesString.ProtobufOutput
Required.Proto3.TextFormatInput.StringLiteralOctalEscapesString.TextFormatOutput
Required.Proto3.TextFormatInput.Uint32FieldMaxValue.ProtobufOutput
Required.Proto3.TextFormatInput.Uint32FieldMaxValue.TextFormatOutput
Required.Proto3.TextFormatInput.Uint32FieldTooLarge
Required.Proto3.TextFormatInput.Uint64FieldMaxValue.ProtobufOutput
Required.Proto3.TextFormatInput.Uint64FieldMaxValue.TextFormatOutput
Required.Proto3.TextFormatInput.Uint64FieldTooLarge
Loading

0 comments on commit 87c30a2

Please sign in to comment.