diff --git a/LICENSE b/LICENSE index 721dc743c..3e48f9faf 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2020-2025 Buf Technologies, Inc. + Copyright 2020-2026 Buf Technologies, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Makefile b/Makefile index 6c37cf5ab..196025c46 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ MAKEFLAGS += --no-builtin-rules MAKEFLAGS += --no-print-directory BIN ?= $(abspath .tmp/bin) CACHE := $(abspath .tmp/cache) -COPYRIGHT_YEARS := 2020-2025 +COPYRIGHT_YEARS := 2020-2026 LICENSE_IGNORE := -E -e "/testdata/|^wellknownimports/google/protobuf/" # Set to use a different compiler. For example, `GO=go1.18rc1 make test`. GO ?= go diff --git a/ast/ast_roundtrip_test.go b/ast/ast_roundtrip_test.go index 0828139c9..9a3801127 100644 --- a/ast/ast_roundtrip_test.go +++ b/ast/ast_roundtrip_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/doc.go b/ast/doc.go index ed0ccb010..3aa6da8aa 100644 --- a/ast/doc.go +++ b/ast/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/enum.go b/ast/enum.go index df929d25f..3673d1724 100644 --- a/ast/enum.go +++ b/ast/enum.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/field.go b/ast/field.go index 51fe2530b..1dcbf3e72 100644 --- a/ast/field.go +++ b/ast/field.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/file.go b/ast/file.go index 044fa1f92..26f9aea77 100644 --- a/ast/file.go +++ b/ast/file.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/file_info.go b/ast/file_info.go index 9d3c6739c..d881f4ac0 100644 --- a/ast/file_info.go +++ b/ast/file_info.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/identifiers.go b/ast/identifiers.go index 002daa7e4..a1c897bbb 100644 --- a/ast/identifiers.go +++ b/ast/identifiers.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/items_test.go b/ast/items_test.go index 42d6c8d20..76e7543c0 100644 --- a/ast/items_test.go +++ b/ast/items_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/message.go b/ast/message.go index 34dc5472e..186c4a9bd 100644 --- a/ast/message.go +++ b/ast/message.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/no_source.go b/ast/no_source.go index 2abf66682..52dc2df6f 100644 --- a/ast/no_source.go +++ b/ast/no_source.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/node.go b/ast/node.go index a1c93745c..92a61f34e 100644 --- a/ast/node.go +++ b/ast/node.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/options.go b/ast/options.go index 8b686e03e..5f0a1a9db 100644 --- a/ast/options.go +++ b/ast/options.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/ranges.go b/ast/ranges.go index 6b632999d..fca5701c1 100644 --- a/ast/ranges.go +++ b/ast/ranges.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/service.go b/ast/service.go index ab28d73dc..5709c1eed 100644 --- a/ast/service.go +++ b/ast/service.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/tokens_test.go b/ast/tokens_test.go index e9e71ec67..892b4174f 100644 --- a/ast/tokens_test.go +++ b/ast/tokens_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/values.go b/ast/values.go index 43f69ade6..5bc86bf97 100644 --- a/ast/values.go +++ b/ast/values.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/visitor_test.go b/ast/visitor_test.go index 7cfd9dd40..7f7d191de 100644 --- a/ast/visitor_test.go +++ b/ast/visitor_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ast/walk.go b/ast/walk.go index 85d9e8440..20795ba90 100644 --- a/ast/walk.go +++ b/ast/walk.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/compiler.go b/compiler.go index 5d938443e..fd0a3db1a 100644 --- a/compiler.go +++ b/compiler.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/compiler_dualcompiler_test.go b/compiler_dualcompiler_test.go index d82f4d902..1f97bba63 100644 --- a/compiler_dualcompiler_test.go +++ b/compiler_dualcompiler_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/compiler_test.go b/compiler_test.go index 39f78da8a..15065587d 100644 --- a/compiler_test.go +++ b/compiler_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/doc.go b/doc.go index a20c43dbb..190bbbc23 100644 --- a/doc.go +++ b/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/commas.go b/experimental/ast/commas.go index a8dd98697..2c52fc867 100644 --- a/experimental/ast/commas.go +++ b/experimental/ast/commas.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/context.go b/experimental/ast/context.go index 6e1f530b9..f394e87b9 100644 --- a/experimental/ast/context.go +++ b/experimental/ast/context.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/decl.go b/experimental/ast/decl.go index 9c68a2567..a14432b3e 100644 --- a/experimental/ast/decl.go +++ b/experimental/ast/decl.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/decl_body.go b/experimental/ast/decl_body.go index e64854299..c8da45317 100644 --- a/experimental/ast/decl_body.go +++ b/experimental/ast/decl_body.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/decl_def.go b/experimental/ast/decl_def.go index 22168d5c6..897666f32 100644 --- a/experimental/ast/decl_def.go +++ b/experimental/ast/decl_def.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/decl_empty.go b/experimental/ast/decl_empty.go index 57f1cccf6..0bc23fd7b 100644 --- a/experimental/ast/decl_empty.go +++ b/experimental/ast/decl_empty.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/decl_file.go b/experimental/ast/decl_file.go index 78f965c73..f9566bfbb 100644 --- a/experimental/ast/decl_file.go +++ b/experimental/ast/decl_file.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/decl_range.go b/experimental/ast/decl_range.go index 56757d03d..817e6a795 100644 --- a/experimental/ast/decl_range.go +++ b/experimental/ast/decl_range.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/doc.go b/experimental/ast/doc.go index e09990e6e..16efb63bf 100644 --- a/experimental/ast/doc.go +++ b/experimental/ast/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/enums.go b/experimental/ast/enums.go index 4d9c716e5..22e745375 100644 --- a/experimental/ast/enums.go +++ b/experimental/ast/enums.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/enums.yaml b/experimental/ast/enums.yaml index fa7ffa1c2..0941771ff 100644 --- a/experimental/ast/enums.yaml +++ b/experimental/ast/enums.yaml @@ -1,10 +1,10 @@ -# Copyright 2020-2024 Buf Technologies, Inc. +# Copyright 2020-2026 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http:#www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/experimental/ast/expr.go b/experimental/ast/expr.go index dbf0ef77b..73caa4b35 100644 --- a/experimental/ast/expr.go +++ b/experimental/ast/expr.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/expr_array.go b/experimental/ast/expr_array.go index 8f5a4d494..f806820f1 100644 --- a/experimental/ast/expr_array.go +++ b/experimental/ast/expr_array.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/expr_dict.go b/experimental/ast/expr_dict.go index 1af3ae939..03a5a66a5 100644 --- a/experimental/ast/expr_dict.go +++ b/experimental/ast/expr_dict.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/expr_literal.go b/experimental/ast/expr_literal.go index d3ef644d3..5220bfac3 100644 --- a/experimental/ast/expr_literal.go +++ b/experimental/ast/expr_literal.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/expr_prefixed.go b/experimental/ast/expr_prefixed.go index 3048fa986..b50cceff4 100644 --- a/experimental/ast/expr_prefixed.go +++ b/experimental/ast/expr_prefixed.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/expr_range.go b/experimental/ast/expr_range.go index 1446fcb35..ad0d9fd20 100644 --- a/experimental/ast/expr_range.go +++ b/experimental/ast/expr_range.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/nodes.go b/experimental/ast/nodes.go index 8d975da16..ba0970fb8 100644 --- a/experimental/ast/nodes.go +++ b/experimental/ast/nodes.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/options.go b/experimental/ast/options.go index ed30ecbbd..5b1218ab7 100644 --- a/experimental/ast/options.go +++ b/experimental/ast/options.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/path.go b/experimental/ast/path.go index b61af9719..cd056c30d 100644 --- a/experimental/ast/path.go +++ b/experimental/ast/path.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/path_test.go b/experimental/ast/path_test.go index a6f8a6b3f..9cd88adf5 100644 --- a/experimental/ast/path_test.go +++ b/experimental/ast/path_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/predeclared/predeclared.go b/experimental/ast/predeclared/predeclared.go index 63e5cf0ea..214729dd0 100644 --- a/experimental/ast/predeclared/predeclared.go +++ b/experimental/ast/predeclared/predeclared.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/predeclared/predeclared_test.go b/experimental/ast/predeclared/predeclared_test.go index 364bd6f8e..bbd6b7a65 100644 --- a/experimental/ast/predeclared/predeclared_test.go +++ b/experimental/ast/predeclared/predeclared_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/syntax/doc.go b/experimental/ast/syntax/doc.go index 704bcc2b2..5ffabe193 100644 --- a/experimental/ast/syntax/doc.go +++ b/experimental/ast/syntax/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/syntax/editions.go b/experimental/ast/syntax/editions.go index 3103491d3..5ab937d0e 100644 --- a/experimental/ast/syntax/editions.go +++ b/experimental/ast/syntax/editions.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/syntax/name.go b/experimental/ast/syntax/name.go index 1b2fa7b25..e796ad574 100644 --- a/experimental/ast/syntax/name.go +++ b/experimental/ast/syntax/name.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/syntax/syntax.go b/experimental/ast/syntax/syntax.go index bebde67fa..68eaade49 100644 --- a/experimental/ast/syntax/syntax.go +++ b/experimental/ast/syntax/syntax.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/syntax/syntax.yaml b/experimental/ast/syntax/syntax.yaml index 7c90b5be0..e683cad1b 100644 --- a/experimental/ast/syntax/syntax.yaml +++ b/experimental/ast/syntax/syntax.yaml @@ -1,10 +1,10 @@ -# Copyright 2020-2024 Buf Technologies, Inc. +# Copyright 2020-2026 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http:#www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/experimental/ast/syntax/syntax_test.go b/experimental/ast/syntax/syntax_test.go index 73ceda607..dde2e1112 100644 --- a/experimental/ast/syntax/syntax_test.go +++ b/experimental/ast/syntax/syntax_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/type.go b/experimental/ast/type.go index ec7f59705..6d602b81a 100644 --- a/experimental/ast/type.go +++ b/experimental/ast/type.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/type_generic.go b/experimental/ast/type_generic.go index 06cf448a4..b64f72b05 100644 --- a/experimental/ast/type_generic.go +++ b/experimental/ast/type_generic.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/type_prefixed.go b/experimental/ast/type_prefixed.go index 8aba25b79..6391cc273 100644 --- a/experimental/ast/type_prefixed.go +++ b/experimental/ast/type_prefixed.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ast/zero_test.go b/experimental/ast/zero_test.go index f6e8c837d..83b597113 100644 --- a/experimental/ast/zero_test.go +++ b/experimental/ast/zero_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/benchmark/benchmark_test.go b/experimental/benchmark/benchmark_test.go index fcadec167..761a9508e 100644 --- a/experimental/benchmark/benchmark_test.go +++ b/experimental/benchmark/benchmark_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/dom/dom.go b/experimental/dom/dom.go index 1c2d1f683..1f44418e4 100644 --- a/experimental/dom/dom.go +++ b/experimental/dom/dom.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/dom/layout.go b/experimental/dom/layout.go index 8d17990e4..3f1fd5595 100644 --- a/experimental/dom/layout.go +++ b/experimental/dom/layout.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/dom/print.go b/experimental/dom/print.go index 3720bdbf6..0ff8c6b46 100644 --- a/experimental/dom/print.go +++ b/experimental/dom/print.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/dom/tags.go b/experimental/dom/tags.go index f6fb0833e..b9c142bd5 100644 --- a/experimental/dom/tags.go +++ b/experimental/dom/tags.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/block.go b/experimental/expr/block.go index 888153238..c4ee5fbc9 100644 --- a/experimental/expr/block.go +++ b/experimental/expr/block.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/call.go b/experimental/expr/call.go index aa21f638e..a8957b514 100644 --- a/experimental/expr/call.go +++ b/experimental/expr/call.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/context.go b/experimental/expr/context.go index a433fa8d3..6ad57440e 100644 --- a/experimental/expr/context.go +++ b/experimental/expr/context.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/control.go b/experimental/expr/control.go index fc7b49369..b4432d1e2 100644 --- a/experimental/expr/control.go +++ b/experimental/expr/control.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/doc.go b/experimental/expr/doc.go index 1ec1531a4..5bbcfab82 100644 --- a/experimental/expr/doc.go +++ b/experimental/expr/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/error.go b/experimental/expr/error.go index 98b3db5d7..02ff36907 100644 --- a/experimental/expr/error.go +++ b/experimental/expr/error.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/expr.go b/experimental/expr/expr.go index 119a6fe28..c89da1383 100644 --- a/experimental/expr/expr.go +++ b/experimental/expr/expr.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/for.go b/experimental/expr/for.go index 6e9d74f7a..e2dc4bb03 100644 --- a/experimental/expr/for.go +++ b/experimental/expr/for.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/func.go b/experimental/expr/func.go index fa60b4c0e..47f14e343 100644 --- a/experimental/expr/func.go +++ b/experimental/expr/func.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/if.go b/experimental/expr/if.go index c7efc2a3f..373b8efef 100644 --- a/experimental/expr/if.go +++ b/experimental/expr/if.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/kind.go b/experimental/expr/kind.go index 496608b71..e2c103b46 100644 --- a/experimental/expr/kind.go +++ b/experimental/expr/kind.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/kind.yaml b/experimental/expr/kind.yaml index 794fb1ed6..99353cd10 100644 --- a/experimental/expr/kind.yaml +++ b/experimental/expr/kind.yaml @@ -1,10 +1,10 @@ -# Copyright 2020-2024 Buf Technologies, Inc. +# Copyright 2020-2026 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http:#www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/experimental/expr/op.go b/experimental/expr/op.go index 6bfaf7784..526849e91 100644 --- a/experimental/expr/op.go +++ b/experimental/expr/op.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/params.go b/experimental/expr/params.go index ed4c461ab..f83d4142e 100644 --- a/experimental/expr/params.go +++ b/experimental/expr/params.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/record.go b/experimental/expr/record.go index 32de7fd29..1eafe431d 100644 --- a/experimental/expr/record.go +++ b/experimental/expr/record.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/switch.go b/experimental/expr/switch.go index f066a0ddd..25d659b08 100644 --- a/experimental/expr/switch.go +++ b/experimental/expr/switch.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/expr/token.go b/experimental/expr/token.go index b875c9854..fa3cca4ec 100644 --- a/experimental/expr/token.go +++ b/experimental/expr/token.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/fdp/comments.go b/experimental/fdp/comments.go index 628edf5f4..1c7fc623e 100644 --- a/experimental/fdp/comments.go +++ b/experimental/fdp/comments.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/fdp/comments_test.go b/experimental/fdp/comments_test.go index b0498e7d7..0b4226f39 100644 --- a/experimental/fdp/comments_test.go +++ b/experimental/fdp/comments_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/fdp/descriptor.go b/experimental/fdp/descriptor.go index 2cb925254..dc07e135a 100644 --- a/experimental/fdp/descriptor.go +++ b/experimental/fdp/descriptor.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/fdp/generator.go b/experimental/fdp/generator.go index 6a442099f..033aeaf51 100644 --- a/experimental/fdp/generator.go +++ b/experimental/fdp/generator.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/fdp/sourcepath.go b/experimental/fdp/sourcepath.go index b309f976f..8b7b47549 100644 --- a/experimental/fdp/sourcepath.go +++ b/experimental/fdp/sourcepath.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/id/context.go b/experimental/id/context.go index 3e918db69..63791cb27 100644 --- a/experimental/id/context.go +++ b/experimental/id/context.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/id/doc.go b/experimental/id/doc.go index 48e514c0c..fba658d71 100644 --- a/experimental/id/doc.go +++ b/experimental/id/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/id/id.go b/experimental/id/id.go index 0dc42e9b5..a1ee7c26a 100644 --- a/experimental/id/id.go +++ b/experimental/id/id.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/id/node.go b/experimental/id/node.go index b26e42c80..c1e7ec46c 100644 --- a/experimental/id/node.go +++ b/experimental/id/node.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/id/seq.go b/experimental/id/seq.go index 1951bc8db..cc42338f6 100644 --- a/experimental/id/seq.go +++ b/experimental/id/seq.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/cyclic_test.go b/experimental/incremental/cyclic_test.go index 10eb17d0c..9195b515e 100644 --- a/experimental/incremental/cyclic_test.go +++ b/experimental/incremental/cyclic_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/doc.go b/experimental/incremental/doc.go index a5b5f387e..c3733cfc9 100644 --- a/experimental/incremental/doc.go +++ b/experimental/incremental/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/executor.go b/experimental/incremental/executor.go index a7b85a2be..98641060e 100644 --- a/experimental/incremental/executor.go +++ b/experimental/incremental/executor.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/executor_test.go b/experimental/incremental/executor_test.go index b95d4b11f..be34503a9 100644 --- a/experimental/incremental/executor_test.go +++ b/experimental/incremental/executor_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/export_test.go b/experimental/incremental/export_test.go index 4945211b1..26b57a9c0 100644 --- a/experimental/incremental/export_test.go +++ b/experimental/incremental/export_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/panic_test.go b/experimental/incremental/panic_test.go index b08009b09..6ddbfec28 100644 --- a/experimental/incremental/panic_test.go +++ b/experimental/incremental/panic_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/queries/ast.go b/experimental/incremental/queries/ast.go index 60cc949db..5889518ec 100644 --- a/experimental/incremental/queries/ast.go +++ b/experimental/incremental/queries/ast.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/queries/fdp.go b/experimental/incremental/queries/fdp.go index 00982e777..b23728a2e 100644 --- a/experimental/incremental/queries/fdp.go +++ b/experimental/incremental/queries/fdp.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/queries/fds.go b/experimental/incremental/queries/fds.go index b3d8281e7..feb534fca 100644 --- a/experimental/incremental/queries/fds.go +++ b/experimental/incremental/queries/fds.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/queries/file.go b/experimental/incremental/queries/file.go index d8cf738a8..b906e7dbd 100644 --- a/experimental/incremental/queries/file.go +++ b/experimental/incremental/queries/file.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/queries/ir.go b/experimental/incremental/queries/ir.go index 16e335bec..bcf8632ee 100644 --- a/experimental/incremental/queries/ir.go +++ b/experimental/incremental/queries/ir.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/queries/link.go b/experimental/incremental/queries/link.go index a96338490..8835899d8 100644 --- a/experimental/incremental/queries/link.go +++ b/experimental/incremental/queries/link.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/queries/queries.go b/experimental/incremental/queries/queries.go index e8d0ac7d2..224eec1a2 100644 --- a/experimental/incremental/queries/queries.go +++ b/experimental/incremental/queries/queries.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/query.go b/experimental/incremental/query.go index 103556e2f..de5477ff8 100644 --- a/experimental/incremental/query.go +++ b/experimental/incremental/query.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/starve_test.go b/experimental/incremental/starve_test.go index 9fbc86ae4..e84835ec9 100644 --- a/experimental/incremental/starve_test.go +++ b/experimental/incremental/starve_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/incremental/task.go b/experimental/incremental/task.go index 87a74c2c4..6673da2e1 100644 --- a/experimental/incremental/task.go +++ b/experimental/incremental/task.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/astx/encode.go b/experimental/internal/astx/encode.go index 57fa0027a..96d43a30b 100644 --- a/experimental/internal/astx/encode.go +++ b/experimental/internal/astx/encode.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/astx/path.go b/experimental/internal/astx/path.go index e8a67dc6b..73ddb2535 100644 --- a/experimental/internal/astx/path.go +++ b/experimental/internal/astx/path.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/astx/path_test.go b/experimental/internal/astx/path_test.go index 63977186e..dd2f19c47 100644 --- a/experimental/internal/astx/path_test.go +++ b/experimental/internal/astx/path_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/cycle/cycle.go b/experimental/internal/cycle/cycle.go index 598a67373..c4373b8c0 100644 --- a/experimental/internal/cycle/cycle.go +++ b/experimental/internal/cycle/cycle.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/erredition/erredition.go b/experimental/internal/erredition/erredition.go index 28d77491f..202f947e8 100644 --- a/experimental/internal/erredition/erredition.go +++ b/experimental/internal/erredition/erredition.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/erredition/normalize.go b/experimental/internal/erredition/normalize.go index f2445627f..e9dadc6d3 100644 --- a/experimental/internal/erredition/normalize.go +++ b/experimental/internal/erredition/normalize.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/erredition/normalize_test.go b/experimental/internal/erredition/normalize_test.go index 4167cb224..4d040933b 100644 --- a/experimental/internal/erredition/normalize_test.go +++ b/experimental/internal/erredition/normalize_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/errtoken/braces.go b/experimental/internal/errtoken/braces.go index 6d2a1a1fb..790e9d522 100644 --- a/experimental/internal/errtoken/braces.go +++ b/experimental/internal/errtoken/braces.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/errtoken/number.go b/experimental/internal/errtoken/number.go index 228ea6e34..936097126 100644 --- a/experimental/internal/errtoken/number.go +++ b/experimental/internal/errtoken/number.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/errtoken/strings.go b/experimental/internal/errtoken/strings.go index 65bd1ad11..17f25d474 100644 --- a/experimental/internal/errtoken/strings.go +++ b/experimental/internal/errtoken/strings.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/errtoken/unexpected.go b/experimental/internal/errtoken/unexpected.go index 732684c78..2baeff3c2 100644 --- a/experimental/internal/errtoken/unexpected.go +++ b/experimental/internal/errtoken/unexpected.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/exprx/encode.go b/experimental/internal/exprx/encode.go index d43e1e692..e71476771 100644 --- a/experimental/internal/exprx/encode.go +++ b/experimental/internal/exprx/encode.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/just/just.go b/experimental/internal/just/just.go index 9555a2f72..95891d42c 100644 --- a/experimental/internal/just/just.go +++ b/experimental/internal/just/just.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/lexer/lexer.go b/experimental/internal/lexer/lexer.go index 6ca824027..5b0ea24c3 100644 --- a/experimental/internal/lexer/lexer.go +++ b/experimental/internal/lexer/lexer.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/lexer/lexer_test.go b/experimental/internal/lexer/lexer_test.go index 6fcd3e0bc..534774e25 100644 --- a/experimental/internal/lexer/lexer_test.go +++ b/experimental/internal/lexer/lexer_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/lexer/loop.go b/experimental/internal/lexer/loop.go index 54185dc53..d3cf90164 100644 --- a/experimental/internal/lexer/loop.go +++ b/experimental/internal/lexer/loop.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/lexer/math.go b/experimental/internal/lexer/math.go index a2ece2033..e12507f7a 100644 --- a/experimental/internal/lexer/math.go +++ b/experimental/internal/lexer/math.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/lexer/number.go b/experimental/internal/lexer/number.go index 753d37b0b..100a734c0 100644 --- a/experimental/internal/lexer/number.go +++ b/experimental/internal/lexer/number.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/lexer/progress.go b/experimental/internal/lexer/progress.go index 6daaa2894..36b3d5f7a 100644 --- a/experimental/internal/lexer/progress.go +++ b/experimental/internal/lexer/progress.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/lexer/string.go b/experimental/internal/lexer/string.go index 68edbb570..7c85ea36a 100644 --- a/experimental/internal/lexer/string.go +++ b/experimental/internal/lexer/string.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/lexer/testdata/encoding/utf16be-bom.proto b/experimental/internal/lexer/testdata/encoding/utf16be-bom.proto index 58d63c323..dd63c4d2b 100644 Binary files a/experimental/internal/lexer/testdata/encoding/utf16be-bom.proto and b/experimental/internal/lexer/testdata/encoding/utf16be-bom.proto differ diff --git a/experimental/internal/lexer/testdata/encoding/utf16be.proto b/experimental/internal/lexer/testdata/encoding/utf16be.proto index 58d63c323..dd63c4d2b 100644 Binary files a/experimental/internal/lexer/testdata/encoding/utf16be.proto and b/experimental/internal/lexer/testdata/encoding/utf16be.proto differ diff --git a/experimental/internal/lexer/testdata/encoding/utf16le-bom.proto b/experimental/internal/lexer/testdata/encoding/utf16le-bom.proto index ac7053438..1387a8d47 100644 Binary files a/experimental/internal/lexer/testdata/encoding/utf16le-bom.proto and b/experimental/internal/lexer/testdata/encoding/utf16le-bom.proto differ diff --git a/experimental/internal/lexer/testdata/encoding/utf16le.proto b/experimental/internal/lexer/testdata/encoding/utf16le.proto index ac7053438..1387a8d47 100644 Binary files a/experimental/internal/lexer/testdata/encoding/utf16le.proto and b/experimental/internal/lexer/testdata/encoding/utf16le.proto differ diff --git a/experimental/internal/lexer/testdata/encoding/utf8-bom.proto b/experimental/internal/lexer/testdata/encoding/utf8-bom.proto index b8784a976..6824d67c8 100644 --- a/experimental/internal/lexer/testdata/encoding/utf8-bom.proto +++ b/experimental/internal/lexer/testdata/encoding/utf8-bom.proto @@ -1,17 +1,4 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - + //% keywords: //% soft: [syntax] //% hard: ["=", ";"] diff --git a/experimental/internal/lexer/testdata/encoding/utf8-bom.proto.tokens.tsv b/experimental/internal/lexer/testdata/encoding/utf8-bom.proto.tokens.tsv index acc5170f3..44fe04359 100644 --- a/experimental/internal/lexer/testdata/encoding/utf8-bom.proto.tokens.tsv +++ b/experimental/internal/lexer/testdata/encoding/utf8-bom.proto.tokens.tsv @@ -1,43 +1,17 @@ # kind keyword offsets linecol text 0 Unrecognized Unknown 000:003 001:001 "\ufeff" -1 Comment Comment 003:048 001:001 "// Copyright 2020-2024 Buf Technologies, Inc." -2 Space Unknown 048:049 001:046 "\n" -3 Comment Comment 049:051 002:001 "//" -4 Space Unknown 051:052 002:003 "\n" -5 Comment Comment 052:118 003:001 "// Licensed under the Apache License, Version 2.0 (the \"License\");" -6 Space Unknown 118:119 003:067 "\n" -7 Comment Comment 119:186 004:001 "// you may not use this file except in compliance with the License." -8 Space Unknown 186:187 004:068 "\n" -9 Comment Comment 187:229 005:001 "// You may obtain a copy of the License at" -10 Space Unknown 229:230 005:043 "\n" -11 Comment Comment 230:232 006:001 "//" -12 Space Unknown 232:233 006:003 "\n" -13 Comment Comment 233:283 007:001 "// http://www.apache.org/licenses/LICENSE-2.0" -14 Space Unknown 283:284 007:051 "\n" -15 Comment Comment 284:286 008:001 "//" -16 Space Unknown 286:287 008:003 "\n" -17 Comment Comment 287:357 009:001 "// Unless required by applicable law or agreed to in writing, software" -18 Space Unknown 357:358 009:071 "\n" -19 Comment Comment 358:426 010:001 "// distributed under the License is distributed on an \"AS IS\" BASIS," -20 Space Unknown 426:427 010:069 "\n" -21 Comment Comment 427:502 011:001 "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied." -22 Space Unknown 502:503 011:076 "\n" -23 Comment Comment 503:573 012:001 "// See the License for the specific language governing permissions and" -24 Space Unknown 573:574 012:071 "\n" -25 Comment Comment 574:607 013:001 "// limitations under the License." -26 Space Unknown 607:608 013:034 "\n" -27 Space Unknown 608:609 014:001 "\n" -28 Comment Comment 609:622 015:001 "//% keywords:" -29 Space Unknown 622:623 015:014 "\n" -30 Comment Comment 623:643 016:001 "//% soft: [syntax]" -31 Space Unknown 643:644 016:021 "\n" -32 Comment Comment 644:666 017:001 "//% hard: [\"=\", \";\"]" -33 Space Unknown 666:667 017:023 "\n" -34 Comment Comment 667:693 018:001 "//% line_comment: [\"//\"]" -35 Space Unknown 693:694 018:027 "\n" -36 Ident Syntax 694:700 019:001 "syntax" -37 Space Unknown 700:701 019:007 " " -38 Keyword Assign 701:702 019:008 "=" -39 Space Unknown 702:703 019:009 " " -40 String Unknown 703:711 019:010 "\"proto2\"" string:"proto2" -41 Keyword Semi 711:712 019:018 ";" +1 Space Unknown 003:004 001:001 "\n" +2 Comment Comment 004:017 002:001 "//% keywords:" +3 Space Unknown 017:018 002:014 "\n" +4 Comment Comment 018:038 003:001 "//% soft: [syntax]" +5 Space Unknown 038:039 003:021 "\n" +6 Comment Comment 039:061 004:001 "//% hard: [\"=\", \";\"]" +7 Space Unknown 061:062 004:023 "\n" +8 Comment Comment 062:088 005:001 "//% line_comment: [\"//\"]" +9 Space Unknown 088:089 005:027 "\n" +10 Ident Syntax 089:095 006:001 "syntax" +11 Space Unknown 095:096 006:007 " " +12 Keyword Assign 096:097 006:008 "=" +13 Space Unknown 097:098 006:009 " " +14 String Unknown 098:106 006:010 "\"proto2\"" string:"proto2" +15 Keyword Semi 106:107 006:018 ";" diff --git a/experimental/internal/lexer/testdata/encoding/utf8-invalid.proto b/experimental/internal/lexer/testdata/encoding/utf8-invalid.proto index 264877c66..b3bb3ea7d 100644 --- a/experimental/internal/lexer/testdata/encoding/utf8-invalid.proto +++ b/experimental/internal/lexer/testdata/encoding/utf8-invalid.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% keywords: //% soft: [syntax] //% hard: ["=", ";"] diff --git a/experimental/internal/lexer/testdata/encoding/utf8-invalid.proto.stderr.txt b/experimental/internal/lexer/testdata/encoding/utf8-invalid.proto.stderr.txt index 00c148cc8..4baa0fa8a 100644 --- a/experimental/internal/lexer/testdata/encoding/utf8-invalid.proto.stderr.txt +++ b/experimental/internal/lexer/testdata/encoding/utf8-invalid.proto.stderr.txt @@ -1,9 +1,9 @@ error: input appears to be encoded with UTF-8, but found invalid byte - --> testdata/encoding/utf8-invalid.proto:19:11 + --> testdata/encoding/utf8-invalid.proto:5:11 | -19 | syntax = ""; + 5 | syntax = ""; | ^^^^ - = note: non-UTF-8 byte occurs at offset 701 (0x2bd) + = note: non-UTF-8 byte occurs at offset 95 (0x5f) = note: Protobuf files must be UTF-8 encoded encountered 1 error diff --git a/experimental/internal/lexer/testdata/smoke.proto b/experimental/internal/lexer/testdata/smoke.proto index 98bdc80a0..05f5c66bb 100644 --- a/experimental/internal/lexer/testdata/smoke.proto +++ b/experimental/internal/lexer/testdata/smoke.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% keywords: //% soft: [syntax, package, message, int64, string] //% hard: ["=", ".", ";", ","] diff --git a/experimental/internal/lexer/testdata/smoke.proto.tokens.tsv b/experimental/internal/lexer/testdata/smoke.proto.tokens.tsv index ffe48e3fa..9d46336f8 100644 --- a/experimental/internal/lexer/testdata/smoke.proto.tokens.tsv +++ b/experimental/internal/lexer/testdata/smoke.proto.tokens.tsv @@ -1,109 +1,82 @@ # kind keyword offsets linecol text -0 Comment Comment 000:045 001:001 "// Copyright 2020-2024 Buf Technologies, Inc." -1 Space Unknown 045:046 001:046 "\n" -2 Comment Comment 046:048 002:001 "//" -3 Space Unknown 048:049 002:003 "\n" -4 Comment Comment 049:115 003:001 "// Licensed under the Apache License, Version 2.0 (the \"License\");" -5 Space Unknown 115:116 003:067 "\n" -6 Comment Comment 116:183 004:001 "// you may not use this file except in compliance with the License." -7 Space Unknown 183:184 004:068 "\n" -8 Comment Comment 184:226 005:001 "// You may obtain a copy of the License at" -9 Space Unknown 226:227 005:043 "\n" -10 Comment Comment 227:229 006:001 "//" -11 Space Unknown 229:230 006:003 "\n" -12 Comment Comment 230:280 007:001 "// http://www.apache.org/licenses/LICENSE-2.0" -13 Space Unknown 280:281 007:051 "\n" -14 Comment Comment 281:283 008:001 "//" -15 Space Unknown 283:284 008:003 "\n" -16 Comment Comment 284:354 009:001 "// Unless required by applicable law or agreed to in writing, software" -17 Space Unknown 354:355 009:071 "\n" -18 Comment Comment 355:423 010:001 "// distributed under the License is distributed on an \"AS IS\" BASIS," -19 Space Unknown 423:424 010:069 "\n" -20 Comment Comment 424:499 011:001 "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied." -21 Space Unknown 499:500 011:076 "\n" -22 Comment Comment 500:570 012:001 "// See the License for the specific language governing permissions and" -23 Space Unknown 570:571 012:071 "\n" -24 Comment Comment 571:604 013:001 "// limitations under the License." -25 Space Unknown 604:605 013:034 "\n" -26 Space Unknown 605:606 014:001 "\n" -27 Comment Comment 606:619 015:001 "//% keywords:" -28 Space Unknown 619:620 015:014 "\n" -29 Comment Comment 620:673 016:001 "//% soft: [syntax, package, message, int64, string]" -30 Space Unknown 673:674 016:054 "\n" -31 Comment Comment 674:706 017:001 "//% hard: [\"=\", \".\", \";\", \",\"]" -32 Space Unknown 706:707 017:033 "\n" -33 Comment Comment 707:752 018:001 "//% bracket: [\"(\", \")\", \"[\", \"]\", \"{\", \"}\"]" -34 Space Unknown 752:753 018:046 "\n" -35 Comment Comment 753:779 019:001 "//% line_comment: [\"//\"]" -36 Space Unknown 779:780 019:027 "\n" -37 Ident Syntax 780:786 020:001 "syntax" -38 Space Unknown 786:787 020:007 " " -39 Keyword Assign 787:788 020:008 "=" -40 Space Unknown 788:789 020:009 " " -41 String Unknown 789:797 020:010 "\"proto3\"" string:"proto3" -42 Keyword Semi 797:798 020:018 ";" -43 Space Unknown 798:799 020:019 "\n" -44 Space Unknown 799:800 021:001 "\n" -45 Ident Package 800:807 022:001 "package" -46 Space Unknown 807:808 022:008 " " -47 Ident Unknown 808:811 022:009 "foo" -48 Keyword Dot 811:812 022:012 "." -49 Ident Unknown 812:815 022:013 "bar" -50 Keyword Semi 815:816 022:016 ";" -51 Space Unknown 816:817 022:017 "\n" -52 Space Unknown 817:818 023:001 "\n" -53 Comment Comment 818:843 024:001 "// This is a doc comment." -54 Space Unknown 843:844 024:026 "\n" -55 Ident Message 844:851 025:001 "message" -56 Space Unknown 851:852 025:008 " " -57 Ident Unknown 852:855 025:009 "Foo" -58 Space Unknown 855:856 025:012 " " -59 Keyword Braces 856:960 025:013 "{" close:Token(107) -60 Space Unknown 857:858 025:014 "\n" -61 Space Unknown 858:862 026:001 " " -62 Ident Int64 862:867 026:005 "int64" -63 Space Unknown 867:868 026:010 " " -64 Ident Unknown 868:869 026:011 "x" -65 Space Unknown 869:870 026:012 " " -66 Keyword Assign 870:871 026:013 "=" -67 Space Unknown 871:872 026:014 " " -68 Number Unknown 872:873 026:015 "1" int:1/10/1 -69 Keyword Semi 873:874 026:016 ";" -70 Space Unknown 874:875 026:017 "\n" -71 Space Unknown 875:879 027:001 " " -72 Ident String 879:885 027:005 "string" -73 Space Unknown 885:886 027:011 " " -74 Ident Unknown 886:887 027:012 "y" -75 Space Unknown 887:888 027:013 " " -76 Keyword Assign 888:889 027:014 "=" -77 Space Unknown 889:890 027:015 " " -78 Number Unknown 890:891 027:016 "2" int:2/10/1 -79 Space Unknown 891:892 027:017 " " -80 Keyword Brackets 892:957 027:018 "[" close:Token(104) -81 Space Unknown 893:894 027:019 "\n" -82 Space Unknown 894:902 028:001 " " -83 Keyword Parens 902:913 028:009 "(" close:Token(87) -84 Ident Unknown 903:905 028:010 "my" -85 Keyword Dot 905:906 028:012 "." -86 Ident Unknown 906:912 028:013 "option" -87 Keyword Parens 902:913 028:009 ")" open:Token(83) -88 Keyword Dot 913:914 028:020 "." -89 Ident Unknown 914:919 028:021 "thing" -90 Space Unknown 919:920 028:026 " " -91 Keyword Assign 920:921 028:027 "=" -92 Space Unknown 921:922 028:028 " " -93 Number Unknown 922:926 028:029 "0xff" int:255/16/1 pre:"0x" -94 Keyword Comma 926:927 028:033 "," -95 Space Unknown 927:928 028:034 "\n" -96 Space Unknown 928:936 029:001 " " -97 Ident Unknown 936:940 029:009 "blah" -98 Space Unknown 940:941 029:013 " " -99 Keyword Assign 941:942 029:014 "=" -100 Space Unknown 942:943 029:015 " " -101 String Unknown 943:951 029:016 "\"\\0\\n\\t\"" string:"\x00\n\t" -102 Space Unknown 951:952 029:024 "\n" -103 Space Unknown 952:956 030:001 " " -104 Keyword Brackets 892:957 027:018 "]" open:Token(80) -105 Keyword Semi 957:958 030:006 ";" -106 Space Unknown 958:959 030:007 "\n" -107 Keyword Braces 856:960 025:013 "}" open:Token(59) +0 Comment Comment 000:013 001:001 "//% keywords:" +1 Space Unknown 013:014 001:014 "\n" +2 Comment Comment 014:067 002:001 "//% soft: [syntax, package, message, int64, string]" +3 Space Unknown 067:068 002:054 "\n" +4 Comment Comment 068:100 003:001 "//% hard: [\"=\", \".\", \";\", \",\"]" +5 Space Unknown 100:101 003:033 "\n" +6 Comment Comment 101:146 004:001 "//% bracket: [\"(\", \")\", \"[\", \"]\", \"{\", \"}\"]" +7 Space Unknown 146:147 004:046 "\n" +8 Comment Comment 147:173 005:001 "//% line_comment: [\"//\"]" +9 Space Unknown 173:174 005:027 "\n" +10 Ident Syntax 174:180 006:001 "syntax" +11 Space Unknown 180:181 006:007 " " +12 Keyword Assign 181:182 006:008 "=" +13 Space Unknown 182:183 006:009 " " +14 String Unknown 183:191 006:010 "\"proto3\"" string:"proto3" +15 Keyword Semi 191:192 006:018 ";" +16 Space Unknown 192:193 006:019 "\n" +17 Space Unknown 193:194 007:001 "\n" +18 Ident Package 194:201 008:001 "package" +19 Space Unknown 201:202 008:008 " " +20 Ident Unknown 202:205 008:009 "foo" +21 Keyword Dot 205:206 008:012 "." +22 Ident Unknown 206:209 008:013 "bar" +23 Keyword Semi 209:210 008:016 ";" +24 Space Unknown 210:211 008:017 "\n" +25 Space Unknown 211:212 009:001 "\n" +26 Comment Comment 212:237 010:001 "// This is a doc comment." +27 Space Unknown 237:238 010:026 "\n" +28 Ident Message 238:245 011:001 "message" +29 Space Unknown 245:246 011:008 " " +30 Ident Unknown 246:249 011:009 "Foo" +31 Space Unknown 249:250 011:012 " " +32 Keyword Braces 250:354 011:013 "{" close:Token(80) +33 Space Unknown 251:252 011:014 "\n" +34 Space Unknown 252:256 012:001 " " +35 Ident Int64 256:261 012:005 "int64" +36 Space Unknown 261:262 012:010 " " +37 Ident Unknown 262:263 012:011 "x" +38 Space Unknown 263:264 012:012 " " +39 Keyword Assign 264:265 012:013 "=" +40 Space Unknown 265:266 012:014 " " +41 Number Unknown 266:267 012:015 "1" int:1/10/1 +42 Keyword Semi 267:268 012:016 ";" +43 Space Unknown 268:269 012:017 "\n" +44 Space Unknown 269:273 013:001 " " +45 Ident String 273:279 013:005 "string" +46 Space Unknown 279:280 013:011 " " +47 Ident Unknown 280:281 013:012 "y" +48 Space Unknown 281:282 013:013 " " +49 Keyword Assign 282:283 013:014 "=" +50 Space Unknown 283:284 013:015 " " +51 Number Unknown 284:285 013:016 "2" int:2/10/1 +52 Space Unknown 285:286 013:017 " " +53 Keyword Brackets 286:351 013:018 "[" close:Token(77) +54 Space Unknown 287:288 013:019 "\n" +55 Space Unknown 288:296 014:001 " " +56 Keyword Parens 296:307 014:009 "(" close:Token(60) +57 Ident Unknown 297:299 014:010 "my" +58 Keyword Dot 299:300 014:012 "." +59 Ident Unknown 300:306 014:013 "option" +60 Keyword Parens 296:307 014:009 ")" open:Token(56) +61 Keyword Dot 307:308 014:020 "." +62 Ident Unknown 308:313 014:021 "thing" +63 Space Unknown 313:314 014:026 " " +64 Keyword Assign 314:315 014:027 "=" +65 Space Unknown 315:316 014:028 " " +66 Number Unknown 316:320 014:029 "0xff" int:255/16/1 pre:"0x" +67 Keyword Comma 320:321 014:033 "," +68 Space Unknown 321:322 014:034 "\n" +69 Space Unknown 322:330 015:001 " " +70 Ident Unknown 330:334 015:009 "blah" +71 Space Unknown 334:335 015:013 " " +72 Keyword Assign 335:336 015:014 "=" +73 Space Unknown 336:337 015:015 " " +74 String Unknown 337:345 015:016 "\"\\0\\n\\t\"" string:"\x00\n\t" +75 Space Unknown 345:346 015:024 "\n" +76 Space Unknown 346:350 016:001 " " +77 Keyword Brackets 286:351 013:018 "]" open:Token(53) +78 Keyword Semi 351:352 016:006 ";" +79 Space Unknown 352:353 016:007 "\n" +80 Keyword Braces 250:354 011:013 "}" open:Token(32) diff --git a/experimental/internal/taxa/classify.go b/experimental/internal/taxa/classify.go index 94f3f129f..766313511 100644 --- a/experimental/internal/taxa/classify.go +++ b/experimental/internal/taxa/classify.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/taxa/noun.go b/experimental/internal/taxa/noun.go index 27318defa..741cd13a7 100644 --- a/experimental/internal/taxa/noun.go +++ b/experimental/internal/taxa/noun.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/taxa/noun.yaml b/experimental/internal/taxa/noun.yaml index d9ad0692c..c64188da8 100644 --- a/experimental/internal/taxa/noun.yaml +++ b/experimental/internal/taxa/noun.yaml @@ -1,10 +1,10 @@ -# Copyright 2020-2024 Buf Technologies, Inc. +# Copyright 2020-2026 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http:#www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/experimental/internal/taxa/set.go b/experimental/internal/taxa/set.go index bc56681d5..cdcb8f276 100644 --- a/experimental/internal/taxa/set.go +++ b/experimental/internal/taxa/set.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/taxa/taxa.go b/experimental/internal/taxa/taxa.go index 75fd0742d..d794abfef 100644 --- a/experimental/internal/taxa/taxa.go +++ b/experimental/internal/taxa/taxa.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/taxa/taxa_test.go b/experimental/internal/taxa/taxa_test.go index 3c8e1914c..25a11b36c 100644 --- a/experimental/internal/taxa/taxa_test.go +++ b/experimental/internal/taxa/taxa_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/tokenmeta/meta.go b/experimental/internal/tokenmeta/meta.go index 9bee7f516..1775db7cb 100644 --- a/experimental/internal/tokenmeta/meta.go +++ b/experimental/internal/tokenmeta/meta.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/internal/with.go b/experimental/internal/with.go index 5cf0f2253..ac63ef604 100644 --- a/experimental/internal/with.go +++ b/experimental/internal/with.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/builtins.go b/experimental/ir/builtins.go index 2d135e036..c27229b3c 100644 --- a/experimental/ir/builtins.go +++ b/experimental/ir/builtins.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/doc.go b/experimental/ir/doc.go index 1c7628653..adcbaf85f 100644 --- a/experimental/ir/doc.go +++ b/experimental/ir/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/duplicate.go b/experimental/ir/duplicate.go index 09fd0c79f..09267b0fe 100644 --- a/experimental/ir/duplicate.go +++ b/experimental/ir/duplicate.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/export_test.go b/experimental/ir/export_test.go index 83d294a14..6035bc75c 100644 --- a/experimental/ir/export_test.go +++ b/experimental/ir/export_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/ir_features.go b/experimental/ir/ir_features.go index bc449af8a..ef98df62d 100644 --- a/experimental/ir/ir_features.go +++ b/experimental/ir/ir_features.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/ir_file.go b/experimental/ir/ir_file.go index b9213f7de..05c5079dc 100644 --- a/experimental/ir/ir_file.go +++ b/experimental/ir/ir_file.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/ir_imports.go b/experimental/ir/ir_imports.go index d845e8929..a3f9b69b9 100644 --- a/experimental/ir/ir_imports.go +++ b/experimental/ir/ir_imports.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/ir_imports_test.go b/experimental/ir/ir_imports_test.go index 532d2ba97..0a372e154 100644 --- a/experimental/ir/ir_imports_test.go +++ b/experimental/ir/ir_imports_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/ir_member.go b/experimental/ir/ir_member.go index 4d77fe342..2e6f26e60 100644 --- a/experimental/ir/ir_member.go +++ b/experimental/ir/ir_member.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/ir_name.go b/experimental/ir/ir_name.go index 5272281a2..93cfa0112 100644 --- a/experimental/ir/ir_name.go +++ b/experimental/ir/ir_name.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/ir_name_test.go b/experimental/ir/ir_name_test.go index a5fa6f337..3bd8142c3 100644 --- a/experimental/ir/ir_name_test.go +++ b/experimental/ir/ir_name_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/ir_ref.go b/experimental/ir/ir_ref.go index d0e40fa09..c3bea41b3 100644 --- a/experimental/ir/ir_ref.go +++ b/experimental/ir/ir_ref.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/ir_service.go b/experimental/ir/ir_service.go index 2d8ddc57f..d8380fc64 100644 --- a/experimental/ir/ir_service.go +++ b/experimental/ir/ir_service.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/ir_symbol.go b/experimental/ir/ir_symbol.go index 0428e8996..ad3cfb419 100644 --- a/experimental/ir/ir_symbol.go +++ b/experimental/ir/ir_symbol.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/ir_test.go b/experimental/ir/ir_test.go index 9c5546062..8e9231350 100644 --- a/experimental/ir/ir_test.go +++ b/experimental/ir/ir_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/ir_type.go b/experimental/ir/ir_type.go index 1a4864bf1..595229b21 100644 --- a/experimental/ir/ir_type.go +++ b/experimental/ir/ir_type.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/ir_value.go b/experimental/ir/ir_value.go index 0abf3fb95..92050013d 100644 --- a/experimental/ir/ir_value.go +++ b/experimental/ir/ir_value.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/lower.go b/experimental/ir/lower.go index d966401ec..c9d698667 100644 --- a/experimental/ir/lower.go +++ b/experimental/ir/lower.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/lower_deprecated.go b/experimental/ir/lower_deprecated.go index cde4265b1..96f4166d7 100644 --- a/experimental/ir/lower_deprecated.go +++ b/experimental/ir/lower_deprecated.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/lower_eval.go b/experimental/ir/lower_eval.go index 6f6174830..49dab2019 100644 --- a/experimental/ir/lower_eval.go +++ b/experimental/ir/lower_eval.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/lower_features.go b/experimental/ir/lower_features.go index 627a7b8e3..8fd7aed28 100644 --- a/experimental/ir/lower_features.go +++ b/experimental/ir/lower_features.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/lower_imports.go b/experimental/ir/lower_imports.go index 4a27aa729..4903d74af 100644 --- a/experimental/ir/lower_imports.go +++ b/experimental/ir/lower_imports.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/lower_json.go b/experimental/ir/lower_json.go index 332287e3e..f9f0eae21 100644 --- a/experimental/ir/lower_json.go +++ b/experimental/ir/lower_json.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/lower_maps.go b/experimental/ir/lower_maps.go index 3008f213b..a956c2d01 100644 --- a/experimental/ir/lower_maps.go +++ b/experimental/ir/lower_maps.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/lower_numbers.go b/experimental/ir/lower_numbers.go index 296c8cd4d..97b4bd51e 100644 --- a/experimental/ir/lower_numbers.go +++ b/experimental/ir/lower_numbers.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/lower_options.go b/experimental/ir/lower_options.go index c6fb7d03d..22ad131de 100644 --- a/experimental/ir/lower_options.go +++ b/experimental/ir/lower_options.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/lower_resolve.go b/experimental/ir/lower_resolve.go index f56889ac0..86d454a0a 100644 --- a/experimental/ir/lower_resolve.go +++ b/experimental/ir/lower_resolve.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/lower_symbols.go b/experimental/ir/lower_symbols.go index 0d95e5cb4..56692ed07 100644 --- a/experimental/ir/lower_symbols.go +++ b/experimental/ir/lower_symbols.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/lower_validate.go b/experimental/ir/lower_validate.go index fd8fef4b3..b2b59e626 100644 --- a/experimental/ir/lower_validate.go +++ b/experimental/ir/lower_validate.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/lower_walk.go b/experimental/ir/lower_walk.go index 206efd494..faee44cb7 100644 --- a/experimental/ir/lower_walk.go +++ b/experimental/ir/lower_walk.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/option_target.go b/experimental/ir/option_target.go index cd19c97bd..9c0ed4cdb 100644 --- a/experimental/ir/option_target.go +++ b/experimental/ir/option_target.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/option_target.yaml b/experimental/ir/option_target.yaml index bc71e2087..78186d808 100644 --- a/experimental/ir/option_target.yaml +++ b/experimental/ir/option_target.yaml @@ -1,10 +1,10 @@ -# Copyright 2020-2024 Buf Technologies, Inc. +# Copyright 2020-2026 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http:#www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/experimental/ir/presence/doc.go b/experimental/ir/presence/doc.go index bec2c74bf..9ce47c96c 100644 --- a/experimental/ir/presence/doc.go +++ b/experimental/ir/presence/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/presence/kind.go b/experimental/ir/presence/kind.go index a62aab997..6681967bf 100644 --- a/experimental/ir/presence/kind.go +++ b/experimental/ir/presence/kind.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/presence/kind.yaml b/experimental/ir/presence/kind.yaml index 35c413776..c4d73c61d 100644 --- a/experimental/ir/presence/kind.yaml +++ b/experimental/ir/presence/kind.yaml @@ -1,10 +1,10 @@ -# Copyright 2020-2024 Buf Technologies, Inc. +# Copyright 2020-2026 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http:#www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/experimental/ir/sourceinfo/decode/decode.go b/experimental/ir/sourceinfo/decode/decode.go index 91f8bd2a2..aec24dbf4 100644 --- a/experimental/ir/sourceinfo/decode/decode.go +++ b/experimental/ir/sourceinfo/decode/decode.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/sourceinfo/sourceinfo.go b/experimental/ir/sourceinfo/sourceinfo.go index d7662ba37..3ec7744ad 100644 --- a/experimental/ir/sourceinfo/sourceinfo.go +++ b/experimental/ir/sourceinfo/sourceinfo.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/symbol_kind.go b/experimental/ir/symbol_kind.go index fe950414b..a5fe413dd 100644 --- a/experimental/ir/symbol_kind.go +++ b/experimental/ir/symbol_kind.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/symbol_kind.yaml b/experimental/ir/symbol_kind.yaml index 735dd56d8..bcdaec2cc 100644 --- a/experimental/ir/symbol_kind.yaml +++ b/experimental/ir/symbol_kind.yaml @@ -1,10 +1,10 @@ -# Copyright 2020-2024 Buf Technologies, Inc. +# Copyright 2020-2026 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http:#www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/experimental/ir/synthetic.go b/experimental/ir/synthetic.go index 9264bf8bf..fcbd174ea 100644 --- a/experimental/ir/synthetic.go +++ b/experimental/ir/synthetic.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/synthetic_test.go b/experimental/ir/synthetic_test.go index 15041d133..e7c2cc27b 100644 --- a/experimental/ir/synthetic_test.go +++ b/experimental/ir/synthetic_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/ir/testdata/builtins/broken_missing_required.proto.yaml b/experimental/ir/testdata/builtins/broken_missing_required.proto.yaml index e17c69146..79339a2b8 100644 --- a/experimental/ir/testdata/builtins/broken_missing_required.proto.yaml +++ b/experimental/ir/testdata/builtins/broken_missing_required.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # Tests that a genuinely broken descriptor.proto (missing required symbols # like FileOptions, MessageOptions, FieldOptions) is diagnosed by the # compiler with one error per missing required symbol, attached to diff --git a/experimental/ir/testdata/builtins/vendored_editions_unavailable.proto.yaml b/experimental/ir/testdata/builtins/vendored_editions_unavailable.proto.yaml index b1bb40fe2..d9da08ead 100644 --- a/experimental/ir/testdata/builtins/vendored_editions_unavailable.proto.yaml +++ b/experimental/ir/testdata/builtins/vendored_editions_unavailable.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # Tests the user-facing error when an editions file uses a `features` # option whose builtin is optional-and-missing in a vendored # pre-editions descriptor.proto. We want the diagnostic to point at diff --git a/experimental/ir/testdata/builtins/vendored_no_range_options.proto.yaml b/experimental/ir/testdata/builtins/vendored_no_range_options.proto.yaml index 0fa87fe2e..35d6a6b8f 100644 --- a/experimental/ir/testdata/builtins/vendored_no_range_options.proto.yaml +++ b/experimental/ir/testdata/builtins/vendored_no_range_options.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # Tests that a vendored pre-v3.4.0 descriptor.proto, which lacks # `DescriptorProto.ExtensionRange.options` and `ExtensionRangeOptions`, does # not crash the compiler when a user file declares an extension range bearing diff --git a/experimental/ir/testdata/builtins/vendored_proto3.proto.yaml b/experimental/ir/testdata/builtins/vendored_proto3.proto.yaml index 713075a1f..a661d30b9 100644 --- a/experimental/ir/testdata/builtins/vendored_proto3.proto.yaml +++ b/experimental/ir/testdata/builtins/vendored_proto3.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # Tests compilation with a vendored descriptor.proto from protobuf 3.x # (pre-editions). The descriptor.proto has all the basic descriptor types and # option types, but is missing FeatureSet, features fields on option types, diff --git a/experimental/ir/testdata/builtins/vendored_proto3_with_options.proto.yaml b/experimental/ir/testdata/builtins/vendored_proto3_with_options.proto.yaml index 5b1d07852..5f5fc4858 100644 --- a/experimental/ir/testdata/builtins/vendored_proto3_with_options.proto.yaml +++ b/experimental/ir/testdata/builtins/vendored_proto3_with_options.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # Tests that a proto3 file setting widely-used options (go_package, # java_package, field-level deprecated) compiles cleanly against a vendored # pre-editions descriptor.proto that lacks FeatureSet and related diff --git a/experimental/ir/testdata/comments/attribution.proto b/experimental/ir/testdata/comments/attribution.proto index a6a688970..3f85aab07 100644 --- a/experimental/ir/testdata/comments/attribution.proto +++ b/experimental/ir/testdata/comments/attribution.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% source_code_info: true edition = "2023"; diff --git a/experimental/ir/testdata/comments/attribution.proto.sci.yaml b/experimental/ir/testdata/comments/attribution.proto.sci.yaml index bb9e4325c..1d20804ac 100644 --- a/experimental/ir/testdata/comments/attribution.proto.sci.yaml +++ b/experimental/ir/testdata/comments/attribution.proto.sci.yaml @@ -1,278 +1,277 @@ "testdata/comments/attribution.proto": -- { path: "", start: { line: 16, column: 0 }, end: { line: 109, column: 1 } } +- { path: "", start: { line: 2, column: 0 }, end: { line: 95, column: 1 } } - path: ".syntax" - start: { line: 16, column: 0 } - end: { line: 16, column: 17 } + start: { line: 2, column: 0 } + end: { line: 2, column: 17 } leading: "% descriptor: true\n% source_code_info: true\n" - detached: {} - path: ".package" - start: { line: 19, column: 0 } - end: { line: 19, column: 17 } + start: { line: 5, column: 0 } + end: { line: 5, column: 17 } leading: " This is a leading comment for the package.\n" trailing: " This is still a trailing comment for the package.\n" - path: ".options" - start: { line: 24, column: 0 } - end: { line: 24, column: 47 } + start: { line: 10, column: 0 } + end: { line: 10, column: 47 } - path: ".options.java_package" - start: { line: 24, column: 0 } - end: { line: 24, column: 47 } + start: { line: 10, column: 0 } + end: { line: 10, column: 47 } leading: " This is a leading comment for the java_package option source code info, but not the\n top-level option source code info.\n" trailing: " Similarly, this is a trailing comment." - path: ".options" - start: { line: 25, column: 0 } - end: { line: 25, column: 34 } + start: { line: 11, column: 0 } + end: { line: 11, column: 34 } - path: ".options.java_multiple_files" - start: { line: 25, column: 0 } - end: { line: 25, column: 34 } + start: { line: 11, column: 0 } + end: { line: 11, column: 34 } - path: ".dependency.0" - start: { line: 29, column: 0 } - end: { line: 29, column: 49 } + start: { line: 15, column: 0 } + end: { line: 15, column: 49 } leading: " This is a leading comment for the import source code info, but not for the corresponding\n public import source code info.\n" trailing: " Same with this trailing comment." - path: ".public_dependency.0" - start: { line: 29, column: 7 } - end: { line: 29, column: 13 } + start: { line: 15, column: 7 } + end: { line: 15, column: 13 } - path: ".message_type[Foo]" - start: { line: 32, column: 0 } - end: { line: 58, column: 1 } + start: { line: 18, column: 0 } + end: { line: 44, column: 1 } leading: " This, as expected, is a leading comment for Foo.\n" trailing: " This is the TRAILING comment for Foo. (It is NOT\n a detached comment for baz.)\n" - path: ".message_type[Foo].name" - start: { line: 32, column: 32 } - end: { line: 32, column: 35 } + start: { line: 18, column: 32 } + end: { line: 18, column: 35 } - path: ".message_type[Foo].options" - start: { line: 37, column: 2 } - end: { line: 37, column: 18 } + start: { line: 23, column: 2 } + end: { line: 23, column: 18 } - path: ".message_type[Foo].options.0.0" - start: { line: 37, column: 2 } - end: { line: 37, column: 18 } + start: { line: 23, column: 2 } + end: { line: 23, column: 18 } leading: " Leading comment for message option\n" - path: ".message_type[Foo].options" - start: { line: 38, column: 2 } - end: { line: 38, column: 18 } + start: { line: 24, column: 2 } + end: { line: 24, column: 18 } - path: ".message_type[Foo].options.0.message_set_wire_format" - start: { line: 38, column: 2 } - end: { line: 38, column: 18 } + start: { line: 24, column: 2 } + end: { line: 24, column: 18 } trailing: " Trailing comment for the second message option" - path: ".message_type[Foo].field[baz].type" - start: { line: 41, column: 2 } - end: { line: 41, column: 8 } + start: { line: 27, column: 2 } + end: { line: 27, column: 8 } - path: ".message_type[Foo].field[baz]" - start: { line: 41, column: 2 } - end: { line: 41, column: 46 } + start: { line: 27, column: 2 } + end: { line: 27, column: 46 } leading: " This is a leading comment for baz.\n" trailing: " This is a trailing comment for baz.\n" - path: ".message_type[Foo].field[baz].name" - start: { line: 41, column: 38 } - end: { line: 41, column: 41 } + start: { line: 27, column: 38 } + end: { line: 27, column: 41 } - path: ".message_type[Foo].field[baz].number" - start: { line: 41, column: 44 } - end: { line: 41, column: 45 } + start: { line: 27, column: 44 } + end: { line: 27, column: 45 } - path: ".message_type[Foo].reserved_range" - start: { line: 45, column: 2 } - end: { line: 45, column: 74 } + start: { line: 31, column: 2 } + end: { line: 31, column: 74 } leading: " This is a leading comment for the reserved range.\n" trailing: " This is a trailing comment for the reserved range." - path: ".message_type[Foo].reserved_range[0]" - start: { line: 45, column: 11 } - end: { line: 45, column: 12 } + start: { line: 31, column: 11 } + end: { line: 31, column: 12 } - path: ".message_type[Foo].reserved_range[0].start" - start: { line: 45, column: 11 } - end: { line: 45, column: 12 } + start: { line: 31, column: 11 } + end: { line: 31, column: 12 } - path: ".message_type[Foo].reserved_range[0].end" - start: { line: 45, column: 11 } - end: { line: 45, column: 12 } + start: { line: 31, column: 11 } + end: { line: 31, column: 12 } - path: ".message_type[Foo].reserved_range[1].start" - start: { line: 45, column: 14 } - end: { line: 45, column: 15 } + start: { line: 31, column: 14 } + end: { line: 31, column: 15 } - path: ".message_type[Foo].reserved_range[1]" - start: { line: 45, column: 14 } - end: { line: 45, column: 20 } + start: { line: 31, column: 14 } + end: { line: 31, column: 20 } - path: ".message_type[Foo].reserved_range[1].end" - start: { line: 45, column: 19 } - end: { line: 45, column: 20 } + start: { line: 31, column: 19 } + end: { line: 31, column: 20 } - path: ".message_type[Foo].reserved_range[2].start" - start: { line: 45, column: 66 } - end: { line: 45, column: 67 } + start: { line: 31, column: 66 } + end: { line: 31, column: 67 } - path: ".message_type[Foo].reserved_range[2]" - start: { line: 45, column: 66 } - end: { line: 45, column: 73 } + start: { line: 31, column: 66 } + end: { line: 31, column: 73 } - path: ".message_type[Foo].reserved_range[2].end" - start: { line: 45, column: 71 } - end: { line: 45, column: 73 } + start: { line: 31, column: 71 } + end: { line: 31, column: 73 } - path: ".message_type[Foo].reserved_name" - start: { line: 48, column: 2 } - end: { line: 48, column: 42 } + start: { line: 34, column: 2 } + end: { line: 34, column: 42 } leading: " This is a leading comment for the reserved names declaration.\n" trailing: " This is a trailing comment for the reserved range." - path: ".message_type[Foo].reserved_name.0" - start: { line: 48, column: 11 } - end: { line: 48, column: 14 } + start: { line: 34, column: 11 } + end: { line: 34, column: 14 } - path: ".message_type[Foo].reserved_name.0" - start: { line: 48, column: 38 } - end: { line: 48, column: 41 } + start: { line: 34, column: 38 } + end: { line: 34, column: 41 } - path: ".message_type[Foo].field[options].label" - start: { line: 50, column: 2 } - end: { line: 50, column: 10 } + start: { line: 36, column: 2 } + end: { line: 36, column: 10 } - path: ".message_type[Foo].field[options]" - start: { line: 50, column: 2 } - end: { line: 55, column: 4 } + start: { line: 36, column: 2 } + end: { line: 41, column: 4 } - path: ".message_type[Foo].field[options].type" - start: { line: 50, column: 11 } - end: { line: 50, column: 16 } + start: { line: 36, column: 11 } + end: { line: 36, column: 16 } - path: ".message_type[Foo].field[options].name" - start: { line: 50, column: 17 } - end: { line: 50, column: 24 } + start: { line: 36, column: 17 } + end: { line: 36, column: 24 } - path: ".message_type[Foo].field[options].number" - start: { line: 50, column: 27 } - end: { line: 50, column: 29 } + start: { line: 36, column: 27 } + end: { line: 36, column: 29 } - path: ".message_type[Foo].field[options].options" - start: { line: 50, column: 53 } - end: { line: 55, column: 3 } + start: { line: 36, column: 53 } + end: { line: 41, column: 3 } - path: ".message_type[Foo].field[options].options.features.repeated_field_encoding" - start: { line: 52, column: 4 } - end: { line: 52, column: 45 } + start: { line: 38, column: 4 } + end: { line: 38, column: 45 } - path: ".message_type[Foo].field[options].options.0.0" - start: { line: 53, column: 4 } - end: { line: 53, column: 12 } + start: { line: 39, column: 4 } + end: { line: 39, column: 12 } - path: ".message_type[Foo].field[options].options.0.ctype" - start: { line: 54, column: 4 } - end: { line: 54, column: 12 } + start: { line: 40, column: 4 } + end: { line: 40, column: 12 } - path: ".message_type[Bar]" - start: { line: 72, column: 0 } - end: { line: 79, column: 1 } + start: { line: 58, column: 0 } + end: { line: 65, column: 1 } leading: "\n A leading block comment for Bar.\n" detached: - " This IS a detached comment for Bar.\n" - " This is also a detached comment for Bar.\n" - path: ".message_type[Bar].name" - start: { line: 72, column: 8 } - end: { line: 72, column: 11 } + start: { line: 58, column: 8 } + end: { line: 58, column: 11 } - path: ".message_type[Bar].field[bar].type" - start: { line: 76, column: 2 } - end: { line: 76, column: 8 } + start: { line: 62, column: 2 } + end: { line: 62, column: 8 } - path: ".message_type[Bar].field[bar]" - start: { line: 76, column: 2 } - end: { line: 76, column: 17 } + start: { line: 62, column: 2 } + end: { line: 62, column: 17 } leading: "\n\n handle edge-cases for block comments" - path: ".message_type[Bar].field[bar].name" - start: { line: 76, column: 9 } - end: { line: 76, column: 12 } + start: { line: 62, column: 9 } + end: { line: 62, column: 12 } - path: ".message_type[Bar].field[bar].number" - start: { line: 76, column: 15 } - end: { line: 76, column: 16 } + start: { line: 62, column: 15 } + end: { line: 62, column: 16 } - path: ".message_type[Bar].field[barbar].type" - start: { line: 78, column: 2 } - end: { line: 78, column: 8 } + start: { line: 64, column: 2 } + end: { line: 64, column: 8 } - path: ".message_type[Bar].field[barbar]" - start: { line: 78, column: 2 } - end: { line: 78, column: 20 } + start: { line: 64, column: 2 } + end: { line: 64, column: 20 } leading: " start and end block comment on the same line " - path: ".message_type[Bar].field[barbar].name" - start: { line: 78, column: 9 } - end: { line: 78, column: 15 } + start: { line: 64, column: 9 } + end: { line: 64, column: 15 } - path: ".message_type[Bar].field[barbar].number" - start: { line: 78, column: 18 } - end: { line: 78, column: 19 } + start: { line: 64, column: 18 } + end: { line: 64, column: 19 } - path: ".enum_type[Baz]" - start: { line: 82, column: 0 } - end: { line: 84, column: 1 } + start: { line: 68, column: 0 } + end: { line: 70, column: 1 } leading: " This is the leading comment for enum Baz.\n" trailing: " This is a trailing comment for enum Baz." - path: ".enum_type[Baz].name" - start: { line: 82, column: 5 } - end: { line: 82, column: 8 } + start: { line: 68, column: 5 } + end: { line: 68, column: 8 } - path: ".enum_type[Baz].value[BAZ_ONE].name" - start: { line: 83, column: 2 } - end: { line: 83, column: 9 } + start: { line: 69, column: 2 } + end: { line: 69, column: 9 } - path: ".enum_type[Baz].value[BAZ_ONE]" - start: { line: 83, column: 2 } - end: { line: 83, column: 14 } + start: { line: 69, column: 2 } + end: { line: 69, column: 14 } - path: ".enum_type[Baz].value[BAZ_ONE].number" - start: { line: 83, column: 12 } - end: { line: 83, column: 13 } + start: { line: 69, column: 12 } + end: { line: 69, column: 13 } - path: ".message_type[Qux]" - start: { line: 91, column: 0 } - end: { line: 91, column: 14 } + start: { line: 77, column: 0 } + end: { line: 77, column: 14 } leading: "\nA block comment\n\nwith new lines preserved.\n" - path: ".message_type[Qux].name" - start: { line: 91, column: 8 } - end: { line: 91, column: 11 } + start: { line: 77, column: 8 } + end: { line: 77, column: 11 } - path: ".service[FooService]" - start: { line: 94, column: 0 } - end: { line: 101, column: 1 } + start: { line: 80, column: 0 } + end: { line: 87, column: 1 } leading: " This is the leading comment for service FooService.\n" trailing: " This is a trailing comment for service FooService." - path: ".service[FooService].name" - start: { line: 94, column: 8 } - end: { line: 94, column: 18 } + start: { line: 80, column: 8 } + end: { line: 80, column: 18 } - path: ".service[FooService].method[FooForBar]" - start: { line: 96, column: 2 } - end: { line: 96, column: 35 } + start: { line: 82, column: 2 } + end: { line: 82, column: 35 } leading: " Leading comment for method FooForBar.\n" trailing: " Trailing comment for FooForBar." - path: ".service[FooService].method[FooForBar].name" - start: { line: 96, column: 6 } - end: { line: 96, column: 15 } + start: { line: 82, column: 6 } + end: { line: 82, column: 15 } - path: ".service[FooService].method[FooForBar].input_type" - start: { line: 96, column: 16 } - end: { line: 96, column: 19 } + start: { line: 82, column: 16 } + end: { line: 82, column: 19 } - path: ".service[FooService].method[FooForBar].output_type" - start: { line: 96, column: 30 } - end: { line: 96, column: 33 } + start: { line: 82, column: 30 } + end: { line: 82, column: 33 } - path: ".service[FooService].method[BarForBar]" - start: { line: 99, column: 2 } - end: { line: 100, column: 3 } + start: { line: 85, column: 2 } + end: { line: 86, column: 3 } leading: " Leading comment for method BarForBar.\n" trailing: " Trailing comment for BarForBar." - path: ".service[FooService].method[BarForBar].name" - start: { line: 99, column: 6 } - end: { line: 99, column: 15 } + start: { line: 85, column: 6 } + end: { line: 85, column: 15 } - path: ".service[FooService].method[BarForBar].input_type" - start: { line: 99, column: 16 } - end: { line: 99, column: 19 } + start: { line: 85, column: 16 } + end: { line: 85, column: 19 } - path: ".service[FooService].method[BarForBar].output_type" - start: { line: 99, column: 30 } - end: { line: 99, column: 33 } + start: { line: 85, column: 30 } + end: { line: 85, column: 33 } - path: ".extension" - start: { line: 103, column: 0 } - end: { line: 105, column: 1 } + start: { line: 89, column: 0 } + end: { line: 91, column: 1 } - path: ".extension[c].extendee" - start: { line: 103, column: 7 } - end: { line: 103, column: 35 } + start: { line: 89, column: 7 } + end: { line: 89, column: 35 } - path: ".extension[c].label" - start: { line: 104, column: 2 } - end: { line: 104, column: 10 } + start: { line: 90, column: 2 } + end: { line: 90, column: 10 } - path: ".extension[c]" - start: { line: 104, column: 2 } - end: { line: 104, column: 26 } + start: { line: 90, column: 2 } + end: { line: 90, column: 26 } - path: ".extension[c].type" - start: { line: 104, column: 11 } - end: { line: 104, column: 16 } + start: { line: 90, column: 11 } + end: { line: 90, column: 16 } - path: ".extension[c].name" - start: { line: 104, column: 17 } - end: { line: 104, column: 18 } + start: { line: 90, column: 17 } + end: { line: 90, column: 18 } - path: ".extension[c].number" - start: { line: 104, column: 21 } - end: { line: 104, column: 25 } + start: { line: 90, column: 21 } + end: { line: 90, column: 25 } - path: ".extension" - start: { line: 107, column: 0 } - end: { line: 109, column: 1 } + start: { line: 93, column: 0 } + end: { line: 95, column: 1 } - path: ".extension[a].extendee" - start: { line: 107, column: 7 } - end: { line: 107, column: 37 } + start: { line: 93, column: 7 } + end: { line: 93, column: 37 } - path: ".extension[a].label" - start: { line: 108, column: 2 } - end: { line: 108, column: 10 } + start: { line: 94, column: 2 } + end: { line: 94, column: 10 } - path: ".extension[a]" - start: { line: 108, column: 2 } - end: { line: 108, column: 26 } + start: { line: 94, column: 2 } + end: { line: 94, column: 26 } - path: ".extension[a].type" - start: { line: 108, column: 11 } - end: { line: 108, column: 16 } + start: { line: 94, column: 11 } + end: { line: 94, column: 16 } - path: ".extension[a].name" - start: { line: 108, column: 17 } - end: { line: 108, column: 18 } + start: { line: 94, column: 17 } + end: { line: 94, column: 18 } - path: ".extension[a].number" - start: { line: 108, column: 21 } - end: { line: 108, column: 25 } + start: { line: 94, column: 21 } + end: { line: 94, column: 25 } diff --git a/experimental/ir/testdata/comments/group.proto b/experimental/ir/testdata/comments/group.proto index 2122f4fd2..8d3af87f1 100644 --- a/experimental/ir/testdata/comments/group.proto +++ b/experimental/ir/testdata/comments/group.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% source_code_info: true //% exclude: ["required fields are deprecated", "group syntax is deprecated"] diff --git a/experimental/ir/testdata/comments/group.proto.sci.yaml b/experimental/ir/testdata/comments/group.proto.sci.yaml index f28b8306d..31c339a72 100644 --- a/experimental/ir/testdata/comments/group.proto.sci.yaml +++ b/experimental/ir/testdata/comments/group.proto.sci.yaml @@ -1,59 +1,58 @@ "testdata/comments/group.proto": -- { path: "", start: { line: 17, column: 0 }, end: { line: 32, column: 1 } } +- { path: "", start: { line: 3, column: 0 }, end: { line: 18, column: 1 } } - path: ".syntax" - start: { line: 17, column: 0 } - end: { line: 17, column: 16 } + start: { line: 3, column: 0 } + end: { line: 3, column: 16 } leading: "% descriptor: true\n% source_code_info: true\n% exclude: [\"required fields are deprecated\", \"group syntax is deprecated\"]\n" - detached: {} - path: ".package" - start: { line: 19, column: 0 } - end: { line: 19, column: 17 } + start: { line: 5, column: 0 } + end: { line: 5, column: 17 } - path: ".message_type[Foo]" - start: { line: 22, column: 0 } - end: { line: 32, column: 1 } + start: { line: 8, column: 0 } + end: { line: 18, column: 1 } leading: " This is a leading comment for message Foo.\n" trailing: " This is considered a trailing comment for message Foo.\n" - path: ".message_type[Foo].name" - start: { line: 22, column: 8 } - end: { line: 22, column: 11 } + start: { line: 8, column: 8 } + end: { line: 8, column: 11 } - path: ".message_type[Foo].field[group].label" - start: { line: 28, column: 2 } - end: { line: 28, column: 10 } + start: { line: 14, column: 2 } + end: { line: 14, column: 10 } - path: ".message_type[Foo].field[group]" - start: { line: 28, column: 2 } - end: { line: 31, column: 3 } + start: { line: 14, column: 2 } + end: { line: 17, column: 3 } - path: ".message_type[Foo].nested_type[Group]" - start: { line: 28, column: 2 } - end: { line: 31, column: 3 } + start: { line: 14, column: 2 } + end: { line: 17, column: 3 } leading: " This is a leading for the synthetic message Group rather than the field.\n" trailing: " This is a trailing comment for synthetic message Group" detached: - " This is a detached leading comment for synthetic message Group rather than the field.\n" - path: ".message_type[Foo].field[group].type_name" - start: { line: 28, column: 11 } - end: { line: 28, column: 16 } + start: { line: 14, column: 11 } + end: { line: 14, column: 16 } - path: ".message_type[Foo].field[group].name" - start: { line: 28, column: 17 } - end: { line: 28, column: 22 } + start: { line: 14, column: 17 } + end: { line: 14, column: 22 } - path: ".message_type[Foo].nested_type[Group].name" - start: { line: 28, column: 17 } - end: { line: 28, column: 22 } + start: { line: 14, column: 17 } + end: { line: 14, column: 22 } - path: ".message_type[Foo].field[group].number" - start: { line: 28, column: 25 } - end: { line: 28, column: 26 } + start: { line: 14, column: 25 } + end: { line: 14, column: 26 } - path: ".message_type[Foo].nested_type[Group].field[id].label" - start: { line: 30, column: 4 } - end: { line: 30, column: 12 } + start: { line: 16, column: 4 } + end: { line: 16, column: 12 } - path: ".message_type[Foo].nested_type[Group].field[id]" - start: { line: 30, column: 4 } - end: { line: 30, column: 27 } + start: { line: 16, column: 4 } + end: { line: 16, column: 27 } leading: " This is a leading comment for synthetic field, id.\n" - path: ".message_type[Foo].nested_type[Group].field[id].type" - start: { line: 30, column: 13 } - end: { line: 30, column: 19 } + start: { line: 16, column: 13 } + end: { line: 16, column: 19 } - path: ".message_type[Foo].nested_type[Group].field[id].name" - start: { line: 30, column: 20 } - end: { line: 30, column: 22 } + start: { line: 16, column: 20 } + end: { line: 16, column: 22 } - path: ".message_type[Foo].nested_type[Group].field[id].number" - start: { line: 30, column: 25 } - end: { line: 30, column: 26 } + start: { line: 16, column: 25 } + end: { line: 16, column: 26 } diff --git a/experimental/ir/testdata/comments/simple.proto b/experimental/ir/testdata/comments/simple.proto index adbfb337d..1aa5a4c21 100644 --- a/experimental/ir/testdata/comments/simple.proto +++ b/experimental/ir/testdata/comments/simple.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% source_code_info: true edition = "2023"; diff --git a/experimental/ir/testdata/comments/simple.proto.sci.yaml b/experimental/ir/testdata/comments/simple.proto.sci.yaml index 9b36d3d86..4b263b5be 100644 --- a/experimental/ir/testdata/comments/simple.proto.sci.yaml +++ b/experimental/ir/testdata/comments/simple.proto.sci.yaml @@ -1,32 +1,31 @@ "testdata/comments/simple.proto": -- { path: "", start: { line: 16, column: 0 }, end: { line: 25, column: 1 } } +- { path: "", start: { line: 2, column: 0 }, end: { line: 11, column: 1 } } - path: ".syntax" - start: { line: 16, column: 0 } - end: { line: 16, column: 17 } + start: { line: 2, column: 0 } + end: { line: 2, column: 17 } leading: "% descriptor: true\n% source_code_info: true\n" - detached: {} - path: ".package" - start: { line: 18, column: 0 } - end: { line: 18, column: 17 } + start: { line: 4, column: 0 } + end: { line: 4, column: 17 } - path: ".message_type[Foo]" - start: { line: 21, column: 0 } - end: { line: 25, column: 1 } + start: { line: 7, column: 0 } + end: { line: 11, column: 1 } leading: " Leading comment for buf.test.Foo\n" trailing: " Trailing comment for buf.test.Foo" - path: ".message_type[Foo].name" - start: { line: 21, column: 8 } - end: { line: 21, column: 11 } + start: { line: 7, column: 8 } + end: { line: 7, column: 11 } - path: ".message_type[Foo].field[bar].type" - start: { line: 23, column: 2 } - end: { line: 23, column: 8 } + start: { line: 9, column: 2 } + end: { line: 9, column: 8 } - path: ".message_type[Foo].field[bar]" - start: { line: 23, column: 2 } - end: { line: 23, column: 17 } + start: { line: 9, column: 2 } + end: { line: 9, column: 17 } leading: " Leading comment for buf.test.Foo.bar\n" trailing: " Trailing comment for buf.test.Foo.bar\n" - path: ".message_type[Foo].field[bar].name" - start: { line: 23, column: 9 } - end: { line: 23, column: 12 } + start: { line: 9, column: 9 } + end: { line: 9, column: 12 } - path: ".message_type[Foo].field[bar].number" - start: { line: 23, column: 15 } - end: { line: 23, column: 16 } + start: { line: 9, column: 15 } + end: { line: 9, column: 16 } diff --git a/experimental/ir/testdata/editions/features_2024_in_2023.proto b/experimental/ir/testdata/editions/features_2024_in_2023.proto index 3a5ec6223..5d5ede136 100644 --- a/experimental/ir/testdata/editions/features_2024_in_2023.proto +++ b/experimental/ir/testdata/editions/features_2024_in_2023.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package buf.test; diff --git a/experimental/ir/testdata/editions/features_2024_in_2023.proto.stderr.txt b/experimental/ir/testdata/editions/features_2024_in_2023.proto.stderr.txt index b4e8034b9..8d8884947 100644 --- a/experimental/ir/testdata/editions/features_2024_in_2023.proto.stderr.txt +++ b/experimental/ir/testdata/editions/features_2024_in_2023.proto.stderr.txt @@ -1,191 +1,191 @@ error: `enum_name_uses_string_view` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:24:8 + --> testdata/editions/features_2024_in_2023.proto:10:8 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -23 | // File-level Edition 2024 features -24 | option features.(pb.cpp).enum_name_uses_string_view = true; + 9 | // File-level Edition 2024 features +10 | option features.(pb.cpp).enum_name_uses_string_view = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `enum_name_uses_string_view` requires at least Edition 2024 error: `strip_enum_prefix` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:25:8 + --> testdata/editions/features_2024_in_2023.proto:11:8 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -24 | option features.(pb.cpp).enum_name_uses_string_view = true; -25 | option features.(pb.go).strip_enum_prefix = STRIP_ENUM_PREFIX_STRIP; +10 | option features.(pb.cpp).enum_name_uses_string_view = true; +11 | option features.(pb.go).strip_enum_prefix = STRIP_ENUM_PREFIX_STRIP; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `strip_enum_prefix` requires at least Edition 2024 error: `large_enum` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:26:8 + --> testdata/editions/features_2024_in_2023.proto:12:8 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -25 | option features.(pb.go).strip_enum_prefix = STRIP_ENUM_PREFIX_STRIP; -26 | option features.(pb.java).large_enum = true; +11 | option features.(pb.go).strip_enum_prefix = STRIP_ENUM_PREFIX_STRIP; +12 | option features.(pb.java).large_enum = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `large_enum` requires at least Edition 2024 error: `default_symbol_visibility` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:27:8 + --> testdata/editions/features_2024_in_2023.proto:13:8 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -26 | option features.(pb.java).large_enum = true; -27 | option features.default_symbol_visibility = EXPORT_TOP_LEVEL; +12 | option features.(pb.java).large_enum = true; +13 | option features.default_symbol_visibility = EXPORT_TOP_LEVEL; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `default_symbol_visibility` requires at least Edition 2024 error: `enforce_naming_style` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:28:8 + --> testdata/editions/features_2024_in_2023.proto:14:8 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -27 | option features.default_symbol_visibility = EXPORT_TOP_LEVEL; -28 | option features.enforce_naming_style = STYLE2024; +13 | option features.default_symbol_visibility = EXPORT_TOP_LEVEL; +14 | option features.enforce_naming_style = STYLE2024; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `enforce_naming_style` requires at least Edition 2024 error: `nest_in_file_class` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:31:10 + --> testdata/editions/features_2024_in_2023.proto:17:10 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -31 | option features.(pb.java).nest_in_file_class = YES; +17 | option features.(pb.java).nest_in_file_class = YES; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `nest_in_file_class` requires at least Edition 2024 error: `enforce_naming_style` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:32:10 + --> testdata/editions/features_2024_in_2023.proto:18:10 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -31 | option features.(pb.java).nest_in_file_class = YES; -32 | option features.enforce_naming_style = STYLE2024; +17 | option features.(pb.java).nest_in_file_class = YES; +18 | option features.enforce_naming_style = STYLE2024; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `enforce_naming_style` requires at least Edition 2024 error: `enforce_naming_style` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:34:26 + --> testdata/editions/features_2024_in_2023.proto:20:26 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -34 | string test_field = 1 [features.enforce_naming_style = STYLE2024]; +20 | string test_field = 1 [features.enforce_naming_style = STYLE2024]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `enforce_naming_style` requires at least Edition 2024 error: `enforce_naming_style` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:37:12 + --> testdata/editions/features_2024_in_2023.proto:23:12 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -37 | option features.enforce_naming_style = STYLE2024; +23 | option features.enforce_naming_style = STYLE2024; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `enforce_naming_style` requires at least Edition 2024 error: `enforce_naming_style` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:41:26 + --> testdata/editions/features_2024_in_2023.proto:27:26 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -41 | extensions 100 to 200 [features.enforce_naming_style = STYLE2024]; +27 | extensions 100 to 200 [features.enforce_naming_style = STYLE2024]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `enforce_naming_style` requires at least Edition 2024 error: `large_enum` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:45:10 + --> testdata/editions/features_2024_in_2023.proto:31:10 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -45 | option features.(pb.java).large_enum = true; +31 | option features.(pb.java).large_enum = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `large_enum` requires at least Edition 2024 error: `nest_in_file_class` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:46:10 + --> testdata/editions/features_2024_in_2023.proto:32:10 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -45 | option features.(pb.java).large_enum = true; -46 | option features.(pb.java).nest_in_file_class = YES; +31 | option features.(pb.java).large_enum = true; +32 | option features.(pb.java).nest_in_file_class = YES; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `nest_in_file_class` requires at least Edition 2024 error: `enum_name_uses_string_view` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:47:10 + --> testdata/editions/features_2024_in_2023.proto:33:10 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -46 | option features.(pb.java).nest_in_file_class = YES; -47 | option features.(pb.cpp).enum_name_uses_string_view = true; +32 | option features.(pb.java).nest_in_file_class = YES; +33 | option features.(pb.cpp).enum_name_uses_string_view = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `enum_name_uses_string_view` requires at least Edition 2024 error: `strip_enum_prefix` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:48:10 + --> testdata/editions/features_2024_in_2023.proto:34:10 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -47 | option features.(pb.cpp).enum_name_uses_string_view = true; -48 | option features.(pb.go).strip_enum_prefix = STRIP_ENUM_PREFIX_STRIP; +33 | option features.(pb.cpp).enum_name_uses_string_view = true; +34 | option features.(pb.go).strip_enum_prefix = STRIP_ENUM_PREFIX_STRIP; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `strip_enum_prefix` requires at least Edition 2024 error: `enforce_naming_style` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:49:10 + --> testdata/editions/features_2024_in_2023.proto:35:10 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -48 | option features.(pb.go).strip_enum_prefix = STRIP_ENUM_PREFIX_STRIP; -49 | option features.enforce_naming_style = STYLE2024; +34 | option features.(pb.go).strip_enum_prefix = STRIP_ENUM_PREFIX_STRIP; +35 | option features.enforce_naming_style = STYLE2024; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `enforce_naming_style` requires at least Edition 2024 error: `nest_in_file_class` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:59:10 + --> testdata/editions/features_2024_in_2023.proto:45:10 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -59 | option features.(pb.java).nest_in_file_class = YES; +45 | option features.(pb.java).nest_in_file_class = YES; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `nest_in_file_class` requires at least Edition 2024 error: `enforce_naming_style` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:60:10 + --> testdata/editions/features_2024_in_2023.proto:46:10 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -59 | option features.(pb.java).nest_in_file_class = YES; -60 | option features.enforce_naming_style = STYLE2024; +45 | option features.(pb.java).nest_in_file_class = YES; +46 | option features.enforce_naming_style = STYLE2024; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `enforce_naming_style` requires at least Edition 2024 error: `enforce_naming_style` is not supported in Edition 2023 - --> testdata/editions/features_2024_in_2023.proto:63:12 + --> testdata/editions/features_2024_in_2023.proto:49:12 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -63 | option features.enforce_naming_style = STYLE2024; +49 | option features.enforce_naming_style = STYLE2024; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `enforce_naming_style` requires at least Edition 2024 diff --git a/experimental/ir/testdata/editions/incomplete_feature.proto b/experimental/ir/testdata/editions/incomplete_feature.proto index 6a8c62e96..32aa8d9cb 100644 --- a/experimental/ir/testdata/editions/incomplete_feature.proto +++ b/experimental/ir/testdata/editions/incomplete_feature.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% symtab: true edition = "2023"; diff --git a/experimental/ir/testdata/editions/incomplete_feature.proto.stderr.txt b/experimental/ir/testdata/editions/incomplete_feature.proto.stderr.txt index fc3f8deda..b3ac25c37 100644 --- a/experimental/ir/testdata/editions/incomplete_feature.proto.stderr.txt +++ b/experimental/ir/testdata/editions/incomplete_feature.proto.stderr.txt @@ -1,81 +1,81 @@ warning: expected feature field to set `edition_defaults` - --> testdata/editions/incomplete_feature.proto:26:16 + --> testdata/editions/incomplete_feature.proto:12:16 | -26 | bool a = 1 [feature_support = {}]; +12 | bool a = 1 [feature_support = {}]; | ^^^^^^^^^^^^^^^^^^^^^^ = note: this is likely a mistake, but it is not rejected by protoc warning: expected `FeatureSupport.edition_introduced` to be set - --> testdata/editions/incomplete_feature.proto:26:35 + --> testdata/editions/incomplete_feature.proto:12:35 | -26 | bool a = 1 [feature_support = {}]; +12 | bool a = 1 [feature_support = {}]; | ^^ = note: this is likely a mistake, but it is not rejected by protoc warning: expected feature field to set `feature_support` - --> testdata/editions/incomplete_feature.proto:28:16 + --> testdata/editions/incomplete_feature.proto:14:16 | -28 | bool b = 2 [ +14 | bool b = 2 [ | _______________^ -29 | / edition_defaults = {edition: EDITION_LEGACY, value: "false"} -30 | | ]; +15 | / edition_defaults = {edition: EDITION_LEGACY, value: "false"} +16 | | ]; | \_____^ = note: this is likely a mistake, but it is not rejected by protoc warning: expected `FeatureSupport.edition_introduced` to be set - --> testdata/editions/incomplete_feature.proto:34:27 + --> testdata/editions/incomplete_feature.proto:20:27 | -34 | feature_support = {} +20 | feature_support = {} | ^^ = note: this is likely a mistake, but it is not rejected by protoc warning: `edition_defaults` does not cover all editions - --> testdata/editions/incomplete_feature.proto:38:28 + --> testdata/editions/incomplete_feature.proto:24:28 | -38 | edition_defaults = {edition: EDITION_2023, value: "false"}, +24 | edition_defaults = {edition: EDITION_2023, value: "false"}, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: this is likely a mistake, but it is not rejected by protoc = help: `edition_defaults` must specify a default for `EDITION_PROTO2` or `EDITION_LEGACY` to cover all editions warning: expected `bool` or enum type, found scalar type `int32` - --> testdata/editions/incomplete_feature.proto:42:5 + --> testdata/editions/incomplete_feature.proto:28:5 | -42 | int32 e = 5 [ +28 | int32 e = 5 [ | ^^^^^ -43 | edition_defaults = {edition: EDITION_PROTO2, value: "0"}, +29 | edition_defaults = {edition: EDITION_PROTO2, value: "0"}, | ---------------- expected because this makes `e` into a feature | = note: this is likely a mistake, but it is not rejected by protoc = help: features should have `bool` or enum type warning: unexpected `EDITION_LEGACY` in `EditionDefault.edition` - --> testdata/editions/incomplete_feature.proto:49:38 + --> testdata/editions/incomplete_feature.proto:35:38 | -49 | edition_defaults = {edition: EDITION_MAX, value: "42"}, +35 | edition_defaults = {edition: EDITION_MAX, value: "42"}, | ^^^^^^^^^^^ = note: this is likely a mistake, but it is not rejected by protoc = help: this should be a released edition or `EDITION_LEGACY` warning: expected quoted bool in `EditionDefault.value` - --> testdata/editions/incomplete_feature.proto:49:58 + --> testdata/editions/incomplete_feature.proto:35:58 | -47 | bool f = 6 [ +33 | bool f = 6 [ | ---- expected due to this -48 | edition_defaults = {edition: EDITION_PROTO2, value: "true"}, -49 | edition_defaults = {edition: EDITION_MAX, value: "42"}, +34 | edition_defaults = {edition: EDITION_PROTO2, value: "true"}, +35 | edition_defaults = {edition: EDITION_MAX, value: "42"}, | ^^^^ = note: this is likely a mistake, but it is not rejected by protoc = help: `value` must one of "true" or "false" warning: expected quoted enum value in `EditionDefault.edition` - --> testdata/editions/incomplete_feature.proto:58:59 + --> testdata/editions/incomplete_feature.proto:44:59 | -55 | Enum g = 7 [ +41 | Enum g = 7 [ | ---- expected due to this -56 | edition_defaults = {edition: EDITION_PROTO2, value: "A"}, -57 | edition_defaults = {edition: EDITION_PROTO3, value: "B"}, -58 | edition_defaults = {edition: EDITION_2023, value: "C"}, +42 | edition_defaults = {edition: EDITION_PROTO2, value: "A"}, +43 | edition_defaults = {edition: EDITION_PROTO3, value: "B"}, +44 | edition_defaults = {edition: EDITION_2023, value: "C"}, | ^^^ = note: this is likely a mistake, but it is not rejected by protoc = help: `value` must be the name of a value in `buf.test.Enum` diff --git a/experimental/ir/testdata/editions/inheritance.proto b/experimental/ir/testdata/editions/inheritance.proto index 42ea9da93..b2b85529e 100644 --- a/experimental/ir/testdata/editions/inheritance.proto +++ b/experimental/ir/testdata/editions/inheritance.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% symtab: true edition = "2023"; diff --git a/experimental/ir/testdata/editions/inheritance.proto.stderr.txt b/experimental/ir/testdata/editions/inheritance.proto.stderr.txt index 9fe464c14..edc19020b 100644 --- a/experimental/ir/testdata/editions/inheritance.proto.stderr.txt +++ b/experimental/ir/testdata/editions/inheritance.proto.stderr.txt @@ -1,20 +1,20 @@ warning: `legacy_closed_enum` is deprecated in Edition 2023 - --> testdata/editions/inheritance.proto:24:8 + --> testdata/editions/inheritance.proto:10:8 | -17 | edition = "2023"; + 3 | edition = "2023"; | ------ edition specified here ... -23 | option features.field_presence = IMPLICIT; -24 | option features.(pb.cpp).legacy_closed_enum = false; + 9 | option features.field_presence = IMPLICIT; +10 | option features.(pb.cpp).legacy_closed_enum = false; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: deprecated since Edition 2023 = help: the legacy closed enum behavior in C++ is deprecated and is scheduled to be removed in Edition 2025 warning: required fields are deprecated - --> testdata/editions/inheritance.proto:28:44 + --> testdata/editions/inheritance.proto:14:44 | -28 | int32 y = 2 [features.field_presence = LEGACY_REQUIRED]; +14 | int32 y = 2 [features.field_presence = LEGACY_REQUIRED]; | ^^^^^^^^^^^^^^^ = help: do not attempt to change this to `EXPLICIT` if the field is already in-use; doing so is a wire protocol break diff --git a/experimental/ir/testdata/editions/lifetime.proto b/experimental/ir/testdata/editions/lifetime.proto index 28d4b7680..056a81908 100644 --- a/experimental/ir/testdata/editions/lifetime.proto +++ b/experimental/ir/testdata/editions/lifetime.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% symtab: true edition = "2023"; diff --git a/experimental/ir/testdata/editions/lifetime.proto.stderr.txt b/experimental/ir/testdata/editions/lifetime.proto.stderr.txt index ee9d6de2b..797c7ce40 100644 --- a/experimental/ir/testdata/editions/lifetime.proto.stderr.txt +++ b/experimental/ir/testdata/editions/lifetime.proto.stderr.txt @@ -1,51 +1,51 @@ warning: `b` is deprecated in Edition 2023 - --> testdata/editions/lifetime.proto:23:33 + --> testdata/editions/lifetime.proto:9:33 | -17 | edition = "2023"; + 3 | edition = "2023"; | ------ edition specified here ... -23 | option features.(x) = {a: true, b: true, c: true, d: true, e: true, f: true}; + 9 | option features.(x) = {a: true, b: true, c: true, d: true, e: true, f: true}; | ^ = help: deprecated since Edition 2023 = help: this is a bad feature; don't use it error: `c` is not supported in Edition 2023 - --> testdata/editions/lifetime.proto:23:42 + --> testdata/editions/lifetime.proto:9:42 | -17 | edition = "2023"; + 3 | edition = "2023"; | ------ edition specified here ... -23 | option features.(x) = {a: true, b: true, c: true, d: true, e: true, f: true}; + 9 | option features.(x) = {a: true, b: true, c: true, d: true, e: true, f: true}; | ^ = help: removed in Edition 2023 error: `d` is not supported in Edition 2023 - --> testdata/editions/lifetime.proto:23:51 + --> testdata/editions/lifetime.proto:9:51 | -17 | edition = "2023"; + 3 | edition = "2023"; | ------ edition specified here ... -23 | option features.(x) = {a: true, b: true, c: true, d: true, e: true, f: true}; + 9 | option features.(x) = {a: true, b: true, c: true, d: true, e: true, f: true}; | ^ = help: `d` requires at least Edition 2024 warning: `e` is deprecated in Edition 2023 - --> testdata/editions/lifetime.proto:23:60 + --> testdata/editions/lifetime.proto:9:60 | -17 | edition = "2023"; + 3 | edition = "2023"; | ------ edition specified here ... -23 | option features.(x) = {a: true, b: true, c: true, d: true, e: true, f: true}; + 9 | option features.(x) = {a: true, b: true, c: true, d: true, e: true, f: true}; | ^ = help: deprecated since Edition 2023, to be removed in Edition 2024 error: `f` is not supported in Edition 2023 - --> testdata/editions/lifetime.proto:23:69 + --> testdata/editions/lifetime.proto:9:69 | -17 | edition = "2023"; + 3 | edition = "2023"; | ------ edition specified here ... -23 | option features.(x) = {a: true, b: true, c: true, d: true, e: true, f: true}; + 9 | option features.(x) = {a: true, b: true, c: true, d: true, e: true, f: true}; | ^ = help: deprecated since "proto3", removed in Edition 2023 diff --git a/experimental/ir/testdata/editions/naming_style_2024_bad.proto b/experimental/ir/testdata/editions/naming_style_2024_bad.proto index c2c54c33d..5c7962f84 100644 --- a/experimental/ir/testdata/editions/naming_style_2024_bad.proto +++ b/experimental/ir/testdata/editions/naming_style_2024_bad.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% symtab: true edition = "2024"; diff --git a/experimental/ir/testdata/editions/naming_style_2024_bad.proto.stderr.txt b/experimental/ir/testdata/editions/naming_style_2024_bad.proto.stderr.txt index 4b2b091c5..11db7faa0 100644 --- a/experimental/ir/testdata/editions/naming_style_2024_bad.proto.stderr.txt +++ b/experimental/ir/testdata/editions/naming_style_2024_bad.proto.stderr.txt @@ -1,174 +1,174 @@ error: package name should be lower_snake_case - --> testdata/editions/naming_style_2024_bad.proto:19:9 + --> testdata/editions/naming_style_2024_bad.proto:5:9 | -19 | package Buf.Test; // Package must be lower_snake_case or dot.delimited.lower_snake_case + 5 | package Buf.Test; // Package must be lower_snake_case or dot.delimited.lower_snake_case | ^^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires package names to be lower_snake_case or dot.delimited.lower_snake_case error: message type name should be PascalCase - --> testdata/editions/naming_style_2024_bad.proto:21:9 + --> testdata/editions/naming_style_2024_bad.proto:7:9 | -21 | message my_message { + 7 | message my_message { | ^^^^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires message names to be PascalCase (e.g., MyMessage) error: field name should be snake_case - --> testdata/editions/naming_style_2024_bad.proto:22:10 + --> testdata/editions/naming_style_2024_bad.proto:8:10 | -22 | string myField = 1; // camelCase field name + 8 | string myField = 1; // camelCase field name | ^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires field names to be snake_case (e.g., my_field) error: field name should be snake_case - --> testdata/editions/naming_style_2024_bad.proto:23:9 + --> testdata/editions/naming_style_2024_bad.proto:9:9 | -23 | int32 AnotherField = 2; // PascalCase field name + 9 | int32 AnotherField = 2; // PascalCase field name | ^^^^^^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires field names to be snake_case (e.g., my_field) error: field name should be snake_case - --> testdata/editions/naming_style_2024_bad.proto:24:10 + --> testdata/editions/naming_style_2024_bad.proto:10:10 | -24 | string field_1 = 3; // lower_snake_case or dot.delimited.lower_snake_case +10 | string field_1 = 3; // lower_snake_case or dot.delimited.lower_snake_case | ^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires field names to be snake_case (e.g., my_field) error: field name should be snake_case - --> testdata/editions/naming_style_2024_bad.proto:25:10 + --> testdata/editions/naming_style_2024_bad.proto:11:10 | -25 | string _field = 4; // Leading underscore +11 | string _field = 4; // Leading underscore | ^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires field names to be snake_case (e.g., my_field) error: field name should be snake_case - --> testdata/editions/naming_style_2024_bad.proto:26:10 + --> testdata/editions/naming_style_2024_bad.proto:12:10 | -26 | string field_ = 5; // Trailing underscore +12 | string field_ = 5; // Trailing underscore | ^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires field names to be snake_case (e.g., my_field) error: field name should be snake_case - --> testdata/editions/naming_style_2024_bad.proto:27:10 + --> testdata/editions/naming_style_2024_bad.proto:13:10 | -27 | string field__name = 6; // Consecutive underscores +13 | string field__name = 6; // Consecutive underscores | ^^^^^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires field names to be snake_case (e.g., my_field) error: oneof name should be snake_case - --> testdata/editions/naming_style_2024_bad.proto:28:9 + --> testdata/editions/naming_style_2024_bad.proto:14:9 | -28 | oneof TestChoice { // PascalCase oneof +14 | oneof TestChoice { // PascalCase oneof | ^^^^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires oneof names to be snake_case (e.g., my_choice) error: enum type name should be PascalCase - --> testdata/editions/naming_style_2024_bad.proto:33:6 + --> testdata/editions/naming_style_2024_bad.proto:19:6 | -33 | enum my_enum { +19 | enum my_enum { | ^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires enum names to be PascalCase (e.g., MyEnum) error: enum value name should be SCREAMING_SNAKE_CASE - --> testdata/editions/naming_style_2024_bad.proto:34:3 + --> testdata/editions/naming_style_2024_bad.proto:20:3 | -34 | unspecified = 0; // lowercase enum value +20 | unspecified = 0; // lowercase enum value | ^^^^^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires enum value names to be SCREAMING_SNAKE_CASE (e.g., MY_VALUE) error: enum value name should be SCREAMING_SNAKE_CASE - --> testdata/editions/naming_style_2024_bad.proto:35:3 + --> testdata/editions/naming_style_2024_bad.proto:21:3 | -35 | valueOne = 1; // camelCase enum value +21 | valueOne = 1; // camelCase enum value | ^^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires enum value names to be SCREAMING_SNAKE_CASE (e.g., MY_VALUE) error: enum value name should be SCREAMING_SNAKE_CASE - --> testdata/editions/naming_style_2024_bad.proto:36:3 + --> testdata/editions/naming_style_2024_bad.proto:22:3 | -36 | _VALUE = 2; // Leading underscore +22 | _VALUE = 2; // Leading underscore | ^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires enum value names to be SCREAMING_SNAKE_CASE (e.g., MY_VALUE) error: enum value name should be SCREAMING_SNAKE_CASE - --> testdata/editions/naming_style_2024_bad.proto:37:3 + --> testdata/editions/naming_style_2024_bad.proto:23:3 | -37 | VALUE_ = 3; // Trailing underscore +23 | VALUE_ = 3; // Trailing underscore | ^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires enum value names to be SCREAMING_SNAKE_CASE (e.g., MY_VALUE) error: enum values have the same name with the `my_enum` prefix removed - --> testdata/editions/naming_style_2024_bad.proto:37:3 + --> testdata/editions/naming_style_2024_bad.proto:23:3 | -36 | _VALUE = 2; // Leading underscore +22 | _VALUE = 2; // Leading underscore | ------ this implies canonical name `Value` -37 | VALUE_ = 3; // Trailing underscore +23 | VALUE_ = 3; // Trailing underscore | ^^^^^^ this also implies that name error: enum value name should be SCREAMING_SNAKE_CASE - --> testdata/editions/naming_style_2024_bad.proto:38:3 + --> testdata/editions/naming_style_2024_bad.proto:24:3 | -38 | VALUE_1 = 4; // Underscore followed by number +24 | VALUE_1 = 4; // Underscore followed by number | ^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires enum value names to be SCREAMING_SNAKE_CASE (e.g., MY_VALUE) error: service name should be PascalCase - --> testdata/editions/naming_style_2024_bad.proto:41:9 + --> testdata/editions/naming_style_2024_bad.proto:27:9 | -41 | service My_Service { // Snake_Case service name +27 | service My_Service { // Snake_Case service name | ^^^^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires service names to be PascalCase (e.g., MyService) error: RPC method name should be PascalCase - --> testdata/editions/naming_style_2024_bad.proto:42:7 + --> testdata/editions/naming_style_2024_bad.proto:28:7 | -42 | rpc test_method(my_message) returns (my_message); // snake_case RPC method names +28 | rpc test_method(my_message) returns (my_message); // snake_case RPC method names | ^^^^^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires RPC method names to be PascalCase (e.g., GetMessage) error: field name should be snake_case - --> testdata/editions/naming_style_2024_bad.proto:50:10 + --> testdata/editions/naming_style_2024_bad.proto:36:10 | -50 | string BadField = 2 [features.enforce_naming_style = STYLE2024]; +36 | string BadField = 2 [features.enforce_naming_style = STYLE2024]; | ^^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires field names to be snake_case (e.g., my_field) error: message type name should be PascalCase - --> testdata/editions/naming_style_2024_bad.proto:51:11 + --> testdata/editions/naming_style_2024_bad.proto:37:11 | -51 | message bad_nested { +37 | message bad_nested { | ^^^^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires message names to be PascalCase (e.g., MyMessage) error: field name should be snake_case - --> testdata/editions/naming_style_2024_bad.proto:54:12 + --> testdata/editions/naming_style_2024_bad.proto:40:12 | -54 | string _bad_field = 1; +40 | string _bad_field = 1; | ^^^^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires field names to be snake_case (e.g., my_field) diff --git a/experimental/ir/testdata/editions/naming_style_2024_ok.proto b/experimental/ir/testdata/editions/naming_style_2024_ok.proto index 0c90bcb1f..89fb81be7 100644 --- a/experimental/ir/testdata/editions/naming_style_2024_ok.proto +++ b/experimental/ir/testdata/editions/naming_style_2024_ok.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% symtab: true edition = "2024"; diff --git a/experimental/ir/testdata/editions/naming_style_2024_ok.proto.stderr.txt b/experimental/ir/testdata/editions/naming_style_2024_ok.proto.stderr.txt index ad1d44c5a..a404fe9ed 100644 --- a/experimental/ir/testdata/editions/naming_style_2024_ok.proto.stderr.txt +++ b/experimental/ir/testdata/editions/naming_style_2024_ok.proto.stderr.txt @@ -1,7 +1,7 @@ error: field name should be snake_case - --> testdata/editions/naming_style_2024_ok.proto:24:9 + --> testdata/editions/naming_style_2024_ok.proto:10:9 | -24 | int32 Another_Field = 2; +10 | int32 Another_Field = 2; | ^^^^^^^^^^^^^ this name violates STYLE2024 | = help: STYLE2024 requires field names to be snake_case (e.g., my_field) diff --git a/experimental/ir/testdata/editions/naming_style_legacy.proto b/experimental/ir/testdata/editions/naming_style_legacy.proto index 23866878d..5234fa9c4 100644 --- a/experimental/ir/testdata/editions/naming_style_legacy.proto +++ b/experimental/ir/testdata/editions/naming_style_legacy.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% symtab: true edition = "2024"; diff --git a/experimental/ir/testdata/editions/ok.proto b/experimental/ir/testdata/editions/ok.proto index 6bb00ba04..ab491d87b 100644 --- a/experimental/ir/testdata/editions/ok.proto +++ b/experimental/ir/testdata/editions/ok.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% symtab: true edition = "2023"; diff --git a/experimental/ir/testdata/editions/ok.proto.stderr.txt b/experimental/ir/testdata/editions/ok.proto.stderr.txt index c16f9d85f..c13527a0b 100644 --- a/experimental/ir/testdata/editions/ok.proto.stderr.txt +++ b/experimental/ir/testdata/editions/ok.proto.stderr.txt @@ -1,7 +1,7 @@ warning: required fields are deprecated - --> testdata/editions/ok.proto:26:44 + --> testdata/editions/ok.proto:12:44 | -26 | int32 z = 3 [features.field_presence = LEGACY_REQUIRED]; +12 | int32 z = 3 [features.field_presence = LEGACY_REQUIRED]; | ^^^^^^^^^^^^^^^ = help: do not attempt to change this to `EXPLICIT` if the field is already in-use; doing so is a wire protocol break diff --git a/experimental/ir/testdata/editions/ok_2024.proto b/experimental/ir/testdata/editions/ok_2024.proto index eaeffabc1..6b7ebafba 100644 --- a/experimental/ir/testdata/editions/ok_2024.proto +++ b/experimental/ir/testdata/editions/ok_2024.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% symtab: true edition = "2024"; diff --git a/experimental/ir/testdata/editions/proto2.proto b/experimental/ir/testdata/editions/proto2.proto index f42d4acc9..1b3b5a60a 100644 --- a/experimental/ir/testdata/editions/proto2.proto +++ b/experimental/ir/testdata/editions/proto2.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% symtab: true syntax = "proto2"; diff --git a/experimental/ir/testdata/editions/proto2.proto.stderr.txt b/experimental/ir/testdata/editions/proto2.proto.stderr.txt index f9eb57a9f..73f0f71c3 100644 --- a/experimental/ir/testdata/editions/proto2.proto.stderr.txt +++ b/experimental/ir/testdata/editions/proto2.proto.stderr.txt @@ -1,65 +1,65 @@ error: `features` cannot be set in "proto2" - --> testdata/editions/proto2.proto:23:8 + --> testdata/editions/proto2.proto:9:8 | -17 | syntax = "proto2"; + 3 | syntax = "proto2"; | -------- syntax specified here ... -23 | option features = {}; + 9 | option features = {}; | ^^^^^^^^ error: `features` cannot be set in "proto2" - --> testdata/editions/proto2.proto:26:12 + --> testdata/editions/proto2.proto:12:12 | -17 | syntax = "proto2"; + 3 | syntax = "proto2"; | -------- syntax specified here ... -26 | option features = {}; +12 | option features = {}; | ^^^^^^^^ error: `features` cannot be set in "proto2" - --> testdata/editions/proto2.proto:27:27 + --> testdata/editions/proto2.proto:13:27 | -17 | syntax = "proto2"; + 3 | syntax = "proto2"; | -------- syntax specified here ... -26 | option features = {}; -27 | optional int32 x = 1 [features.field_presence = IMPLICIT]; +12 | option features = {}; +13 | optional int32 x = 1 [features.field_presence = IMPLICIT]; | ^^^^^^^^ error: `field_presence` is not supported in "proto2" - --> testdata/editions/proto2.proto:27:27 + --> testdata/editions/proto2.proto:13:27 | -17 | syntax = "proto2"; + 3 | syntax = "proto2"; | -------- syntax specified here ... -26 | option features = {}; -27 | optional int32 x = 1 [features.field_presence = IMPLICIT]; +12 | option features = {}; +13 | optional int32 x = 1 [features.field_presence = IMPLICIT]; | ^^^^^^^^^^^^^^^^^^^^^^^ = help: `field_presence` requires at least Edition 2023 error: `features` cannot be set in "proto2" - --> testdata/editions/proto2.proto:29:16 + --> testdata/editions/proto2.proto:15:16 | -17 | syntax = "proto2"; + 3 | syntax = "proto2"; | -------- syntax specified here ... -29 | option features = {}; +15 | option features = {}; | ^^^^^^^^ error: `features` cannot be set in "proto2" - --> testdata/editions/proto2.proto:30:22 + --> testdata/editions/proto2.proto:16:22 | -17 | syntax = "proto2"; + 3 | syntax = "proto2"; | -------- syntax specified here ... -29 | option features = {}; -30 | int32 z = 2 [(google.protobuf.FieldOptions.features) = {}]; +15 | option features = {}; +16 | int32 z = 2 [(google.protobuf.FieldOptions.features) = {}]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: redundant custom option setting syntax - --> testdata/editions/proto2.proto:30:22 + --> testdata/editions/proto2.proto:16:22 | - 30 | int32 z = 2 [(google.protobuf.FieldOptions.features) = {}]; + 16 | int32 z = 2 [(google.protobuf.FieldOptions.features) = {}]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | this field is not a message extension @@ -71,33 +71,33 @@ warning: redundant custom option setting syntax | | | field declared inside of `google.protobuf.FieldOptions` here | - ::: testdata/editions/proto2.proto:30:22 + ::: testdata/editions/proto2.proto:16:22 help: replace `(...)` with a field name | - 30 | - int32 z = 2 [(google.protobuf.FieldOptions.features) = {}]; - 30 | + int32 z = 2 [features = {}]; + 16 | - int32 z = 2 [(google.protobuf.FieldOptions.features) = {}]; + 16 | + int32 z = 2 [features = {}]; | | = help: custom option setting syntax should only be used with message extensions error: `features` cannot be set in "proto2" - --> testdata/editions/proto2.proto:35:12 + --> testdata/editions/proto2.proto:21:12 | -17 | syntax = "proto2"; + 3 | syntax = "proto2"; | -------- syntax specified here ... -35 | option features = {}; +21 | option features = {}; | ^^^^^^^^ error: `features` cannot be set in "proto2" - --> testdata/editions/proto2.proto:36:12 + --> testdata/editions/proto2.proto:22:12 | -17 | syntax = "proto2"; + 3 | syntax = "proto2"; | -------- syntax specified here ... -35 | option features = {}; -36 | X = 1 [features = {}]; +21 | option features = {}; +22 | X = 1 [features = {}]; | ^^^^^^^^ encountered 8 errors and 1 warning diff --git a/experimental/ir/testdata/empty.proto.yaml b/experimental/ir/testdata/empty.proto.yaml index 5bd65b9e7..a96a2b6a6 100644 --- a/experimental/ir/testdata/empty.proto.yaml +++ b/experimental/ir/testdata/empty.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - exclude: ["missing `package`", "missing `syntax`"] descriptor: true source_code_info: true diff --git a/experimental/ir/testdata/extend/decl.proto b/experimental/ir/testdata/extend/decl.proto index 14d039188..9a3c3b861 100644 --- a/experimental/ir/testdata/extend/decl.proto +++ b/experimental/ir/testdata/extend/decl.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/ir/testdata/extend/decl.proto.stderr.txt b/experimental/ir/testdata/extend/decl.proto.stderr.txt index 1bf10f722..74bf06e69 100644 --- a/experimental/ir/testdata/extend/decl.proto.stderr.txt +++ b/experimental/ir/testdata/extend/decl.proto.stderr.txt @@ -1,230 +1,230 @@ error: unexpected `}` after definition - --> testdata/extend/decl.proto:20:20 + --> testdata/extend/decl.proto:6:20 | -20 | enum E { Z = 0 } + 6 | enum E { Z = 0 } | ^ expected `;` | help: consider inserting a `;` | -20 | enum E { Z = 0; } + 6 | enum E { Z = 0; } | + warning: missing declaration for extension number `7` - --> testdata/extend/decl.proto:22:24 + --> testdata/extend/decl.proto:8:24 | -22 | extensions 1 to 3, 4 to 7 [ + 8 | extensions 1 to 3, 4 to 7 [ | ^^^^^^ required by this range | = note: this is likely a mistake, but it is not rejected by protoc error: multi-range `extensions` with extension declarations - --> testdata/extend/decl.proto:23:9 + --> testdata/extend/decl.proto:9:9 | -22 | extensions 1 to 3, 4 to 7 [ + 8 | extensions 1 to 3, 4 to 7 [ | -------------- multiple ranges declared here -23 | declaration = {}, + 9 | declaration = {}, | ^^^^^^^^^^^ declaration defined here | = help: this is rejected by protoc due to a quirk in its internal representation of extension ranges error: extension declaration must specify `number` - --> testdata/extend/decl.proto:23:23 + --> testdata/extend/decl.proto:9:23 | -23 | declaration = {}, + 9 | declaration = {}, | ^^ error: expected fully-qualified name in `Declaration.full_name` - --> testdata/extend/decl.proto:27:24 + --> testdata/extend/decl.proto:13:24 | -27 | full_name: "???", +13 | full_name: "???", | ^^^^^ error: relative name in `Declaration.full_name` - --> testdata/extend/decl.proto:32:24 + --> testdata/extend/decl.proto:18:24 | -32 | full_name: "test.x", +18 | full_name: "test.x", | ^^^^^^^^ help: add a leading `.` | -32 | full_name: ".test.x", +18 | full_name: ".test.x", | + error: expected fully-qualified name in `Declaration.full_name` - --> testdata/extend/decl.proto:37:24 + --> testdata/extend/decl.proto:23:24 | -37 | full_name: ".test..x", +23 | full_name: ".test..x", | ^^^^^^^^^^ error: expected predeclared type or fully-qualified name in `Declaration.type` - --> testdata/extend/decl.proto:44:19 + --> testdata/extend/decl.proto:30:19 | -44 | type: "???", +30 | type: "???", | ^^^^^ error: relative name in `Declaration.type` - --> testdata/extend/decl.proto:49:19 + --> testdata/extend/decl.proto:35:19 | -49 | type: "test.X", +35 | type: "test.X", | ^^^^^^^^ help: add a leading `.` | -49 | type: ".test.X", +35 | type: ".test.X", | + error: expected predeclared type or fully-qualified name in `Declaration.type` - --> testdata/extend/decl.proto:54:19 + --> testdata/extend/decl.proto:40:19 | -54 | type: ".test..X", +40 | type: ".test..X", | ^^^^^^^^^^ error: relative name in `Declaration.full_name` - --> testdata/extend/decl.proto:118:20 + --> testdata/extend/decl.proto:104:20 | -118 | full_name: "test.ok4", +104 | full_name: "test.ok4", | ^^^^^^^^^^ help: add a leading `.` | -118 | full_name: ".test.ok4", +104 | full_name: ".test.ok4", | + error: relative name in `Declaration.type` - --> testdata/extend/decl.proto:119:15 + --> testdata/extend/decl.proto:105:15 | -119 | type: "test.M", // Check that non-absolute paths work fine. +105 | type: "test.M", // Check that non-absolute paths work fine. | ^^^^^^^^ help: add a leading `.` | -119 | type: ".test.M", // Check that non-absolute paths work fine. +105 | type: ".test.M", // Check that non-absolute paths work fine. | + warning: expected type, got message extension `test.extn1` - --> testdata/extend/decl.proto:138:15 + --> testdata/extend/decl.proto:124:15 | -138 | type: ".test.extn1", +124 | type: ".test.extn1", | ^^^^^^^^^^^^^ - ::: testdata/extend/decl.proto:143:20 + ::: testdata/extend/decl.proto:129:20 | -143 | repeated int32 extn1 = 10; +129 | repeated int32 extn1 = 10; | ----- `test.extn1` declared here | = help: `Declaration.type` must name a (possibly unimported) type error: mismatched types - --> testdata/extend/decl.proto:143:5 + --> testdata/extend/decl.proto:129:5 | - 61 | type: "int32", + 47 | type: "int32", | ------- expected due to this ... -143 | repeated int32 extn1 = 10; +129 | repeated int32 extn1 = 10; | ^^^^^^^^^^^^^^ expected `int32`, found `repeated int32` | = note: expected: scalar type `int32` found: scalar type `repeated int32` error: unexpected message extension name - --> testdata/extend/decl.proto:144:20 + --> testdata/extend/decl.proto:130:20 | -144 | optional int32 extn2 = 11; +130 | optional int32 extn2 = 11; | ^^^^^ expected `.test.wrong` | - ::: testdata/extend/decl.proto:66:20 + ::: testdata/extend/decl.proto:52:20 | - 66 | full_name: ".test.wrong", + 52 | full_name: ".test.wrong", | ------------- expected name declared here error: mismatched types - --> testdata/extend/decl.proto:145:5 + --> testdata/extend/decl.proto:131:5 | - 73 | type: "int32", + 59 | type: "int32", | ------- expected due to this - 74 | repeated: true + 60 | repeated: true | -------------- `repeated` required here ... -144 | optional int32 extn2 = 11; -145 | optional int32 extn3 = 12; +130 | optional int32 extn2 = 11; +131 | optional int32 extn3 = 12; | ^^^^^^^^^^^^^^ expected `repeated int32`, found `int32` | = note: expected: scalar type `repeated int32` found: scalar type `int32` error: mismatched types - --> testdata/extend/decl.proto:146:5 + --> testdata/extend/decl.proto:132:5 | - 80 | type: ".test.M", + 66 | type: ".test.M", | --------- expected due to this ... -145 | optional int32 extn3 = 12; -146 | repeated M extn4 = 13; +131 | optional int32 extn3 = 12; +132 | repeated M extn4 = 13; | ^^^^^^^^^^ expected `test.M`, found `repeated test.M` | = note: expected: message type `test.M` found: message type `repeated test.M` error: mismatched types - --> testdata/extend/decl.proto:147:5 + --> testdata/extend/decl.proto:133:5 | - 86 | type: ".test.M", + 72 | type: ".test.M", | --------- expected due to this - 87 | repeated: true + 73 | repeated: true | -------------- `repeated` required here ... -146 | repeated M extn4 = 13; -147 | optional M extn5 = 14; +132 | repeated M extn4 = 13; +133 | optional M extn5 = 14; | ^^^^^^^^^^ expected `repeated test.M`, found `test.M` | = note: expected: message type `repeated test.M` found: message type `test.M` error: use of reserved extension number - --> testdata/extend/decl.proto:148:24 + --> testdata/extend/decl.proto:134:24 | -148 | optional M extn6 = 15; +134 | optional M extn6 = 15; | ^^ - ::: testdata/extend/decl.proto:90:34 + ::: testdata/extend/decl.proto:76:34 | - 90 | extensions 15 [declaration = { + 76 | extensions 15 [declaration = { | _________________________________- ... / - 93 | | type: ".test.M", - 94 | | reserved: true + 79 | | type: ".test.M", + 80 | | reserved: true | | ---- ... and reserved here - 95 | | }]; + 81 | | }]; | \_____- extension declared here error: mismatched types - --> testdata/extend/decl.proto:159:5 + --> testdata/extend/decl.proto:145:5 | -126 | type: ".test.M.E", +112 | type: ".test.M.E", | ----------- expected due to this ... -159 | optional int32 enum1 = 30; +145 | optional int32 enum1 = 30; | ^^^^^^^^^^^^^^ expected `test.M.E`, found `int32` | = note: expected: enum type `test.M.E` found: scalar type `int32` error: mismatched types - --> testdata/extend/decl.proto:160:5 + --> testdata/extend/decl.proto:146:5 | -132 | type: ".test.Idk", +118 | type: ".test.Idk", | ----------- expected due to this ... -159 | optional int32 enum1 = 30; -160 | optional int32 enum2 = 31; +145 | optional int32 enum1 = 30; +146 | optional int32 enum2 = 31; | ^^^^^^^^^^^^^^ expected unknown type `test.Idk`, found `int32` | = note: expected: unknown type `test.Idk` found: scalar type `int32` error: mismatched types - --> testdata/extend/decl.proto:161:5 + --> testdata/extend/decl.proto:147:5 | -138 | type: ".test.extn1", +124 | type: ".test.extn1", | ------------- expected due to this ... -160 | optional int32 enum2 = 31; -161 | optional int32 enum3 = 32; +146 | optional int32 enum2 = 31; +147 | optional int32 enum3 = 32; | ^^^^^^^^^^^^^^ expected `test.extn1`, found `int32` | = note: expected: message extension `test.extn1` diff --git a/experimental/ir/testdata/extend/decl_empty_pkg.proto b/experimental/ir/testdata/extend/decl_empty_pkg.proto index b60d43a04..1baac8388 100644 --- a/experimental/ir/testdata/extend/decl_empty_pkg.proto +++ b/experimental/ir/testdata/extend/decl_empty_pkg.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; message int32 { diff --git a/experimental/ir/testdata/extend/decl_empty_pkg.proto.stderr.txt b/experimental/ir/testdata/extend/decl_empty_pkg.proto.stderr.txt index b6edb6fd1..382cce98e 100644 --- a/experimental/ir/testdata/extend/decl_empty_pkg.proto.stderr.txt +++ b/experimental/ir/testdata/extend/decl_empty_pkg.proto.stderr.txt @@ -4,26 +4,26 @@ warning: missing `package` declaration package; using it strongly is discouraged error: mismatched types - --> testdata/extend/decl_empty_pkg.proto:44:5 + --> testdata/extend/decl_empty_pkg.proto:30:5 | -27 | type: ".int32" +13 | type: ".int32" | -------- expected due to this ... -43 | optional .int32 x1 = 1; -44 | optional int32 x2 = 2; +29 | optional .int32 x1 = 1; +30 | optional int32 x2 = 2; | ^^^^^^^^^^^^^^ expected `int32`, found `int32` | = note: expected: message type `int32` found: scalar type `int32` error: mismatched types - --> testdata/extend/decl_empty_pkg.proto:45:5 + --> testdata/extend/decl_empty_pkg.proto:31:5 | -32 | type: "int32" +18 | type: "int32" | ------- expected due to this ... -44 | optional int32 x2 = 2; -45 | optional .int32 y1 = 3; +30 | optional int32 x2 = 2; +31 | optional .int32 y1 = 3; | ^^^^^^^^^^^^^^^ expected `int32`, found `int32` | = note: expected: scalar type `int32` diff --git a/experimental/ir/testdata/extend/duplicate.proto.yaml b/experimental/ir/testdata/extend/duplicate.proto.yaml index 95f74d0bb..23d2145ec 100644 --- a/experimental/ir/testdata/extend/duplicate.proto.yaml +++ b/experimental/ir/testdata/extend/duplicate.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - files: - path: "a.proto" text: | diff --git a/experimental/ir/testdata/extend/import_private.proto.yaml b/experimental/ir/testdata/extend/import_private.proto.yaml index 82298df66..9850e1e8d 100644 --- a/experimental/ir/testdata/extend/import_private.proto.yaml +++ b/experimental/ir/testdata/extend/import_private.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - exclude: "unused import" files: - path: "a.proto" diff --git a/experimental/ir/testdata/extend/in_range.proto b/experimental/ir/testdata/extend/in_range.proto index b1b97f38a..6b9c2c390 100644 --- a/experimental/ir/testdata/extend/in_range.proto +++ b/experimental/ir/testdata/extend/in_range.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/ir/testdata/extend/in_range.proto.stderr.txt b/experimental/ir/testdata/extend/in_range.proto.stderr.txt index d526cf33e..8e1688d56 100644 --- a/experimental/ir/testdata/extend/in_range.proto.stderr.txt +++ b/experimental/ir/testdata/extend/in_range.proto.stderr.txt @@ -1,7 +1,7 @@ error: extension with unreserved number `20` - --> testdata/extend/in_range.proto:26:24 + --> testdata/extend/in_range.proto:12:24 | -26 | optional int32 z = 20; +12 | optional int32 z = 20; | ^^ = help: the parent message `test.M` must have reserved this number with an extension range, e.g. `extensions 20;` diff --git a/experimental/ir/testdata/extend/invalid_partial.proto b/experimental/ir/testdata/extend/invalid_partial.proto index afccdc6eb..fee24ed71 100644 --- a/experimental/ir/testdata/extend/invalid_partial.proto +++ b/experimental/ir/testdata/extend/invalid_partial.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/extend/invalid_partial.proto.stderr.txt b/experimental/ir/testdata/extend/invalid_partial.proto.stderr.txt index 0a65ac92c..ba5e2930f 100644 --- a/experimental/ir/testdata/extend/invalid_partial.proto.stderr.txt +++ b/experimental/ir/testdata/extend/invalid_partial.proto.stderr.txt @@ -1,10 +1,10 @@ error: cannot find `M.N` in this scope - --> testdata/extend/invalid_partial.proto:25:16 + --> testdata/extend/invalid_partial.proto:11:16 | -21 | message N { + 7 | message N { | - found possibly related symbol `test.M.N` ... -25 | extend M.N { +11 | extend M.N { | ^^^ not found in this scope | = note: Protobuf's name lookup rules expected a symbol `test.M.M.N`, rather diff --git a/experimental/ir/testdata/extend/message_set.proto b/experimental/ir/testdata/extend/message_set.proto index 0ed87a667..bed663c91 100644 --- a/experimental/ir/testdata/extend/message_set.proto +++ b/experimental/ir/testdata/extend/message_set.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/extend/message_set.proto.stderr.txt b/experimental/ir/testdata/extend/message_set.proto.stderr.txt index d1fa4a683..d15bde0e5 100644 --- a/experimental/ir/testdata/extend/message_set.proto.stderr.txt +++ b/experimental/ir/testdata/extend/message_set.proto.stderr.txt @@ -1,25 +1,25 @@ error: message set type `google.protobuf.test.M1` declares no extension ranges - --> testdata/extend/message_set.proto:23:12 + --> testdata/extend/message_set.proto:9:12 | -22 | message M1 { + 8 | message M1 { | ---------- -23 | option message_set_wire_format = true; + 9 | option message_set_wire_format = true; | ^^^^^^^^^^^^^^^^^^^^^^^ declared as message set here error: message set type `google.protobuf.test.M2` declares no extension ranges - --> testdata/extend/message_set.proto:27:12 + --> testdata/extend/message_set.proto:13:12 | -26 | message M2 { +12 | message M2 { | ---------- -27 | option (MessageOptions.message_set_wire_format) = true; +13 | option (MessageOptions.message_set_wire_format) = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | declared as message set here warning: redundant custom option setting syntax - --> testdata/extend/message_set.proto:27:12 + --> testdata/extend/message_set.proto:13:12 | - 27 | option (MessageOptions.message_set_wire_format) = true; + 13 | option (MessageOptions.message_set_wire_format) = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | this field is not a message extension @@ -31,26 +31,26 @@ warning: redundant custom option setting syntax | | | field declared inside of `google.protobuf.MessageOptions` here | - ::: testdata/extend/message_set.proto:27:12 + ::: testdata/extend/message_set.proto:13:12 help: replace `(...)` with a field name | - 27 | - option (MessageOptions.message_set_wire_format) = true; - 27 | + option message_set_wire_format = true; + 13 | - option (MessageOptions.message_set_wire_format) = true; + 13 | + option message_set_wire_format = true; | | = help: custom option setting syntax should only be used with message extensions error: field declared in message set type `google.protobuf.test.M2` - --> testdata/extend/message_set.proto:28:5 + --> testdata/extend/message_set.proto:14:5 | -28 | optional int32 x = 1; +14 | optional int32 x = 1; | ^^^^^^^^^^^^^^^^^^^^^ - ::: testdata/extend/message_set.proto:26:1 + ::: testdata/extend/message_set.proto:12:1 | -26 | message M2 { +12 | message M2 { | ---------- -27 | option (MessageOptions.message_set_wire_format) = true; +13 | option (MessageOptions.message_set_wire_format) = true; | ---------------------------------------- | | | declared as message set here @@ -58,11 +58,11 @@ error: field declared in message set type `google.protobuf.test.M2` = help: message set types may only declare extension ranges warning: message set types are deprecated - --> testdata/extend/message_set.proto:32:12 + --> testdata/extend/message_set.proto:18:12 | -31 | message M3 { +17 | message M3 { | ---------- -32 | option (protobuf.MessageOptions.message_set_wire_format) = true; +18 | option (protobuf.MessageOptions.message_set_wire_format) = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | declared as message set here @@ -71,9 +71,9 @@ warning: message set types are deprecated implementations warning: redundant custom option setting syntax - --> testdata/extend/message_set.proto:32:12 + --> testdata/extend/message_set.proto:18:12 | - 32 | option (protobuf.MessageOptions.message_set_wire_format) = true; + 18 | option (protobuf.MessageOptions.message_set_wire_format) = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | this field is not a message extension @@ -85,33 +85,33 @@ warning: redundant custom option setting syntax | | | field declared inside of `google.protobuf.MessageOptions` here | - ::: testdata/extend/message_set.proto:32:12 + ::: testdata/extend/message_set.proto:18:12 help: replace `(...)` with a field name | - 32 | - option (protobuf.MessageOptions.message_set_wire_format) = true; - 32 | + option message_set_wire_format = true; + 18 | - option (protobuf.MessageOptions.message_set_wire_format) = true; + 18 | + option message_set_wire_format = true; | | = help: custom option setting syntax should only be used with message extensions error: literal out of range for message set extension number - --> testdata/extend/message_set.proto:34:16 + --> testdata/extend/message_set.proto:20:16 | -34 | extensions 0x7fffffff; +20 | extensions 0x7fffffff; | ^^^^^^^^^^ = note: the range for message set extension number is `0x0 to 0x7ffffffe` error: repeated message set extension - --> testdata/extend/message_set.proto:39:5 + --> testdata/extend/message_set.proto:25:5 | -39 | repeated M2 m2 = 2; +25 | repeated M2 m2 = 2; | ^^^^^^^^ - ::: testdata/extend/message_set.proto:32:12 + ::: testdata/extend/message_set.proto:18:12 | -31 | message M3 { +17 | message M3 { | ---------- -32 | option (protobuf.MessageOptions.message_set_wire_format) = true; +18 | option (protobuf.MessageOptions.message_set_wire_format) = true; | ------------------------------------------------- | | | declared as message set here @@ -119,15 +119,15 @@ error: repeated message set extension = help: message set extensions must be singular message fields error: non-message message set extension - --> testdata/extend/message_set.proto:40:14 + --> testdata/extend/message_set.proto:26:14 | -40 | optional int32 m3 = 3; +26 | optional int32 m3 = 3; | ^^^^^ - ::: testdata/extend/message_set.proto:32:12 + ::: testdata/extend/message_set.proto:18:12 | -31 | message M3 { +17 | message M3 { | ---------- -32 | option (protobuf.MessageOptions.message_set_wire_format) = true; +18 | option (protobuf.MessageOptions.message_set_wire_format) = true; | ------------------------------------------------- | | | declared as message set here @@ -135,25 +135,25 @@ error: non-message message set extension = help: message set extensions must be singular message fields error: unsupported map-typed extension - --> testdata/extend/message_set.proto:42:5 + --> testdata/extend/message_set.proto:28:5 | -42 | map m4 = 4; +28 | map m4 = 4; | ^^^^^^^^^^^^^^^^^^^ declared here | = help: extensions cannot be map-typed; instead, define a message type with a map-typed field error: literal out of range for message set extension number - --> testdata/extend/message_set.proto:44:22 + --> testdata/extend/message_set.proto:30:22 | -44 | optional M3 m5 = 0x7fffffff; +30 | optional M3 m5 = 0x7fffffff; | ^^^^^^^^^^ = note: the range for message set extension number is `0x0 to 0x7ffffffe` error: literal out of range for message set extension number - --> testdata/extend/message_set.proto:45:22 + --> testdata/extend/message_set.proto:31:22 | -45 | optional M3 m6 = 0xffffffff; +31 | optional M3 m6 = 0xffffffff; | ^^^^^^^^^^ = note: the range for message set extension number is `0x0 to 0x7ffffffe` diff --git a/experimental/ir/testdata/extend/message_set_proto3.proto b/experimental/ir/testdata/extend/message_set_proto3.proto index f8ac447b0..add19e1e2 100644 --- a/experimental/ir/testdata/extend/message_set_proto3.proto +++ b/experimental/ir/testdata/extend/message_set_proto3.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/ir/testdata/extend/message_set_proto3.proto.stderr.txt b/experimental/ir/testdata/extend/message_set_proto3.proto.stderr.txt index bf27eb4bd..abc17518a 100644 --- a/experimental/ir/testdata/extend/message_set_proto3.proto.stderr.txt +++ b/experimental/ir/testdata/extend/message_set_proto3.proto.stderr.txt @@ -1,14 +1,14 @@ error: message set type are not supported - --> testdata/extend/message_set_proto3.proto:20:12 + --> testdata/extend/message_set_proto3.proto:6:12 | -19 | message M1 { + 5 | message M1 { | ---------- -20 | option message_set_wire_format = true; + 6 | option message_set_wire_format = true; | ^^^^^^^^^^^^^^^^^^^^^^^ declared as message set here | - ::: testdata/extend/message_set_proto3.proto:15:10 + ::: testdata/extend/message_set_proto3.proto:1:10 | -15 | syntax = "proto3"; + 1 | syntax = "proto3"; | -------- "proto3" specified here | = help: message set types cannot be defined in "proto3" only @@ -16,13 +16,13 @@ error: message set type are not supported implementations error: extension range in "proto3" - --> testdata/extend/message_set_proto3.proto:21:16 + --> testdata/extend/message_set_proto3.proto:7:16 | -21 | extensions 1 to max; + 7 | extensions 1 to max; | ^^^^^^^^ - ::: testdata/extend/message_set_proto3.proto:15:10 + ::: testdata/extend/message_set_proto3.proto:1:10 | -15 | syntax = "proto3"; + 1 | syntax = "proto3"; | -------- "proto3" specified here | = help: extension numbers cannot be reserved in "proto3" diff --git a/experimental/ir/testdata/extend/ok.proto b/experimental/ir/testdata/extend/ok.proto index f137b1881..1df68f35e 100644 --- a/experimental/ir/testdata/extend/ok.proto +++ b/experimental/ir/testdata/extend/ok.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/extend/overlap.proto b/experimental/ir/testdata/extend/overlap.proto index 67b517db8..d7c7fc6bf 100644 --- a/experimental/ir/testdata/extend/overlap.proto +++ b/experimental/ir/testdata/extend/overlap.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/ir/testdata/extend/overlap.proto.stderr.txt b/experimental/ir/testdata/extend/overlap.proto.stderr.txt index ac72accf3..deea85968 100644 --- a/experimental/ir/testdata/extend/overlap.proto.stderr.txt +++ b/experimental/ir/testdata/extend/overlap.proto.stderr.txt @@ -1,79 +1,79 @@ error: unexpected extension range within enum definition - --> testdata/extend/overlap.proto:33:5 + --> testdata/extend/overlap.proto:19:5 | -32 | / enum E { -33 | | extensions 1; // Not allowed. +18 | / enum E { +19 | | extensions 1; // Not allowed. | | ^^^^^^^^^^^^^ this extension range... -34 | | X = 0; -35 | | } +20 | | X = 0; +21 | | } | \_- ...cannot be declared within this enum definition | = help: this extension range can only appear within a message definition error: use of reserved field number `2` - --> testdata/extend/overlap.proto:21:25 + --> testdata/extend/overlap.proto:7:25 | -21 | optional int32 y1 = 2; + 7 | optional int32 y1 = 2; | ^ used here -22 | optional int32 y2 = 3; + 8 | optional int32 y2 = 3; ... -26 | extensions 2, 3 to 3, 5 to max; +12 | extensions 2, 3 to 3, 5 to max; | - field number reserved here error: use of reserved field number `3` - --> testdata/extend/overlap.proto:22:25 + --> testdata/extend/overlap.proto:8:25 | -22 | optional int32 y2 = 3; + 8 | optional int32 y2 = 3; | ^ used here -23 | optional int32 y3 = 4; + 9 | optional int32 y3 = 4; ... -26 | extensions 2, 3 to 3, 5 to max; +12 | extensions 2, 3 to 3, 5 to max; | ------ field number reserved here error: use of reserved field number `5` - --> testdata/extend/overlap.proto:24:25 + --> testdata/extend/overlap.proto:10:25 | -24 | optional int32 y4 = 5; +10 | optional int32 y4 = 5; | ^ used here -25 | -26 | extensions 2, 3 to 3, 5 to max; +11 | +12 | extensions 2, 3 to 3, 5 to max; | -------- field number reserved here warning: singleton range can be simplified - --> testdata/extend/overlap.proto:26:19 + --> testdata/extend/overlap.proto:12:19 | -26 | extensions 2, 3 to 3, 5 to max; +12 | extensions 2, 3 to 3, 5 to max; | ^^^^^^ help: replace with a single number | -26 | - extensions 2, 3 to 3, 5 to max; -26 | + extensions 2, 3, 5 to max; +12 | - extensions 2, 3 to 3, 5 to max; +12 | + extensions 2, 3, 5 to max; error: overlapping field number ranges - --> testdata/extend/overlap.proto:26:27 + --> testdata/extend/overlap.proto:12:27 | -26 | extensions 2, 3 to 3, 5 to max; +12 | extensions 2, 3 to 3, 5 to max; | ^^^^^^^^ this range -27 | reserved 7, 8 to 9; // Overlapping reserved regions. +13 | reserved 7, 8 to 9; // Overlapping reserved regions. | ------ overlaps with this one | = help: they overlap in the range `8 to 9` error: overlapping field number ranges - --> testdata/extend/overlap.proto:28:16 + --> testdata/extend/overlap.proto:14:16 | -26 | extensions 2, 3 to 3, 5 to max; +12 | extensions 2, 3 to 3, 5 to max; | -------- overlaps with this one -27 | reserved 7, 8 to 9; // Overlapping reserved regions. -28 | extensions 10 to 20; // Overlapping extensions. +13 | reserved 7, 8 to 9; // Overlapping reserved regions. +14 | extensions 10 to 20; // Overlapping extensions. | ^^^^^^^^ this range | = help: they overlap in the range `10 to 20` error: `max` outside of range end - --> testdata/extend/overlap.proto:29:16 + --> testdata/extend/overlap.proto:15:16 | -29 | extensions max to max; // Only first can be max. +15 | extensions max to max; // Only first can be max. | ^^^ = note: the special `max` expression can only be used at the end of a range diff --git a/experimental/ir/testdata/extend/proto3.proto b/experimental/ir/testdata/extend/proto3.proto index 5b5116475..c055c5f33 100644 --- a/experimental/ir/testdata/extend/proto3.proto +++ b/experimental/ir/testdata/extend/proto3.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto3"; diff --git a/experimental/ir/testdata/extend/proto3.proto.stderr.txt b/experimental/ir/testdata/extend/proto3.proto.stderr.txt index d622b951a..73db2508c 100644 --- a/experimental/ir/testdata/extend/proto3.proto.stderr.txt +++ b/experimental/ir/testdata/extend/proto3.proto.stderr.txt @@ -1,23 +1,23 @@ error: extension range in "proto3" - --> testdata/extend/proto3.proto:23:16 + --> testdata/extend/proto3.proto:9:16 | -23 | extensions 1; + 9 | extensions 1; | ^ - ::: testdata/extend/proto3.proto:16:10 + ::: testdata/extend/proto3.proto:2:10 | -16 | syntax = "proto3"; + 2 | syntax = "proto3"; | -------- "proto3" specified here | = help: extension numbers cannot be reserved in "proto3" error: expected built-in options message, found message type `test.M` - --> testdata/extend/proto3.proto:26:1 + --> testdata/extend/proto3.proto:12:1 | -26 | extend M { +12 | extend M { | ^^^^^^ - ::: testdata/extend/proto3.proto:16:10 + ::: testdata/extend/proto3.proto:2:10 | -16 | syntax = "proto3"; + 2 | syntax = "proto3"; | -------- "proto3" specified here | = help: extendees in "proto3" files are restricted to extending diff --git a/experimental/ir/testdata/extend/skip_private.proto.yaml b/experimental/ir/testdata/extend/skip_private.proto.yaml index f8f020f46..5694d92bb 100644 --- a/experimental/ir/testdata/extend/skip_private.proto.yaml +++ b/experimental/ir/testdata/extend/skip_private.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - descriptor: true exclude: "unused import" files: diff --git a/experimental/ir/testdata/extend/skip_wrong_kind.proto b/experimental/ir/testdata/extend/skip_wrong_kind.proto index 75754719b..eb73114e5 100644 --- a/experimental/ir/testdata/extend/skip_wrong_kind.proto +++ b/experimental/ir/testdata/extend/skip_wrong_kind.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/ir/testdata/extend/skip_wrong_kind.proto.stderr.txt b/experimental/ir/testdata/extend/skip_wrong_kind.proto.stderr.txt index d53e0e8b1..0c6b82944 100644 --- a/experimental/ir/testdata/extend/skip_wrong_kind.proto.stderr.txt +++ b/experimental/ir/testdata/extend/skip_wrong_kind.proto.stderr.txt @@ -1,17 +1,17 @@ error: expected message type, found enum value `test.M.P.N` - --> testdata/extend/skip_wrong_kind.proto:25:16 + --> testdata/extend/skip_wrong_kind.proto:11:16 | -24 | enum X { N = 1; } +10 | enum X { N = 1; } | - defined here -25 | extend N { // Does not skip .test.M.P.N +11 | extend N { // Does not skip .test.M.P.N | ^ expected message type error: expected message type, found enum type `test.M.Q.N` - --> testdata/extend/skip_wrong_kind.proto:32:16 + --> testdata/extend/skip_wrong_kind.proto:18:16 | -31 | enum N { Q = 1; } +17 | enum N { Q = 1; } | - defined here -32 | extend N { // Does not skip .test.M.Q.N +18 | extend N { // Does not skip .test.M.Q.N | ^ expected message type encountered 2 errors diff --git a/experimental/ir/testdata/extend/wrong_kind.proto b/experimental/ir/testdata/extend/wrong_kind.proto index 0c9f638f2..1edcd964a 100644 --- a/experimental/ir/testdata/extend/wrong_kind.proto +++ b/experimental/ir/testdata/extend/wrong_kind.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/ir/testdata/extend/wrong_kind.proto.stderr.txt b/experimental/ir/testdata/extend/wrong_kind.proto.stderr.txt index dd73c5221..b30a1ce62 100644 --- a/experimental/ir/testdata/extend/wrong_kind.proto.stderr.txt +++ b/experimental/ir/testdata/extend/wrong_kind.proto.stderr.txt @@ -1,54 +1,54 @@ error: expected message type, found message extension `test.Foo.x` - --> testdata/extend/wrong_kind.proto:22:12 + --> testdata/extend/wrong_kind.proto:8:12 | -22 | extend x { + 8 | extend x { | ^ expected message type -23 | optional int32 x = 1; + 9 | optional int32 x = 1; | - defined here error: expected message type, found enum value `test.Foo.BAZ` - --> testdata/extend/wrong_kind.proto:25:12 + --> testdata/extend/wrong_kind.proto:11:12 | -20 | enum Bar { BAZ = 1; } + 6 | enum Bar { BAZ = 1; } | --- defined here ... -24 | } -25 | extend BAZ { +10 | } +11 | extend BAZ { | ^^^ expected message type error: expected message type, found enum type `test.Foo.Bar` - --> testdata/extend/wrong_kind.proto:28:12 + --> testdata/extend/wrong_kind.proto:14:12 | -20 | enum Bar { BAZ = 1; } + 6 | enum Bar { BAZ = 1; } | --- defined here ... -27 | } -28 | extend Bar { +13 | } +14 | extend Bar { | ^^^ expected message type error: expected message type, found `package` declaration `test` - --> testdata/extend/wrong_kind.proto:31:12 + --> testdata/extend/wrong_kind.proto:17:12 | -17 | package test; + 3 | package test; | ------------- defined here ... -30 | } -31 | extend test { +16 | } +17 | extend test { | ^^^^ expected message type error: expected message type, found oneof definition `test.Foo.self` - --> testdata/extend/wrong_kind.proto:39:12 + --> testdata/extend/wrong_kind.proto:25:12 | -35 | oneof self { +21 | oneof self { | ---- defined here ... -39 | extend self { +25 | extend self { | ^^^^ expected message type error: expected message type, found scalar type `string` - --> testdata/extend/wrong_kind.proto:43:12 + --> testdata/extend/wrong_kind.proto:29:12 | -43 | extend string { +29 | extend string { | ^^^^^^ expected message type encountered 6 errors diff --git a/experimental/ir/testdata/fields/default.proto b/experimental/ir/testdata/fields/default.proto index a04173913..cdcc45231 100644 --- a/experimental/ir/testdata/fields/default.proto +++ b/experimental/ir/testdata/fields/default.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true edition = "2023"; diff --git a/experimental/ir/testdata/fields/default.proto.stderr.txt b/experimental/ir/testdata/fields/default.proto.stderr.txt index 855ea3862..968ad58a1 100644 --- a/experimental/ir/testdata/fields/default.proto.stderr.txt +++ b/experimental/ir/testdata/fields/default.proto.stderr.txt @@ -1,7 +1,7 @@ error: literal out of range for `int32` - --> testdata/fields/default.proto:24:29 + --> testdata/fields/default.proto:10:29 | -24 | int32 i3 = 3 [default = 0xffffffff]; +10 | int32 i3 = 3 [default = 0xffffffff]; | ----- ^^^^^^^^^^ | | | expected due to this @@ -9,9 +9,9 @@ error: literal out of range for `int32` = note: the range for `int32` is `-0x80000000 to 0x7fffffff` error: literal out of range for `uint32` - --> testdata/fields/default.proto:25:30 + --> testdata/fields/default.proto:11:30 | -25 | uint32 i4 = 4 [default = 0x100000000]; +11 | uint32 i4 = 4 [default = 0x100000000]; | ------ ^^^^^^^^^^^ | | | expected due to this @@ -19,79 +19,79 @@ error: literal out of range for `uint32` = note: the range for `uint32` is `0x0 to 0xffffffff` warning: redundant custom default - --> testdata/fields/default.proto:27:29 + --> testdata/fields/default.proto:13:29 | -27 | int32 i5 = 5 [default = 0]; +13 | int32 i5 = 5 [default = 0]; | ^ this is the zero value for `int32` | = help: fields without a custom default will default to the zero value, making this option redundant warning: redundant custom default - --> testdata/fields/default.proto:28:29 + --> testdata/fields/default.proto:14:29 | -28 | int32 i6 = 6 [default = 0]; +14 | int32 i6 = 6 [default = 0]; | ^ this is the zero value for `int32` | = help: fields without a custom default will default to the zero value, making this option redundant warning: floating-point literal rounds to infinity - --> testdata/fields/default.proto:31:30 + --> testdata/fields/default.proto:17:30 | -31 | float f2 = 12 [default = 1.0e1000]; +17 | float f2 = 12 [default = 1.0e1000]; | ^^^^^^^^ | | | this value is beyond the dynamic range of `float` | help: replace with `inf` | -31 | - float f2 = 12 [default = 1.0e1000]; -31 | + float f2 = 12 [default = inf]; +17 | - float f2 = 12 [default = 1.0e1000]; +17 | + float f2 = 12 [default = inf]; | | = note: this value is of order 1e1000; `float` can only represent around 1e38 warning: redundant custom default - --> testdata/fields/default.proto:35:30 + --> testdata/fields/default.proto:21:30 | -35 | float f6 = 16 [default = 0]; +21 | float f6 = 16 [default = 0]; | ^ this is the zero value for `float` | = help: fields without a custom default will default to the zero value, making this option redundant warning: non-UTF-8 string literal - --> testdata/fields/default.proto:38:36 + --> testdata/fields/default.proto:24:36 | -38 | string s2 = 22 [default = "\x63\xff"]; +24 | string s2 = 22 [default = "\x63\xff"]; | -------------------------------^^^^--- | | | | this field requires a UTF-8 string | | | non-UTF-8 byte | - ::: testdata/fields/default.proto:16:11 + ::: testdata/fields/default.proto:2:11 | -16 | edition = "2023"; + 2 | edition = "2023"; | ------ UTF-8 required here | = help: protoc erroneously accepts non-UTF-8 defaults for UTF-8 fields; for all other options, UTF-8 validation failure causes protoc to crash warning: redundant custom default - --> testdata/fields/default.proto:40:31 + --> testdata/fields/default.proto:26:31 | -40 | string s4 = 24 [default = ""]; +26 | string s4 = 24 [default = ""]; | ^^ this is the zero value for `string` | = help: fields without a custom default will default to the zero value, making this option redundant error: mismatched types - --> testdata/fields/default.proto:43:29 + --> testdata/fields/default.proto:29:29 | -43 | bool b2 = 32 [default = 1]; +29 | bool b2 = 32 [default = 1]; | ---- ^ expected `bool`, found integer literal | | | expected due to this @@ -100,27 +100,27 @@ error: mismatched types found: integer literal warning: redundant custom default - --> testdata/fields/default.proto:44:29 + --> testdata/fields/default.proto:30:29 | -44 | bool b3 = 33 [default = false]; +30 | bool b3 = 33 [default = false]; | ^^^^^ this is the zero value for `bool` | = help: fields without a custom default will default to the zero value, making this option redundant warning: redundant custom default - --> testdata/fields/default.proto:55:26 + --> testdata/fields/default.proto:41:26 | -55 | E e3 = 43 [default = E0]; +41 | E e3 = 43 [default = E0]; | ^^ this is the zero value for `buf.test.M.E` | = help: fields without a custom default will default to the zero value, making this option redundant error: expected singular scalar- or enum-typed field, found scalar type `int32` - --> testdata/fields/default.proto:57:14 + --> testdata/fields/default.proto:43:14 | -57 | repeated int32 w1 = 101 [default = 1, default = 2]; +43 | repeated int32 w1 = 101 [default = 1, default = 2]; | ^^^^^ ------- custom default specified here | = help: custom defaults are only for non-repeated fields that have a @@ -128,9 +128,9 @@ error: expected singular scalar- or enum-typed field, found scalar type `int32` error: expected singular scalar- or enum-typed field, found message type `buf.test.M` - --> testdata/fields/default.proto:58:5 + --> testdata/fields/default.proto:44:5 | -58 | M w2 = 102 [default = { +44 | M w2 = 102 [default = { | ^ ------- custom default specified here | = help: custom defaults are only for non-repeated fields that have a @@ -138,11 +138,11 @@ error: expected singular scalar- or enum-typed field, found message type error: expected singular scalar- or enum-typed field, found message type `buf.test.M` - --> testdata/fields/default.proto:62:5 + --> testdata/fields/default.proto:48:5 | -62 | M w3 = 103 [ +48 | M w3 = 103 [ | ^ -63 | default.i1 = 42, +49 | default.i1 = 42, | ------- custom default specified here | = help: custom defaults are only for non-repeated fields that have a diff --git a/experimental/ir/testdata/fields/default_proto3.proto b/experimental/ir/testdata/fields/default_proto3.proto index 9b432fa4e..40daa895e 100644 --- a/experimental/ir/testdata/fields/default_proto3.proto +++ b/experimental/ir/testdata/fields/default_proto3.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package buf.test; diff --git a/experimental/ir/testdata/fields/default_proto3.proto.stderr.txt b/experimental/ir/testdata/fields/default_proto3.proto.stderr.txt index 7456b8b32..30dd2abdf 100644 --- a/experimental/ir/testdata/fields/default_proto3.proto.stderr.txt +++ b/experimental/ir/testdata/fields/default_proto3.proto.stderr.txt @@ -1,11 +1,11 @@ error: custom default in "proto3" - --> testdata/fields/default_proto3.proto:20:18 + --> testdata/fields/default_proto3.proto:6:18 | -20 | int32 x = 1 [default = 42]; + 6 | int32 x = 1 [default = 42]; | ^^^^^^^^^^^^ - ::: testdata/fields/default_proto3.proto:15:10 + ::: testdata/fields/default_proto3.proto:1:10 | -15 | syntax = "proto3"; + 1 | syntax = "proto3"; | -------- "proto3" specified here | = help: custom defaults cannot be defined in "proto3" only diff --git a/experimental/ir/testdata/fields/empty_oneof.proto b/experimental/ir/testdata/fields/empty_oneof.proto index 54690c4a9..f54456f2b 100644 --- a/experimental/ir/testdata/fields/empty_oneof.proto +++ b/experimental/ir/testdata/fields/empty_oneof.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package buf.test; diff --git a/experimental/ir/testdata/fields/empty_oneof.proto.stderr.txt b/experimental/ir/testdata/fields/empty_oneof.proto.stderr.txt index 7e8b1d05a..b39deada2 100644 --- a/experimental/ir/testdata/fields/empty_oneof.proto.stderr.txt +++ b/experimental/ir/testdata/fields/empty_oneof.proto.stderr.txt @@ -1,7 +1,7 @@ error: oneof must define at least one member - --> testdata/fields/empty_oneof.proto:20:5 + --> testdata/fields/empty_oneof.proto:6:5 | -20 | oneof empty {} + 6 | oneof empty {} | ^^^^^^^^^^^^^^ encountered 1 error diff --git a/experimental/ir/testdata/fields/groups/collision.proto b/experimental/ir/testdata/fields/groups/collision.proto index fe3e46193..854ef3c7c 100644 --- a/experimental/ir/testdata/fields/groups/collision.proto +++ b/experimental/ir/testdata/fields/groups/collision.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/ir/testdata/fields/groups/collision.proto.stderr.txt b/experimental/ir/testdata/fields/groups/collision.proto.stderr.txt index f59807f0d..9863c2aff 100644 --- a/experimental/ir/testdata/fields/groups/collision.proto.stderr.txt +++ b/experimental/ir/testdata/fields/groups/collision.proto.stderr.txt @@ -1,88 +1,88 @@ warning: group syntax is deprecated - --> testdata/fields/groups/collision.proto:20:14 + --> testdata/fields/groups/collision.proto:6:14 | -20 | optional group FooBar = 1 {} + 6 | optional group FooBar = 1 {} | ^^^^^ = note: group syntax is not available in proto3 or editions warning: group syntax is deprecated - --> testdata/fields/groups/collision.proto:25:14 + --> testdata/fields/groups/collision.proto:11:14 | -25 | optional group FooBar = 1 {} +11 | optional group FooBar = 1 {} | ^^^^^ = note: group syntax is not available in proto3 or editions warning: group syntax is deprecated - --> testdata/fields/groups/collision.proto:30:14 + --> testdata/fields/groups/collision.proto:16:14 | -30 | optional group foo = 1 {} +16 | optional group foo = 1 {} | ^^^^^ = note: group syntax is not available in proto3 or editions error: group names must start with an uppercase letter - --> testdata/fields/groups/collision.proto:30:20 + --> testdata/fields/groups/collision.proto:16:20 | -30 | optional group foo = 1 {} +16 | optional group foo = 1 {} | ^^^ warning: group syntax is deprecated - --> testdata/fields/groups/collision.proto:32:14 + --> testdata/fields/groups/collision.proto:18:14 | -32 | optional group FooBar = 2 {} +18 | optional group FooBar = 2 {} | ^^^^^ = note: group syntax is not available in proto3 or editions warning: group syntax is deprecated - --> testdata/fields/groups/collision.proto:33:14 + --> testdata/fields/groups/collision.proto:19:14 | -33 | optional group foobar = 3 {} +19 | optional group foobar = 3 {} | ^^^^^ = note: group syntax is not available in proto3 or editions error: group names must start with an uppercase letter - --> testdata/fields/groups/collision.proto:33:20 + --> testdata/fields/groups/collision.proto:19:20 | -33 | optional group foobar = 3 {} +19 | optional group foobar = 3 {} | ^^^^^^ error: `FooBar` declared multiple times - --> testdata/fields/groups/collision.proto:20:20 + --> testdata/fields/groups/collision.proto:6:20 | -20 | optional group FooBar = 1 {} + 6 | optional group FooBar = 1 {} | ^^^^^^ first here, as a message type -21 | message FooBar {} + 7 | message FooBar {} | ------ ...also declared here error: `foobar` declared multiple times - --> testdata/fields/groups/collision.proto:25:20 + --> testdata/fields/groups/collision.proto:11:20 | -25 | optional group FooBar = 1 {} +11 | optional group FooBar = 1 {} | ^^^^^^ first here, as a message field -26 | optional int32 foobar = 2; +12 | optional int32 foobar = 2; | ------ ...also declared here warning: message fields have the same JSON name - --> testdata/fields/groups/collision.proto:26:20 + --> testdata/fields/groups/collision.proto:12:20 | -25 | optional group FooBar = 1 {} +11 | optional group FooBar = 1 {} | ------ this implies JSON name `foobar` -26 | optional int32 foobar = 2; +12 | optional int32 foobar = 2; | ^^^^^^ this also implies that name error: `foobar` declared multiple times - --> testdata/fields/groups/collision.proto:33:20 + --> testdata/fields/groups/collision.proto:19:20 | -32 | optional group FooBar = 2 {} +18 | optional group FooBar = 2 {} | ------ ...also declared here, now as a message field -33 | optional group foobar = 3 {} +19 | optional group foobar = 3 {} | ^^^^^^ first here, as a message type warning: message fields have the same JSON name - --> testdata/fields/groups/collision.proto:33:20 + --> testdata/fields/groups/collision.proto:19:20 | -32 | optional group FooBar = 2 {} +18 | optional group FooBar = 2 {} | ------ this implies JSON name `foobar` -33 | optional group foobar = 3 {} +19 | optional group foobar = 3 {} | ^^^^^^ this also implies that name encountered 5 errors and 7 warnings diff --git a/experimental/ir/testdata/fields/groups/ok.proto b/experimental/ir/testdata/fields/groups/ok.proto index 01382888a..61212e6b3 100644 --- a/experimental/ir/testdata/fields/groups/ok.proto +++ b/experimental/ir/testdata/fields/groups/ok.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% source_code_info: true //% exclude: ["required fields", "group suntax"] diff --git a/experimental/ir/testdata/fields/groups/ok.proto.sci.yaml b/experimental/ir/testdata/fields/groups/ok.proto.sci.yaml index 80cd33319..2dcb73dfe 100644 --- a/experimental/ir/testdata/fields/groups/ok.proto.sci.yaml +++ b/experimental/ir/testdata/fields/groups/ok.proto.sci.yaml @@ -1,136 +1,135 @@ "testdata/fields/groups/ok.proto": -- { path: "", start: { line: 17, column: 0 }, end: { line: 33, column: 1 } } +- { path: "", start: { line: 3, column: 0 }, end: { line: 19, column: 1 } } - path: ".syntax" - start: { line: 17, column: 0 } - end: { line: 17, column: 18 } + start: { line: 3, column: 0 } + end: { line: 3, column: 18 } leading: "% descriptor: true\n% source_code_info: true\n% exclude: [\"required fields\", \"group suntax\"]\n" - detached: {} - path: ".package" - start: { line: 19, column: 0 } - end: { line: 19, column: 13 } + start: { line: 5, column: 0 } + end: { line: 5, column: 13 } - path: ".message_type[Foo]" - start: { line: 21, column: 0 } - end: { line: 33, column: 1 } + start: { line: 7, column: 0 } + end: { line: 19, column: 1 } - path: ".message_type[Foo].name" - start: { line: 21, column: 8 } - end: { line: 21, column: 11 } + start: { line: 7, column: 8 } + end: { line: 7, column: 11 } - path: ".message_type[Foo].field[foobar].label" - start: { line: 22, column: 4 } - end: { line: 22, column: 12 } + start: { line: 8, column: 4 } + end: { line: 8, column: 12 } - path: ".message_type[Foo].field[foobar]" - start: { line: 22, column: 4 } - end: { line: 29, column: 5 } + start: { line: 8, column: 4 } + end: { line: 15, column: 5 } - path: ".message_type[Foo].nested_type[FooBar]" - start: { line: 22, column: 4 } - end: { line: 29, column: 5 } + start: { line: 8, column: 4 } + end: { line: 15, column: 5 } - path: ".message_type[Foo].field[foobar].type_name" - start: { line: 22, column: 13 } - end: { line: 22, column: 18 } + start: { line: 8, column: 13 } + end: { line: 8, column: 18 } - path: ".message_type[Foo].field[foobar].name" - start: { line: 22, column: 19 } - end: { line: 22, column: 25 } + start: { line: 8, column: 19 } + end: { line: 8, column: 25 } - path: ".message_type[Foo].nested_type[FooBar].name" - start: { line: 22, column: 19 } - end: { line: 22, column: 25 } + start: { line: 8, column: 19 } + end: { line: 8, column: 25 } - path: ".message_type[Foo].field[foobar].number" - start: { line: 22, column: 28 } - end: { line: 22, column: 29 } + start: { line: 8, column: 28 } + end: { line: 8, column: 29 } - path: ".message_type[Foo].nested_type[FooBar].options" - start: { line: 23, column: 8 } - end: { line: 23, column: 33 } + start: { line: 9, column: 8 } + end: { line: 9, column: 33 } - path: ".message_type[Foo].nested_type[FooBar].options.deprecated" - start: { line: 23, column: 8 } - end: { line: 23, column: 33 } + start: { line: 9, column: 8 } + end: { line: 9, column: 33 } - path: ".message_type[Foo].nested_type[FooBar].field[x].label" - start: { line: 25, column: 8 } - end: { line: 25, column: 16 } + start: { line: 11, column: 8 } + end: { line: 11, column: 16 } - path: ".message_type[Foo].nested_type[FooBar].field[x]" - start: { line: 25, column: 8 } - end: { line: 25, column: 29 } + start: { line: 11, column: 8 } + end: { line: 11, column: 29 } - path: ".message_type[Foo].nested_type[FooBar].field[x].type" - start: { line: 25, column: 17 } - end: { line: 25, column: 22 } + start: { line: 11, column: 17 } + end: { line: 11, column: 22 } - path: ".message_type[Foo].nested_type[FooBar].field[x].name" - start: { line: 25, column: 23 } - end: { line: 25, column: 24 } + start: { line: 11, column: 23 } + end: { line: 11, column: 24 } - path: ".message_type[Foo].nested_type[FooBar].field[x].number" - start: { line: 25, column: 27 } - end: { line: 25, column: 28 } -- path: ".message_type[Foo].nested_type[FooBar].field[x_y_z].label" - start: { line: 26, column: 8 } - end: { line: 26, column: 16 } + start: { line: 11, column: 27 } + end: { line: 11, column: 28 } - path: ".message_type[Foo].nested_type[FooBar].field[x_y_z]" - start: { line: 26, column: 8 } - end: { line: 28, column: 9 } + start: { line: 12, column: 8 } + end: { line: 14, column: 9 } - path: ".message_type[Foo].nested_type[FooBar].nested_type[X_Y_Z]" - start: { line: 26, column: 8 } - end: { line: 28, column: 9 } + start: { line: 12, column: 8 } + end: { line: 14, column: 9 } +- path: ".message_type[Foo].nested_type[FooBar].field[x_y_z].label" + start: { line: 12, column: 8 } + end: { line: 12, column: 16 } - path: ".message_type[Foo].nested_type[FooBar].field[x_y_z].type_name" - start: { line: 26, column: 17 } - end: { line: 26, column: 22 } + start: { line: 12, column: 17 } + end: { line: 12, column: 22 } - path: ".message_type[Foo].nested_type[FooBar].field[x_y_z].name" - start: { line: 26, column: 23 } - end: { line: 26, column: 28 } + start: { line: 12, column: 23 } + end: { line: 12, column: 28 } - path: ".message_type[Foo].nested_type[FooBar].nested_type[X_Y_Z].name" - start: { line: 26, column: 23 } - end: { line: 26, column: 28 } + start: { line: 12, column: 23 } + end: { line: 12, column: 28 } - path: ".message_type[Foo].nested_type[FooBar].field[x_y_z].number" - start: { line: 26, column: 31 } - end: { line: 26, column: 32 } + start: { line: 12, column: 31 } + end: { line: 12, column: 32 } - path: ".message_type[Foo].nested_type[FooBar].field[x_y_z].options" - start: { line: 26, column: 33 } - end: { line: 26, column: 52 } + start: { line: 12, column: 33 } + end: { line: 12, column: 52 } - path: ".message_type[Foo].nested_type[FooBar].field[x_y_z].options.deprecated" - start: { line: 26, column: 34 } - end: { line: 26, column: 51 } + start: { line: 12, column: 34 } + end: { line: 12, column: 51 } - path: ".message_type[Foo].nested_type[FooBar].nested_type[X_Y_Z].field[baz].label" - start: { line: 27, column: 12 } - end: { line: 27, column: 20 } + start: { line: 13, column: 12 } + end: { line: 13, column: 20 } - path: ".message_type[Foo].nested_type[FooBar].nested_type[X_Y_Z].field[baz]" - start: { line: 27, column: 12 } - end: { line: 27, column: 37 } + start: { line: 13, column: 12 } + end: { line: 13, column: 37 } - path: ".message_type[Foo].nested_type[FooBar].nested_type[X_Y_Z].nested_type[Baz]" - start: { line: 27, column: 12 } - end: { line: 27, column: 37 } + start: { line: 13, column: 12 } + end: { line: 13, column: 37 } - path: ".message_type[Foo].nested_type[FooBar].nested_type[X_Y_Z].field[baz].type_name" - start: { line: 27, column: 21 } - end: { line: 27, column: 26 } + start: { line: 13, column: 21 } + end: { line: 13, column: 26 } - path: ".message_type[Foo].nested_type[FooBar].nested_type[X_Y_Z].field[baz].name" - start: { line: 27, column: 27 } - end: { line: 27, column: 30 } + start: { line: 13, column: 27 } + end: { line: 13, column: 30 } - path: ".message_type[Foo].nested_type[FooBar].nested_type[X_Y_Z].nested_type[Baz].name" - start: { line: 27, column: 27 } - end: { line: 27, column: 30 } + start: { line: 13, column: 27 } + end: { line: 13, column: 30 } - path: ".message_type[Foo].nested_type[FooBar].nested_type[X_Y_Z].field[baz].number" - start: { line: 27, column: 33 } - end: { line: 27, column: 34 } + start: { line: 13, column: 33 } + end: { line: 13, column: 34 } - path: ".message_type[Foo].field[x].label" - start: { line: 31, column: 4 } - end: { line: 31, column: 12 } + start: { line: 17, column: 4 } + end: { line: 17, column: 12 } - path: ".message_type[Foo].field[x]" - start: { line: 31, column: 4 } - end: { line: 31, column: 26 } + start: { line: 17, column: 4 } + end: { line: 17, column: 26 } - path: ".message_type[Foo].field[x].type_name" - start: { line: 31, column: 13 } - end: { line: 31, column: 19 } + start: { line: 17, column: 13 } + end: { line: 17, column: 19 } - path: ".message_type[Foo].field[x].name" - start: { line: 31, column: 20 } - end: { line: 31, column: 21 } + start: { line: 17, column: 20 } + end: { line: 17, column: 21 } - path: ".message_type[Foo].field[x].number" - start: { line: 31, column: 24 } - end: { line: 31, column: 25 } + start: { line: 17, column: 24 } + end: { line: 17, column: 25 } - path: ".message_type[Foo].field[y].label" - start: { line: 32, column: 4 } - end: { line: 32, column: 12 } + start: { line: 18, column: 4 } + end: { line: 18, column: 12 } - path: ".message_type[Foo].field[y]" - start: { line: 32, column: 4 } - end: { line: 32, column: 32 } + start: { line: 18, column: 4 } + end: { line: 18, column: 32 } - path: ".message_type[Foo].field[y].type_name" - start: { line: 32, column: 13 } - end: { line: 32, column: 25 } + start: { line: 18, column: 13 } + end: { line: 18, column: 25 } - path: ".message_type[Foo].field[y].name" - start: { line: 32, column: 26 } - end: { line: 32, column: 27 } + start: { line: 18, column: 26 } + end: { line: 18, column: 27 } - path: ".message_type[Foo].field[y].number" - start: { line: 32, column: 30 } - end: { line: 32, column: 31 } + start: { line: 18, column: 30 } + end: { line: 18, column: 31 } diff --git a/experimental/ir/testdata/fields/groups/ok.proto.stderr.txt b/experimental/ir/testdata/fields/groups/ok.proto.stderr.txt index db4ee2125..6b4d365c3 100644 --- a/experimental/ir/testdata/fields/groups/ok.proto.stderr.txt +++ b/experimental/ir/testdata/fields/groups/ok.proto.stderr.txt @@ -1,21 +1,21 @@ warning: group syntax is deprecated - --> testdata/fields/groups/ok.proto:23:14 + --> testdata/fields/groups/ok.proto:9:14 | -23 | optional group FooBar = 1 { + 9 | optional group FooBar = 1 { | ^^^^^ = note: group syntax is not available in proto3 or editions warning: group syntax is deprecated - --> testdata/fields/groups/ok.proto:27:18 + --> testdata/fields/groups/ok.proto:13:18 | -27 | repeated group X_Y_Z = 2 [deprecated = true] { +13 | repeated group X_Y_Z = 2 [deprecated = true] { | ^^^^^ = note: group syntax is not available in proto3 or editions warning: group syntax is deprecated - --> testdata/fields/groups/ok.proto:28:22 + --> testdata/fields/groups/ok.proto:14:22 | -28 | required group Baz = 3 {} +14 | required group Baz = 3 {} | ^^^^^ = note: group syntax is not available in proto3 or editions diff --git a/experimental/ir/testdata/fields/import_private.proto.yaml b/experimental/ir/testdata/fields/import_private.proto.yaml index b3740ae1c..e98fa78d2 100644 --- a/experimental/ir/testdata/fields/import_private.proto.yaml +++ b/experimental/ir/testdata/fields/import_private.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - exclude: "unused import" files: - path: "a.proto" diff --git a/experimental/ir/testdata/fields/invalid_partial.proto b/experimental/ir/testdata/fields/invalid_partial.proto index 86fffdf99..ae6059af8 100644 --- a/experimental/ir/testdata/fields/invalid_partial.proto +++ b/experimental/ir/testdata/fields/invalid_partial.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto3"; diff --git a/experimental/ir/testdata/fields/invalid_partial.proto.stderr.txt b/experimental/ir/testdata/fields/invalid_partial.proto.stderr.txt index 5f88b9e4d..4113ae45a 100644 --- a/experimental/ir/testdata/fields/invalid_partial.proto.stderr.txt +++ b/experimental/ir/testdata/fields/invalid_partial.proto.stderr.txt @@ -1,10 +1,10 @@ error: cannot find `M.N` in this scope - --> testdata/fields/invalid_partial.proto:23:9 + --> testdata/fields/invalid_partial.proto:9:9 | -21 | message N {} + 7 | message N {} | - found possibly related symbol `test.M.N` -22 | message M { -23 | M.N n = 1; + 8 | message M { + 9 | M.N n = 1; | ^^^ not found in this scope | = note: Protobuf's name lookup rules expected a symbol `test.M.M.N`, rather diff --git a/experimental/ir/testdata/fields/maps/collision.proto b/experimental/ir/testdata/fields/maps/collision.proto index 1fc1b8d94..70412639a 100644 --- a/experimental/ir/testdata/fields/maps/collision.proto +++ b/experimental/ir/testdata/fields/maps/collision.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto3"; diff --git a/experimental/ir/testdata/fields/maps/collision.proto.stderr.txt b/experimental/ir/testdata/fields/maps/collision.proto.stderr.txt index 7238cec93..6a3b2e87a 100644 --- a/experimental/ir/testdata/fields/maps/collision.proto.stderr.txt +++ b/experimental/ir/testdata/fields/maps/collision.proto.stderr.txt @@ -1,36 +1,36 @@ error: `FooBarEntry` declared multiple times - --> testdata/fields/maps/collision.proto:21:5 + --> testdata/fields/maps/collision.proto:7:5 | -21 | map foo_bar = 1; + 7 | map foo_bar = 1; | ^^^^^^^^^^^^^^^^^ ------- implies `repeated FooBarEntry` | | | first here, as a message type -22 | -23 | message FooBarEntry {} + 8 | + 9 | message FooBarEntry {} | ----------- ...also declared here | = help: map-typed fields implicitly declare a nested message type: field `foo_bar` produces a map entry type `FooBarEntry` error: `Entry` declared multiple times - --> testdata/fields/maps/collision.proto:27:5 + --> testdata/fields/maps/collision.proto:13:5 | -27 | map _ = 1; +13 | map _ = 1; | ^^^^^^^^^^^^^^^^^ - implies `repeated Entry` | | | first here, as a message type -28 | map __ = 2; +14 | map __ = 2; | ----------------- ...also declared here | = help: map-typed fields implicitly declare a nested message type: field `_` produces a map entry type `Entry` error: message fields have the same JSON name - --> testdata/fields/maps/collision.proto:28:23 + --> testdata/fields/maps/collision.proto:14:23 | -27 | map _ = 1; +13 | map _ = 1; | - this implies JSON name `` -28 | map __ = 2; +14 | map __ = 2; | ^^ this also implies that name encountered 3 errors diff --git a/experimental/ir/testdata/fields/maps/entry_misuse.proto b/experimental/ir/testdata/fields/maps/entry_misuse.proto index 7682b043e..2cf4aa364 100644 --- a/experimental/ir/testdata/fields/maps/entry_misuse.proto +++ b/experimental/ir/testdata/fields/maps/entry_misuse.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/ir/testdata/fields/maps/entry_misuse.proto.stderr.txt b/experimental/ir/testdata/fields/maps/entry_misuse.proto.stderr.txt index cdebdaa39..ddc31a638 100644 --- a/experimental/ir/testdata/fields/maps/entry_misuse.proto.stderr.txt +++ b/experimental/ir/testdata/fields/maps/entry_misuse.proto.stderr.txt @@ -1,9 +1,9 @@ error: use of synthetic map entry type - --> testdata/fields/maps/entry_misuse.proto:21:14 + --> testdata/fields/maps/entry_misuse.proto:7:14 | -20 | map foo_bar = 1; + 6 | map foo_bar = 1; | ----------------- synthesized by this type -21 | repeated FooBarEntry foo_bars = 2; + 7 | repeated FooBarEntry foo_bars = 2; | ^^^^^^^^^^^ referenced here | = help: despite having a user-visible symbol, map entry types cannot be used diff --git a/experimental/ir/testdata/fields/maps/extension.proto b/experimental/ir/testdata/fields/maps/extension.proto index c52565014..bebc3ac9d 100644 --- a/experimental/ir/testdata/fields/maps/extension.proto +++ b/experimental/ir/testdata/fields/maps/extension.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/ir/testdata/fields/maps/extension.proto.stderr.txt b/experimental/ir/testdata/fields/maps/extension.proto.stderr.txt index ec08e4557..8c58759c9 100644 --- a/experimental/ir/testdata/fields/maps/extension.proto.stderr.txt +++ b/experimental/ir/testdata/fields/maps/extension.proto.stderr.txt @@ -1,7 +1,7 @@ error: unsupported map-typed extension - --> testdata/fields/maps/extension.proto:24:5 + --> testdata/fields/maps/extension.proto:10:5 | -24 | map m = 1; +10 | map m = 1; | ^^^^^^^^^^^^^^^^^ declared here | = help: extensions cannot be map-typed; instead, define a message type with a diff --git a/experimental/ir/testdata/fields/maps/features.proto b/experimental/ir/testdata/fields/maps/features.proto index f992e7267..7c84302ae 100644 --- a/experimental/ir/testdata/fields/maps/features.proto +++ b/experimental/ir/testdata/fields/maps/features.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true edition = "2023"; diff --git a/experimental/ir/testdata/fields/maps/invalid_key.proto b/experimental/ir/testdata/fields/maps/invalid_key.proto index d475d3160..73b841615 100644 --- a/experimental/ir/testdata/fields/maps/invalid_key.proto +++ b/experimental/ir/testdata/fields/maps/invalid_key.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto3"; diff --git a/experimental/ir/testdata/fields/maps/invalid_key.proto.stderr.txt b/experimental/ir/testdata/fields/maps/invalid_key.proto.stderr.txt index 66a6ed1b6..1073ec2a7 100644 --- a/experimental/ir/testdata/fields/maps/invalid_key.proto.stderr.txt +++ b/experimental/ir/testdata/fields/maps/invalid_key.proto.stderr.txt @@ -1,35 +1,35 @@ error: expected map key type, found scalar type `float` - --> testdata/fields/maps/invalid_key.proto:21:9 + --> testdata/fields/maps/invalid_key.proto:7:9 | -21 | map m1 = 1; + 7 | map m1 = 1; | ^^^^^ = help: valid map key types are integer types, `string`, and `bool` error: expected map key type, found scalar type `double` - --> testdata/fields/maps/invalid_key.proto:22:9 + --> testdata/fields/maps/invalid_key.proto:8:9 | -22 | map m2 = 2; + 8 | map m2 = 2; | ^^^^^^ = help: valid map key types are integer types, `string`, and `bool` error: expected map key type, found scalar type `bytes` - --> testdata/fields/maps/invalid_key.proto:23:9 + --> testdata/fields/maps/invalid_key.proto:9:9 | -23 | map m3 = 3; + 9 | map m3 = 3; | ^^^^^ = help: valid map key types are integer types, `string`, and `bool` error: expected map key type, found message type `test.Foo` - --> testdata/fields/maps/invalid_key.proto:24:9 + --> testdata/fields/maps/invalid_key.proto:10:9 | -24 | map m4 = 4; +10 | map m4 = 4; | ^^^ = help: valid map key types are integer types, `string`, and `bool` error: expected map key type, found enum type `test.Enum` - --> testdata/fields/maps/invalid_key.proto:25:9 + --> testdata/fields/maps/invalid_key.proto:11:9 | -25 | map m5 = 5; +11 | map m5 = 5; | ^^^^ = help: valid map key types are integer types, `string`, and `bool` = help: counterintuitively, user-defined enum types cannot be used as keys diff --git a/experimental/ir/testdata/fields/maps/map_entry.proto b/experimental/ir/testdata/fields/maps/map_entry.proto index a2ef80a43..981ce1ed5 100644 --- a/experimental/ir/testdata/fields/maps/map_entry.proto +++ b/experimental/ir/testdata/fields/maps/map_entry.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/ir/testdata/fields/maps/map_entry.proto.stderr.txt b/experimental/ir/testdata/fields/maps/map_entry.proto.stderr.txt index 1f0c437f7..b6844a1a7 100644 --- a/experimental/ir/testdata/fields/maps/map_entry.proto.stderr.txt +++ b/experimental/ir/testdata/fields/maps/map_entry.proto.stderr.txt @@ -1,7 +1,7 @@ error: `map_entry` cannot be set explicitly - --> testdata/fields/maps/map_entry.proto:27:12 + --> testdata/fields/maps/map_entry.proto:13:12 | -27 | option map_entry = true; +13 | option map_entry = true; | ^^^^^^^^^ = help: `map_entry` is set automatically for synthetic map entry types, and cannot be set with an option setting diff --git a/experimental/ir/testdata/fields/maps/map_option.proto b/experimental/ir/testdata/fields/maps/map_option.proto index 459f72d00..bb77ce748 100644 --- a/experimental/ir/testdata/fields/maps/map_option.proto +++ b/experimental/ir/testdata/fields/maps/map_option.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/ir/testdata/fields/maps/map_option.proto.stderr.txt b/experimental/ir/testdata/fields/maps/map_option.proto.stderr.txt index ef3365803..a29395eca 100644 --- a/experimental/ir/testdata/fields/maps/map_option.proto.stderr.txt +++ b/experimental/ir/testdata/fields/maps/map_option.proto.stderr.txt @@ -1,10 +1,10 @@ error: cannot resolve message field name for `test.Foo.MapEntry` - --> testdata/fields/maps/map_option.proto:34:17 + --> testdata/fields/maps/map_option.proto:20:17 | -34 | "my_key": {}, +20 | "my_key": {}, | ^^^^^^^^^^^^ field referenced here ... -39 | map map = 1; +25 | map map = 1; | ---------------- expected `MapEntry` field due to this | = help: the text format lacks syntax for map-typed fields; instead, the diff --git a/experimental/ir/testdata/fields/maps/ok.proto b/experimental/ir/testdata/fields/maps/ok.proto index 27c5b244f..7279c0ccb 100644 --- a/experimental/ir/testdata/fields/maps/ok.proto +++ b/experimental/ir/testdata/fields/maps/ok.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% source_code_info: true syntax = "proto3"; diff --git a/experimental/ir/testdata/fields/maps/ok.proto.sci.yaml b/experimental/ir/testdata/fields/maps/ok.proto.sci.yaml index 440ea4fb2..35099df27 100644 --- a/experimental/ir/testdata/fields/maps/ok.proto.sci.yaml +++ b/experimental/ir/testdata/fields/maps/ok.proto.sci.yaml @@ -1,64 +1,63 @@ "testdata/fields/maps/ok.proto": -- { path: "", start: { line: 16, column: 0 }, end: { line: 26, column: 1 } } +- { path: "", start: { line: 2, column: 0 }, end: { line: 12, column: 1 } } - path: ".syntax" - start: { line: 16, column: 0 } - end: { line: 16, column: 18 } + start: { line: 2, column: 0 } + end: { line: 2, column: 18 } leading: "% descriptor: true\n% source_code_info: true\n" - detached: {} - path: ".package" - start: { line: 18, column: 0 } - end: { line: 18, column: 13 } + start: { line: 4, column: 0 } + end: { line: 4, column: 13 } - path: ".message_type[Foo]" - start: { line: 20, column: 0 } - end: { line: 26, column: 1 } + start: { line: 6, column: 0 } + end: { line: 12, column: 1 } - path: ".message_type[Foo].name" - start: { line: 20, column: 8 } - end: { line: 20, column: 11 } + start: { line: 6, column: 8 } + end: { line: 6, column: 11 } - path: ".message_type[Foo].field[foo].type_name" - start: { line: 21, column: 4 } - end: { line: 21, column: 21 } + start: { line: 7, column: 4 } + end: { line: 7, column: 21 } - path: ".message_type[Foo].field[foo]" - start: { line: 21, column: 4 } - end: { line: 21, column: 30 } + start: { line: 7, column: 4 } + end: { line: 7, column: 30 } - path: ".message_type[Foo].field[foo].name" - start: { line: 21, column: 22 } - end: { line: 21, column: 25 } + start: { line: 7, column: 22 } + end: { line: 7, column: 25 } - path: ".message_type[Foo].field[foo].number" - start: { line: 21, column: 28 } - end: { line: 21, column: 29 } + start: { line: 7, column: 28 } + end: { line: 7, column: 29 } - path: ".message_type[Foo].field[bar].type_name" - start: { line: 22, column: 4 } - end: { line: 22, column: 20 } + start: { line: 8, column: 4 } + end: { line: 8, column: 20 } - path: ".message_type[Foo].field[bar]" - start: { line: 22, column: 4 } - end: { line: 22, column: 29 } + start: { line: 8, column: 4 } + end: { line: 8, column: 29 } - path: ".message_type[Foo].field[bar].name" - start: { line: 22, column: 21 } - end: { line: 22, column: 24 } + start: { line: 8, column: 21 } + end: { line: 8, column: 24 } - path: ".message_type[Foo].field[bar].number" - start: { line: 22, column: 27 } - end: { line: 22, column: 28 } + start: { line: 8, column: 27 } + end: { line: 8, column: 28 } - path: ".message_type[Foo].field[__foo2__].type_name" - start: { line: 24, column: 4 } - end: { line: 24, column: 21 } + start: { line: 10, column: 4 } + end: { line: 10, column: 21 } - path: ".message_type[Foo].field[__foo2__]" - start: { line: 24, column: 4 } - end: { line: 24, column: 35 } + start: { line: 10, column: 4 } + end: { line: 10, column: 35 } - path: ".message_type[Foo].field[__foo2__].name" - start: { line: 24, column: 22 } - end: { line: 24, column: 30 } + start: { line: 10, column: 22 } + end: { line: 10, column: 30 } - path: ".message_type[Foo].field[__foo2__].number" - start: { line: 24, column: 33 } - end: { line: 24, column: 34 } + start: { line: 10, column: 33 } + end: { line: 10, column: 34 } - path: ".message_type[Foo].field[__foo_3__].type_name" - start: { line: 25, column: 4 } - end: { line: 25, column: 21 } + start: { line: 11, column: 4 } + end: { line: 11, column: 21 } - path: ".message_type[Foo].field[__foo_3__]" - start: { line: 25, column: 4 } - end: { line: 25, column: 36 } + start: { line: 11, column: 4 } + end: { line: 11, column: 36 } - path: ".message_type[Foo].field[__foo_3__].name" - start: { line: 25, column: 22 } - end: { line: 25, column: 31 } + start: { line: 11, column: 22 } + end: { line: 11, column: 31 } - path: ".message_type[Foo].field[__foo_3__].number" - start: { line: 25, column: 34 } - end: { line: 25, column: 35 } + start: { line: 11, column: 34 } + end: { line: 11, column: 35 } diff --git a/experimental/ir/testdata/fields/maps/ordering.proto b/experimental/ir/testdata/fields/maps/ordering.proto index f8cf1bef7..4e9ef343d 100644 --- a/experimental/ir/testdata/fields/maps/ordering.proto +++ b/experimental/ir/testdata/fields/maps/ordering.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - // Exercises the ordering of synthetic map entry types relative to // concrete nested message/enum declarations. Synthetic map entries must // appear at their originating map field's source position to match protoc. diff --git a/experimental/ir/testdata/fields/ok.proto b/experimental/ir/testdata/fields/ok.proto index 99782bc32..4d0a8507c 100644 --- a/experimental/ir/testdata/fields/ok.proto +++ b/experimental/ir/testdata/fields/ok.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto3"; diff --git a/experimental/ir/testdata/fields/reserved.proto b/experimental/ir/testdata/fields/reserved.proto index fdcdd3201..b508cd649 100644 --- a/experimental/ir/testdata/fields/reserved.proto +++ b/experimental/ir/testdata/fields/reserved.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% exclude: ["enum type must define at least one value"] syntax = "proto2"; diff --git a/experimental/ir/testdata/fields/reserved.proto.stderr.txt b/experimental/ir/testdata/fields/reserved.proto.stderr.txt index 3f9e4bae7..04d69f547 100644 --- a/experimental/ir/testdata/fields/reserved.proto.stderr.txt +++ b/experimental/ir/testdata/fields/reserved.proto.stderr.txt @@ -1,45 +1,45 @@ error: message field name `foo` reserved more than once - --> testdata/fields/reserved.proto:21:21 + --> testdata/fields/reserved.proto:7:21 | -21 | reserved "valid", "foo", "foo", "bar"; + 7 | reserved "valid", "foo", "foo", "bar"; | ^^^^^ ----- `foo` also reserved here error: message field name `bar` reserved more than once - --> testdata/fields/reserved.proto:21:35 + --> testdata/fields/reserved.proto:7:35 | -21 | reserved "valid", "foo", "foo", "bar"; + 7 | reserved "valid", "foo", "foo", "bar"; | ^^^^^ -22 | reserved "bar"; + 8 | reserved "bar"; | ----- `bar` also reserved here error: message field name `baz` reserved more than once - --> testdata/fields/reserved.proto:23:12 + --> testdata/fields/reserved.proto:9:12 | -23 | reserved "baz", "baz"; + 9 | reserved "baz", "baz"; | ^^^^^ ----- `baz` also reserved here -24 | reserved "baz"; +10 | reserved "baz"; | ----- `baz` also reserved here error: enum value `foo` reserved more than once - --> testdata/fields/reserved.proto:28:21 + --> testdata/fields/reserved.proto:14:21 | -28 | reserved "valid", "foo", "foo", "bar"; +14 | reserved "valid", "foo", "foo", "bar"; | ^^^^^ ----- `foo` also reserved here error: enum value `bar` reserved more than once - --> testdata/fields/reserved.proto:28:35 + --> testdata/fields/reserved.proto:14:35 | -28 | reserved "valid", "foo", "foo", "bar"; +14 | reserved "valid", "foo", "foo", "bar"; | ^^^^^ -29 | reserved "bar"; +15 | reserved "bar"; | ----- `bar` also reserved here error: enum value `baz` reserved more than once - --> testdata/fields/reserved.proto:30:12 + --> testdata/fields/reserved.proto:16:12 | -30 | reserved "baz", "also_valid", "baz"; +16 | reserved "baz", "also_valid", "baz"; | ^^^^^ ----- `baz` also reserved here -31 | reserved "baz"; +17 | reserved "baz"; | ----- `baz` also reserved here encountered 6 errors diff --git a/experimental/ir/testdata/fields/skip_private.proto.yaml b/experimental/ir/testdata/fields/skip_private.proto.yaml index f1e1e3e8e..d8149cf54 100644 --- a/experimental/ir/testdata/fields/skip_private.proto.yaml +++ b/experimental/ir/testdata/fields/skip_private.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - descriptor: true exclude: "unused import" files: diff --git a/experimental/ir/testdata/fields/skip_wrong_kind.proto b/experimental/ir/testdata/fields/skip_wrong_kind.proto index 1025326e2..c00680a49 100644 --- a/experimental/ir/testdata/fields/skip_wrong_kind.proto +++ b/experimental/ir/testdata/fields/skip_wrong_kind.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto3"; diff --git a/experimental/ir/testdata/fields/wrong_kind.proto b/experimental/ir/testdata/fields/wrong_kind.proto index fcd9a1424..e7a4bf406 100644 --- a/experimental/ir/testdata/fields/wrong_kind.proto +++ b/experimental/ir/testdata/fields/wrong_kind.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/ir/testdata/fields/wrong_kind.proto.stderr.txt b/experimental/ir/testdata/fields/wrong_kind.proto.stderr.txt index b1ed15028..142605103 100644 --- a/experimental/ir/testdata/fields/wrong_kind.proto.stderr.txt +++ b/experimental/ir/testdata/fields/wrong_kind.proto.stderr.txt @@ -1,37 +1,37 @@ error: expected type, found message field `test.Foo.x` - --> testdata/fields/wrong_kind.proto:22:5 + --> testdata/fields/wrong_kind.proto:8:5 | -22 | x x = 1; + 8 | x x = 1; | ^ - defined here | | | expected type error: expected type, found enum value `test.Foo.BAZ` - --> testdata/fields/wrong_kind.proto:23:5 + --> testdata/fields/wrong_kind.proto:9:5 | -20 | enum Bar { BAZ = 0; } + 6 | enum Bar { BAZ = 0; } | --- defined here -21 | -22 | x x = 1; -23 | BAZ y = 2; + 7 | + 8 | x x = 1; + 9 | BAZ y = 2; | ^^^ expected type error: expected type, found `package` declaration `test` - --> testdata/fields/wrong_kind.proto:24:5 + --> testdata/fields/wrong_kind.proto:10:5 | -17 | package test; + 3 | package test; | ------------- defined here ... -23 | BAZ y = 2; -24 | test z = 3; + 9 | BAZ y = 2; +10 | test z = 3; | ^^^^ expected type error: expected type, found oneof definition `test.Foo.self` - --> testdata/fields/wrong_kind.proto:27:9 + --> testdata/fields/wrong_kind.proto:13:9 | -26 | oneof self { +12 | oneof self { | ---- defined here -27 | self a = 4; +13 | self a = 4; | ^^^^ expected type encountered 4 errors diff --git a/experimental/ir/testdata/imports/canonical.proto.yaml b/experimental/ir/testdata/imports/canonical.proto.yaml index 3deb01f79..c17efe3b0 100644 --- a/experimental/ir/testdata/imports/canonical.proto.yaml +++ b/experimental/ir/testdata/imports/canonical.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - exclude: "unused import" files: - path: "main.proto" diff --git a/experimental/ir/testdata/imports/cycle.proto.yaml b/experimental/ir/testdata/imports/cycle.proto.yaml index 1759d06e5..112ae4678 100644 --- a/experimental/ir/testdata/imports/cycle.proto.yaml +++ b/experimental/ir/testdata/imports/cycle.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - exclude: "unused import" files: - path: "a.proto" diff --git a/experimental/ir/testdata/imports/cycle_dependency.proto.yaml b/experimental/ir/testdata/imports/cycle_dependency.proto.yaml index 5104482ab..688a4696e 100644 --- a/experimental/ir/testdata/imports/cycle_dependency.proto.yaml +++ b/experimental/ir/testdata/imports/cycle_dependency.proto.yaml @@ -1,16 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. exclude: "unused import" files: - path: "foo/v1/foo.proto" diff --git a/experimental/ir/testdata/imports/cycle_long.proto.yaml b/experimental/ir/testdata/imports/cycle_long.proto.yaml index b80ed188a..c0fa5d5f1 100644 --- a/experimental/ir/testdata/imports/cycle_long.proto.yaml +++ b/experimental/ir/testdata/imports/cycle_long.proto.yaml @@ -1,16 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. exclude: "unused import" files: - path: "a1.proto" diff --git a/experimental/ir/testdata/imports/invalid.proto b/experimental/ir/testdata/imports/invalid.proto index 699009326..ba73c7d7a 100644 --- a/experimental/ir/testdata/imports/invalid.proto +++ b/experimental/ir/testdata/imports/invalid.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package buf.test; diff --git a/experimental/ir/testdata/imports/invalid.proto.stderr.txt b/experimental/ir/testdata/imports/invalid.proto.stderr.txt index 4bfbdfb07..5a184b0f2 100644 --- a/experimental/ir/testdata/imports/invalid.proto.stderr.txt +++ b/experimental/ir/testdata/imports/invalid.proto.stderr.txt @@ -1,19 +1,19 @@ error: import path cannot be empty - --> testdata/imports/invalid.proto:19:8 + --> testdata/imports/invalid.proto:5:8 | -19 | import ""; + 5 | import ""; | ^^ error: import path must be relative - --> testdata/imports/invalid.proto:20:8 + --> testdata/imports/invalid.proto:6:8 | -20 | import "/root.proto"; + 6 | import "/root.proto"; | ^^^^^^^^^^^^^ this path begins with a `/` error: imported file does not exist - --> testdata/imports/invalid.proto:21:1 + --> testdata/imports/invalid.proto:7:1 | -21 | import "does_not_exist.proto"; + 7 | import "does_not_exist.proto"; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ imported here encountered 3 errors diff --git a/experimental/ir/testdata/imports/ok.proto.yaml b/experimental/ir/testdata/imports/ok.proto.yaml index 9d38081bf..359ea735f 100644 --- a/experimental/ir/testdata/imports/ok.proto.yaml +++ b/experimental/ir/testdata/imports/ok.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - descriptor: true exclude: "unused import" files: diff --git a/experimental/ir/testdata/imports/option.proto.yaml b/experimental/ir/testdata/imports/option.proto.yaml index 0ca80187a..26fa3068c 100644 --- a/experimental/ir/testdata/imports/option.proto.yaml +++ b/experimental/ir/testdata/imports/option.proto.yaml @@ -1,18 +1,3 @@ - -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - descriptor: true symtab: true exclude: ["declared multiple times", "unused import"] diff --git a/experimental/ir/testdata/imports/partial.proto.yaml b/experimental/ir/testdata/imports/partial.proto.yaml index fe9868f16..6a92460e2 100644 --- a/experimental/ir/testdata/imports/partial.proto.yaml +++ b/experimental/ir/testdata/imports/partial.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # Tests that multi-component relative name resolution works when the first # component resolves to an intermediate package prefix, not a full package name. # diff --git a/experimental/ir/testdata/imports/unused.proto.yaml b/experimental/ir/testdata/imports/unused.proto.yaml index f398d0e23..35d3aa28d 100644 --- a/experimental/ir/testdata/imports/unused.proto.yaml +++ b/experimental/ir/testdata/imports/unused.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - descriptor: true source_code_info: true files: diff --git a/experimental/ir/testdata/imports/windows.proto.yaml b/experimental/ir/testdata/imports/windows.proto.yaml index ac7d66f0a..d1ceae809 100644 --- a/experimental/ir/testdata/imports/windows.proto.yaml +++ b/experimental/ir/testdata/imports/windows.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - exclude: "unused import" files: - path: "main.proto" diff --git a/experimental/ir/testdata/missing_wkts.proto.yaml b/experimental/ir/testdata/missing_wkts.proto.yaml index b6ea7b3fc..080cdb1d9 100644 --- a/experimental/ir/testdata/missing_wkts.proto.yaml +++ b/experimental/ir/testdata/missing_wkts.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - exclude_wkt_sources: true files: - path: "a.proto" diff --git a/experimental/ir/testdata/options/builtin.proto b/experimental/ir/testdata/options/builtin.proto index 3fc35aff4..2c384ff91 100644 --- a/experimental/ir/testdata/options/builtin.proto +++ b/experimental/ir/testdata/options/builtin.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/builtin.proto.stderr.txt b/experimental/ir/testdata/options/builtin.proto.stderr.txt index 6f82615b4..33fe1f781 100644 --- a/experimental/ir/testdata/options/builtin.proto.stderr.txt +++ b/experimental/ir/testdata/options/builtin.proto.stderr.txt @@ -1,9 +1,9 @@ error: option `deprecated` set multiple times - --> testdata/options/builtin.proto:25:12 + --> testdata/options/builtin.proto:11:12 | - 24 | option deprecated = true; + 10 | option deprecated = true; | ---------- first set here... - 25 | option deprecated = true; + 11 | option deprecated = true; | ^^^^^^^^^^ ... also set here | ::: /google/protobuf/descriptor.proto:617:17 diff --git a/experimental/ir/testdata/options/custom.proto b/experimental/ir/testdata/options/custom.proto index 361201868..7e0cbb72b 100644 --- a/experimental/ir/testdata/options/custom.proto +++ b/experimental/ir/testdata/options/custom.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/deprecated.proto.yaml b/experimental/ir/testdata/options/deprecated.proto.yaml index 79a42eed0..831549a41 100644 --- a/experimental/ir/testdata/options/deprecated.proto.yaml +++ b/experimental/ir/testdata/options/deprecated.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - files: - path: "test.proto" text: | diff --git a/experimental/ir/testdata/options/json.proto b/experimental/ir/testdata/options/json.proto index f54b49804..e52030522 100644 --- a/experimental/ir/testdata/options/json.proto +++ b/experimental/ir/testdata/options/json.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package buf.test; diff --git a/experimental/ir/testdata/options/json.proto.stderr.txt b/experimental/ir/testdata/options/json.proto.stderr.txt index 74b389465..3cd8ac07e 100644 --- a/experimental/ir/testdata/options/json.proto.stderr.txt +++ b/experimental/ir/testdata/options/json.proto.stderr.txt @@ -1,41 +1,41 @@ warning: message fields have the same JSON name - --> testdata/options/json.proto:23:11 + --> testdata/options/json.proto:9:11 | -22 | int32 a_ = 1; + 8 | int32 a_ = 1; | -- this implies JSON name `a` -23 | int32 a = 2; + 9 | int32 a = 2; | ^ this also implies that name error: message fields have the same JSON name - --> testdata/options/json.proto:26:32 + --> testdata/options/json.proto:12:32 | -25 | int32 ab = 3; +11 | int32 ab = 3; | -- this implies JSON name `ab` -26 | int32 a_b = 4 [json_name = "ab"]; +12 | int32 a_b = 4 [json_name = "ab"]; | ^^^^ `a_b` specifies custom name here error: message fields have the same JSON name - --> testdata/options/json.proto:29:11 + --> testdata/options/json.proto:15:11 | -28 | int32 ac = 5 [json_name = "aC"]; +14 | int32 ac = 5 [json_name = "aC"]; | ---- `ac` specifies custom name here -29 | int32 a_c = 6; +15 | int32 a_c = 6; | ^^^ this also implies that name error: message fields have the same JSON name - --> testdata/options/json.proto:32:30 + --> testdata/options/json.proto:18:30 | -31 | int32 x = 7 [json_name = "z"]; +17 | int32 x = 7 [json_name = "z"]; | --- `x` specifies custom name here -32 | int32 y = 8 [json_name = "z"]; +18 | int32 y = 8 [json_name = "z"]; | ^^^ `y` specifies custom name here warning: message fields have the same (default) JSON name - --> testdata/options/json.proto:35:11 + --> testdata/options/json.proto:21:11 | -34 | int32 d_c = 9 [json_name = "x"]; +20 | int32 d_c = 9 [json_name = "x"]; | --- this implies (default) JSON name `dC` -35 | int32 dC = 10; +21 | int32 dC = 10; | ^^ this also implies that name | = help: even though `d_c` sets `json_name`, their default JSON names must not @@ -43,58 +43,58 @@ warning: message fields have the same (default) JSON name erroneously does not account for custom JSON names error: enum values have the same name with the `Bar` prefix removed - --> testdata/options/json.proto:44:5 + --> testdata/options/json.proto:30:5 | -43 | ZERO = 0; +29 | ZERO = 0; | ---- this implies canonical name `Zero` -44 | BAR_ZERO = 1; +30 | BAR_ZERO = 1; | ^^^^^^^^ this also implies that name error: enum values have the same name with the `Bar` prefix removed - --> testdata/options/json.proto:45:5 + --> testdata/options/json.proto:31:5 | -43 | ZERO = 0; +29 | ZERO = 0; | ---- this implies canonical name `Zero` -44 | BAR_ZERO = 1; -45 | b_a_r_zero = 2; +30 | BAR_ZERO = 1; +31 | b_a_r_zero = 2; | ^^^^^^^^^^ this also implies that name error: enum values have the same name with the `Bar` prefix removed - --> testdata/options/json.proto:49:5 + --> testdata/options/json.proto:35:5 | -48 | FOOBAR = 4; +34 | FOOBAR = 4; | ------ this implies canonical name `Foobar` -49 | BarFooBar = 5; +35 | BarFooBar = 5; | ^^^^^^^^^ this also implies that name error: enum values have the same name with the `Bar` prefix removed - --> testdata/options/json.proto:52:5 + --> testdata/options/json.proto:38:5 | -51 | _BAR__ZERO2 = 6; +37 | _BAR__ZERO2 = 6; | ----------- this implies canonical name `Zero2` -52 | _BAR_ZERO2 = 7; +38 | _BAR_ZERO2 = 7; | ^^^^^^^^^^ this also implies that name error: enum values have the same name with the `Bar` prefix removed - --> testdata/options/json.proto:55:5 + --> testdata/options/json.proto:41:5 | -54 | BAR_Z_ERO = 8; +40 | BAR_Z_ERO = 8; | --------- this implies canonical name `ZEro` -55 | BAR_Z__ERO = 9; +41 | BAR_Z__ERO = 9; | ^^^^^^^^^^ this also implies that name error: message extension cannot specify `json_name` - --> testdata/options/json.proto:59:20 + --> testdata/options/json.proto:45:20 | -59 | int32 x = 100 [json_name = "foo"]; +45 | int32 x = 100 [json_name = "foo"]; | ^^^^^^^^^^^^^^^^^ = note: JSON format for extensions always uses the extension's fully-qualified name warning: message extension cannot specify `json_name` - --> testdata/options/json.proto:60:20 + --> testdata/options/json.proto:46:20 | -60 | int32 y = 101 [json_name = "y"]; +46 | int32 y = 101 [json_name = "y"]; | ^^^^^^^^^^^^^^^ = note: JSON format for extensions always uses the extension's fully-qualified name diff --git a/experimental/ir/testdata/options/missing.proto b/experimental/ir/testdata/options/missing.proto index aa31bfa02..993c34564 100644 --- a/experimental/ir/testdata/options/missing.proto +++ b/experimental/ir/testdata/options/missing.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package buf.test; diff --git a/experimental/ir/testdata/options/missing.proto.stderr.txt b/experimental/ir/testdata/options/missing.proto.stderr.txt index 5459964e1..c648f3582 100644 --- a/experimental/ir/testdata/options/missing.proto.stderr.txt +++ b/experimental/ir/testdata/options/missing.proto.stderr.txt @@ -1,13 +1,13 @@ error: cannot find message field `unknown` in `google.protobuf.FileOptions` - --> testdata/options/missing.proto:19:8 + --> testdata/options/missing.proto:5:8 | -19 | option unknown = 42; + 5 | option unknown = 42; | ^^^^^^^ because of this field selector error: expected singular message, found scalar type `string` - --> testdata/options/missing.proto:20:19 + --> testdata/options/missing.proto:6:19 | - 20 | option go_package.x = 42; + 6 | option go_package.x = 42; | ---------- ^ field selector requires singular message | | | found scalar type `string` @@ -18,15 +18,15 @@ error: expected singular message, found scalar type `string` | ------ type specified here error: cannot find message field `unknown` in `google.protobuf.MessageOptions` - --> testdata/options/missing.proto:23:12 + --> testdata/options/missing.proto:9:12 | -23 | option unknown = 42; + 9 | option unknown = 42; | ^^^^^^^ because of this field selector error: expected singular message, found scalar type `bool` - --> testdata/options/missing.proto:24:23 + --> testdata/options/missing.proto:10:23 | - 24 | option deprecated.x = 42; + 10 | option deprecated.x = 42; | ---------- ^ field selector requires singular message | | | found scalar type `bool` @@ -37,15 +37,15 @@ error: expected singular message, found scalar type `bool` | ---- type specified here error: cannot find message field `unknown` in `google.protobuf.FieldOptions` - --> testdata/options/missing.proto:25:27 + --> testdata/options/missing.proto:11:27 | -25 | optional Foo foo = 1 [unknown = 42, lazy.x = 42]; +11 | optional Foo foo = 1 [unknown = 42, lazy.x = 42]; | ^^^^^^^ because of this field selector error: expected singular message, found scalar type `bool` - --> testdata/options/missing.proto:25:46 + --> testdata/options/missing.proto:11:46 | - 25 | optional Foo foo = 1 [unknown = 42, lazy.x = 42]; + 11 | optional Foo foo = 1 [unknown = 42, lazy.x = 42]; | ---- ^ | | | | found scalar type `bool` @@ -58,9 +58,9 @@ error: expected singular message, found scalar type `bool` | ---- type specified here error: expected singular message, found scalar type `int32` - --> testdata/options/missing.proto:26:37 + --> testdata/options/missing.proto:12:37 | -26 | optional int32 bar = 2 [default.x = 42]; +12 | optional int32 bar = 2 [default.x = 42]; | ----- ------- ^ | | | | type specified here field selector requires singular message @@ -68,21 +68,21 @@ error: expected singular message, found scalar type `int32` | found scalar type `int32` error: cannot find message field `unknown` in `google.protobuf.OneofOptions` - --> testdata/options/missing.proto:29:16 + --> testdata/options/missing.proto:15:16 | -29 | option unknown = 42; +15 | option unknown = 42; | ^^^^^^^ because of this field selector error: cannot find message field `unknown` in `google.protobuf.EnumOptions` - --> testdata/options/missing.proto:35:12 + --> testdata/options/missing.proto:21:12 | -35 | option unknown = 42; +21 | option unknown = 42; | ^^^^^^^ because of this field selector error: expected singular message, found scalar type `bool` - --> testdata/options/missing.proto:36:23 + --> testdata/options/missing.proto:22:23 | - 36 | option deprecated.x = 42; + 22 | option deprecated.x = 42; | ---------- ^ field selector requires singular message | | | found scalar type `bool` @@ -93,15 +93,15 @@ error: expected singular message, found scalar type `bool` | ---- type specified here error: cannot find message field `unknown` in `google.protobuf.EnumValueOptions` - --> testdata/options/missing.proto:37:19 + --> testdata/options/missing.proto:23:19 | -37 | BAR_ZERO = 0 [unknown = 42, deprecated.x = 42]; +23 | BAR_ZERO = 0 [unknown = 42, deprecated.x = 42]; | ^^^^^^^ because of this field selector error: expected singular message, found scalar type `bool` - --> testdata/options/missing.proto:37:44 + --> testdata/options/missing.proto:23:44 | - 37 | BAR_ZERO = 0 [unknown = 42, deprecated.x = 42]; + 23 | BAR_ZERO = 0 [unknown = 42, deprecated.x = 42]; | ---------- ^ | | | | found scalar type `bool` diff --git a/experimental/ir/testdata/options/redundant_fqn.proto b/experimental/ir/testdata/options/redundant_fqn.proto index 8621282e6..f0c6ac623 100644 --- a/experimental/ir/testdata/options/redundant_fqn.proto +++ b/experimental/ir/testdata/options/redundant_fqn.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/redundant_fqn.proto.stderr.txt b/experimental/ir/testdata/options/redundant_fqn.proto.stderr.txt index c9bc2fd86..17bb2acba 100644 --- a/experimental/ir/testdata/options/redundant_fqn.proto.stderr.txt +++ b/experimental/ir/testdata/options/redundant_fqn.proto.stderr.txt @@ -1,7 +1,7 @@ warning: redundant custom option setting syntax - --> testdata/options/redundant_fqn.proto:23:12 + --> testdata/options/redundant_fqn.proto:9:12 | - 23 | option (google.protobuf.MessageOptions.deprecated) = true; + 9 | option (google.protobuf.MessageOptions.deprecated) = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | this field is not a message extension @@ -13,11 +13,11 @@ warning: redundant custom option setting syntax | | | field declared inside of `google.protobuf.MessageOptions` here | - ::: testdata/options/redundant_fqn.proto:23:12 + ::: testdata/options/redundant_fqn.proto:9:12 help: replace `(...)` with a field name | - 23 | - option (google.protobuf.MessageOptions.deprecated) = true; - 23 | + option deprecated = true; + 9 | - option (google.protobuf.MessageOptions.deprecated) = true; + 9 | + option deprecated = true; | | = help: custom option setting syntax should only be used with message diff --git a/experimental/ir/testdata/options/repeated_selector.proto b/experimental/ir/testdata/options/repeated_selector.proto index ed40d98ea..52b96f129 100644 --- a/experimental/ir/testdata/options/repeated_selector.proto +++ b/experimental/ir/testdata/options/repeated_selector.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package buf.test; diff --git a/experimental/ir/testdata/options/repeated_selector.proto.stderr.txt b/experimental/ir/testdata/options/repeated_selector.proto.stderr.txt index fce13aac7..f55ebd96a 100644 --- a/experimental/ir/testdata/options/repeated_selector.proto.stderr.txt +++ b/experimental/ir/testdata/options/repeated_selector.proto.stderr.txt @@ -1,26 +1,26 @@ error: expected singular message, found repeated `int32` - --> testdata/options/repeated_selector.proto:22:16 + --> testdata/options/repeated_selector.proto:8:16 | -22 | option (x).z = 42; + 8 | option (x).z = 42; | --- ^ field selector requires singular message | | | found repeated `int32` -23 | option (y).z = 42; + 9 | option (y).z = 42; ... -30 | repeated int32 x = 1000; +16 | repeated int32 x = 1000; | -------------- type specified here error: expected singular message, found repeated `buf.test.Foo` - --> testdata/options/repeated_selector.proto:23:16 + --> testdata/options/repeated_selector.proto:9:16 | -23 | option (y).z = 42; + 9 | option (y).z = 42; | --- ^ field selector requires singular message | | | found repeated `buf.test.Foo` -24 | option (z).z = 42; +10 | option (z).z = 42; ... -30 | repeated int32 x = 1000; -31 | repeated Foo y = 1001; +16 | repeated int32 x = 1000; +17 | repeated Foo y = 1001; | ------------ type specified here encountered 2 errors diff --git a/experimental/ir/testdata/options/target.proto b/experimental/ir/testdata/options/target.proto index dd01aaef0..68b4f82ef 100644 --- a/experimental/ir/testdata/options/target.proto +++ b/experimental/ir/testdata/options/target.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package buf.test; diff --git a/experimental/ir/testdata/options/target.proto.stderr.txt b/experimental/ir/testdata/options/target.proto.stderr.txt index 4058d7165..e0849b38a 100644 --- a/experimental/ir/testdata/options/target.proto.stderr.txt +++ b/experimental/ir/testdata/options/target.proto.stderr.txt @@ -1,12 +1,12 @@ error: unsupported option target for `range` - --> testdata/options/target.proto:22:15 + --> testdata/options/target.proto:8:15 | - 22 | option (file).range = true; + 8 | option (file).range = true; | ^^^^^ option set here - 23 | option (file).message = true; + 9 | option (file).message = true; ... -117 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; -118 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; +103 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; +104 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; | --------------------------- | | | targets constrained here @@ -14,14 +14,14 @@ error: unsupported option target for `range` = help: `buf.test.Targets.range` is constrained to extension ranges error: unsupported option target for `message` - --> testdata/options/target.proto:23:15 + --> testdata/options/target.proto:9:15 | - 23 | option (file).message = true; + 9 | option (file).message = true; | ^^^^^^^ option set here - 24 | option (file).field = true; + 10 | option (file).field = true; ... -118 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; -119 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; +104 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; +105 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; | ------------------- | | | targets constrained here @@ -29,14 +29,14 @@ error: unsupported option target for `message` = help: `buf.test.Targets.message` is constrained to message definitions error: unsupported option target for `field` - --> testdata/options/target.proto:24:15 + --> testdata/options/target.proto:10:15 | - 24 | option (file).field = true; + 10 | option (file).field = true; | ^^^^^ option set here - 25 | option (file).oneof = true; + 11 | option (file).oneof = true; ... -119 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; -120 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; +105 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; +106 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; | ----------------- | | | targets constrained here @@ -44,14 +44,14 @@ error: unsupported option target for `field` = help: `buf.test.Targets.field` is constrained to message fields error: unsupported option target for `oneof` - --> testdata/options/target.proto:25:15 + --> testdata/options/target.proto:11:15 | - 25 | option (file).oneof = true; + 11 | option (file).oneof = true; | ^^^^^ option set here - 26 | option (file).enum = true; + 12 | option (file).enum = true; ... -120 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; -121 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; +106 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; +107 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; | ----------------- | | | targets constrained here @@ -59,14 +59,14 @@ error: unsupported option target for `oneof` = help: `buf.test.Targets.oneof` is constrained to oneof definitions error: unsupported option target for `enum` - --> testdata/options/target.proto:26:15 + --> testdata/options/target.proto:12:15 | - 26 | option (file).enum = true; + 12 | option (file).enum = true; | ^^^^ option set here - 27 | option (file).value = true; + 13 | option (file).value = true; ... -121 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; -122 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; +107 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; +108 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; | ---------------- | | | targets constrained here @@ -74,14 +74,14 @@ error: unsupported option target for `enum` = help: `buf.test.Targets.enum` is constrained to enum definitions error: unsupported option target for `value` - --> testdata/options/target.proto:27:15 + --> testdata/options/target.proto:13:15 | - 27 | option (file).value = true; + 13 | option (file).value = true; | ^^^^^ option set here - 28 | option (file).service = true; + 14 | option (file).service = true; ... -122 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; -123 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. +108 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; +109 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. | ---------------------- | | | targets constrained here @@ -89,14 +89,14 @@ error: unsupported option target for `value` = help: `buf.test.Targets.value` is constrained to enum values error: unsupported option target for `service` - --> testdata/options/target.proto:28:15 + --> testdata/options/target.proto:14:15 | - 28 | option (file).service = true; + 14 | option (file).service = true; | ^^^^^^^ option set here - 29 | option (file).method = true; + 15 | option (file).method = true; ... -123 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. -124 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; +109 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. +110 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; | ------------------- | | | targets constrained here @@ -104,13 +104,13 @@ error: unsupported option target for `service` = help: `buf.test.Targets.service` is constrained to service definitions error: unsupported option target for `method` - --> testdata/options/target.proto:29:15 + --> testdata/options/target.proto:15:15 | - 29 | option (file).method = true; + 15 | option (file).method = true; | ^^^^^^ option set here ... -124 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; -125 | optional bool method = 9 [targets = TARGET_TYPE_METHOD]; +110 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; +111 | optional bool method = 9 [targets = TARGET_TYPE_METHOD]; | ------------------ | | | targets constrained here @@ -118,15 +118,15 @@ error: unsupported option target for `method` = help: `buf.test.Targets.method` is constrained to service methods error: unsupported option target for `file` - --> testdata/options/target.proto:32:22 + --> testdata/options/target.proto:18:22 | - 31 | message M { + 17 | message M { | - applied to this - 32 | option (message).file = true; + 18 | option (message).file = true; | ^^^^ option set here - 33 | option (message).range = true; + 19 | option (message).range = true; ... -117 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; +103 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; | ---------------- | | | targets constrained here @@ -134,17 +134,17 @@ error: unsupported option target for `file` = help: `buf.test.Targets.file` is constrained to file scopes error: unsupported option target for `range` - --> testdata/options/target.proto:33:22 + --> testdata/options/target.proto:19:22 | - 31 | message M { + 17 | message M { | - applied to this - 32 | option (message).file = true; - 33 | option (message).range = true; + 18 | option (message).file = true; + 19 | option (message).range = true; | ^^^^^ option set here - 34 | option (message).message = true; + 20 | option (message).message = true; ... -117 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; -118 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; +103 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; +104 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; | --------------------------- | | | targets constrained here @@ -152,18 +152,18 @@ error: unsupported option target for `range` = help: `buf.test.Targets.range` is constrained to extension ranges error: unsupported option target for `field` - --> testdata/options/target.proto:35:22 + --> testdata/options/target.proto:21:22 | - 31 | message M { + 17 | message M { | - applied to this ... - 34 | option (message).message = true; - 35 | option (message).field = true; + 20 | option (message).message = true; + 21 | option (message).field = true; | ^^^^^ option set here - 36 | option (message).oneof = true; + 22 | option (message).oneof = true; ... -119 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; -120 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; +105 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; +106 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; | ----------------- | | | targets constrained here @@ -171,18 +171,18 @@ error: unsupported option target for `field` = help: `buf.test.Targets.field` is constrained to message fields error: unsupported option target for `oneof` - --> testdata/options/target.proto:36:22 + --> testdata/options/target.proto:22:22 | - 31 | message M { + 17 | message M { | - applied to this ... - 35 | option (message).field = true; - 36 | option (message).oneof = true; + 21 | option (message).field = true; + 22 | option (message).oneof = true; | ^^^^^ option set here - 37 | option (message).enum = true; + 23 | option (message).enum = true; ... -120 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; -121 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; +106 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; +107 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; | ----------------- | | | targets constrained here @@ -190,18 +190,18 @@ error: unsupported option target for `oneof` = help: `buf.test.Targets.oneof` is constrained to oneof definitions error: unsupported option target for `enum` - --> testdata/options/target.proto:37:22 + --> testdata/options/target.proto:23:22 | - 31 | message M { + 17 | message M { | - applied to this ... - 36 | option (message).oneof = true; - 37 | option (message).enum = true; + 22 | option (message).oneof = true; + 23 | option (message).enum = true; | ^^^^ option set here - 38 | option (message).value = true; + 24 | option (message).value = true; ... -121 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; -122 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; +107 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; +108 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; | ---------------- | | | targets constrained here @@ -209,18 +209,18 @@ error: unsupported option target for `enum` = help: `buf.test.Targets.enum` is constrained to enum definitions error: unsupported option target for `value` - --> testdata/options/target.proto:38:22 + --> testdata/options/target.proto:24:22 | - 31 | message M { + 17 | message M { | - applied to this ... - 37 | option (message).enum = true; - 38 | option (message).value = true; + 23 | option (message).enum = true; + 24 | option (message).value = true; | ^^^^^ option set here - 39 | option (message).service = true; + 25 | option (message).service = true; ... -122 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; -123 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. +108 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; +109 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. | ---------------------- | | | targets constrained here @@ -228,18 +228,18 @@ error: unsupported option target for `value` = help: `buf.test.Targets.value` is constrained to enum values error: unsupported option target for `service` - --> testdata/options/target.proto:39:22 + --> testdata/options/target.proto:25:22 | - 31 | message M { + 17 | message M { | - applied to this ... - 38 | option (message).value = true; - 39 | option (message).service = true; + 24 | option (message).value = true; + 25 | option (message).service = true; | ^^^^^^^ option set here - 40 | option (message).method = true; + 26 | option (message).method = true; ... -123 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. -124 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; +109 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. +110 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; | ------------------- | | | targets constrained here @@ -247,17 +247,17 @@ error: unsupported option target for `service` = help: `buf.test.Targets.service` is constrained to service definitions error: unsupported option target for `method` - --> testdata/options/target.proto:40:22 + --> testdata/options/target.proto:26:22 | - 31 | message M { + 17 | message M { | - applied to this ... - 39 | option (message).service = true; - 40 | option (message).method = true; + 25 | option (message).service = true; + 26 | option (message).method = true; | ^^^^^^ option set here ... -124 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; -125 | optional bool method = 9 [targets = TARGET_TYPE_METHOD]; +110 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; +111 | optional bool method = 9 [targets = TARGET_TYPE_METHOD]; | ------------------ | | | targets constrained here @@ -265,15 +265,15 @@ error: unsupported option target for `method` = help: `buf.test.Targets.method` is constrained to service methods error: unsupported option target for `file` - --> testdata/options/target.proto:43:9 + --> testdata/options/target.proto:29:9 | - 42 | optional int32 x = 1 [(field) = { + 28 | optional int32 x = 1 [(field) = { | - applied to this - 43 | file: true + 29 | file: true | ^^^^ option set here - 44 | range: true + 30 | range: true ... -117 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; +103 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; | ---------------- | | | targets constrained here @@ -281,17 +281,17 @@ error: unsupported option target for `file` = help: `buf.test.Targets.file` is constrained to file scopes error: unsupported option target for `range` - --> testdata/options/target.proto:44:9 + --> testdata/options/target.proto:30:9 | - 42 | optional int32 x = 1 [(field) = { + 28 | optional int32 x = 1 [(field) = { | - applied to this - 43 | file: true - 44 | range: true + 29 | file: true + 30 | range: true | ^^^^^ option set here - 45 | message: true, field: true, oneof: true + 31 | message: true, field: true, oneof: true ... -117 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; -118 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; +103 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; +104 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; | --------------------------- | | | targets constrained here @@ -299,18 +299,18 @@ error: unsupported option target for `range` = help: `buf.test.Targets.range` is constrained to extension ranges error: unsupported option target for `message` - --> testdata/options/target.proto:45:9 + --> testdata/options/target.proto:31:9 | - 42 | optional int32 x = 1 [(field) = { + 28 | optional int32 x = 1 [(field) = { | - applied to this - 43 | file: true - 44 | range: true - 45 | message: true, field: true, oneof: true + 29 | file: true + 30 | range: true + 31 | message: true, field: true, oneof: true | ^^^^^^^ option set here - 46 | enum: true, value: true + 32 | enum: true, value: true ... -118 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; -119 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; +104 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; +105 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; | ------------------- | | | targets constrained here @@ -318,18 +318,18 @@ error: unsupported option target for `message` = help: `buf.test.Targets.message` is constrained to message definitions error: unsupported option target for `oneof` - --> testdata/options/target.proto:45:37 + --> testdata/options/target.proto:31:37 | - 42 | optional int32 x = 1 [(field) = { + 28 | optional int32 x = 1 [(field) = { | - applied to this - 43 | file: true - 44 | range: true - 45 | message: true, field: true, oneof: true + 29 | file: true + 30 | range: true + 31 | message: true, field: true, oneof: true | ^^^^^ option set here - 46 | enum: true, value: true + 32 | enum: true, value: true ... -120 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; -121 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; +106 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; +107 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; | ----------------- | | | targets constrained here @@ -337,18 +337,18 @@ error: unsupported option target for `oneof` = help: `buf.test.Targets.oneof` is constrained to oneof definitions error: unsupported option target for `enum` - --> testdata/options/target.proto:46:9 + --> testdata/options/target.proto:32:9 | - 42 | optional int32 x = 1 [(field) = { + 28 | optional int32 x = 1 [(field) = { | - applied to this ... - 45 | message: true, field: true, oneof: true - 46 | enum: true, value: true + 31 | message: true, field: true, oneof: true + 32 | enum: true, value: true | ^^^^ option set here - 47 | service: true, method: true + 33 | service: true, method: true ... -121 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; -122 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; +107 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; +108 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; | ---------------- | | | targets constrained here @@ -356,18 +356,18 @@ error: unsupported option target for `enum` = help: `buf.test.Targets.enum` is constrained to enum definitions error: unsupported option target for `value` - --> testdata/options/target.proto:46:21 + --> testdata/options/target.proto:32:21 | - 42 | optional int32 x = 1 [(field) = { + 28 | optional int32 x = 1 [(field) = { | - applied to this ... - 45 | message: true, field: true, oneof: true - 46 | enum: true, value: true + 31 | message: true, field: true, oneof: true + 32 | enum: true, value: true | ^^^^^ option set here - 47 | service: true, method: true + 33 | service: true, method: true ... -122 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; -123 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. +108 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; +109 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. | ---------------------- | | | targets constrained here @@ -375,17 +375,17 @@ error: unsupported option target for `value` = help: `buf.test.Targets.value` is constrained to enum values error: unsupported option target for `service` - --> testdata/options/target.proto:47:9 + --> testdata/options/target.proto:33:9 | - 42 | optional int32 x = 1 [(field) = { + 28 | optional int32 x = 1 [(field) = { | - applied to this ... - 46 | enum: true, value: true - 47 | service: true, method: true + 32 | enum: true, value: true + 33 | service: true, method: true | ^^^^^^^ option set here ... -123 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. -124 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; +109 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. +110 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; | ------------------- | | | targets constrained here @@ -393,17 +393,17 @@ error: unsupported option target for `service` = help: `buf.test.Targets.service` is constrained to service definitions error: unsupported option target for `method` - --> testdata/options/target.proto:47:24 + --> testdata/options/target.proto:33:24 | - 42 | optional int32 x = 1 [(field) = { + 28 | optional int32 x = 1 [(field) = { | - applied to this ... - 46 | enum: true, value: true - 47 | service: true, method: true + 32 | enum: true, value: true + 33 | service: true, method: true | ^^^^^^ option set here ... -124 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; -125 | optional bool method = 9 [targets = TARGET_TYPE_METHOD]; +110 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; +111 | optional bool method = 9 [targets = TARGET_TYPE_METHOD]; | ------------------ | | | targets constrained here @@ -411,15 +411,15 @@ error: unsupported option target for `method` = help: `buf.test.Targets.method` is constrained to service methods error: unsupported option target for `file` - --> testdata/options/target.proto:59:24 + --> testdata/options/target.proto:45:24 | - 58 | oneof y { + 44 | oneof y { | - applied to this - 59 | option (oneof).file = true; + 45 | option (oneof).file = true; | ^^^^ option set here - 60 | option (oneof).range = true; + 46 | option (oneof).range = true; ... -117 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; +103 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; | ---------------- | | | targets constrained here @@ -427,17 +427,17 @@ error: unsupported option target for `file` = help: `buf.test.Targets.file` is constrained to file scopes error: unsupported option target for `range` - --> testdata/options/target.proto:60:24 + --> testdata/options/target.proto:46:24 | - 58 | oneof y { + 44 | oneof y { | - applied to this - 59 | option (oneof).file = true; - 60 | option (oneof).range = true; + 45 | option (oneof).file = true; + 46 | option (oneof).range = true; | ^^^^^ option set here - 61 | option (oneof).message = true; + 47 | option (oneof).message = true; ... -117 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; -118 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; +103 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; +104 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; | --------------------------- | | | targets constrained here @@ -445,18 +445,18 @@ error: unsupported option target for `range` = help: `buf.test.Targets.range` is constrained to extension ranges error: unsupported option target for `message` - --> testdata/options/target.proto:61:24 + --> testdata/options/target.proto:47:24 | - 58 | oneof y { + 44 | oneof y { | - applied to this - 59 | option (oneof).file = true; - 60 | option (oneof).range = true; - 61 | option (oneof).message = true; + 45 | option (oneof).file = true; + 46 | option (oneof).range = true; + 47 | option (oneof).message = true; | ^^^^^^^ option set here - 62 | option (oneof).field = true; + 48 | option (oneof).field = true; ... -118 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; -119 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; +104 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; +105 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; | ------------------- | | | targets constrained here @@ -464,18 +464,18 @@ error: unsupported option target for `message` = help: `buf.test.Targets.message` is constrained to message definitions error: unsupported option target for `field` - --> testdata/options/target.proto:62:24 + --> testdata/options/target.proto:48:24 | - 58 | oneof y { + 44 | oneof y { | - applied to this ... - 61 | option (oneof).message = true; - 62 | option (oneof).field = true; + 47 | option (oneof).message = true; + 48 | option (oneof).field = true; | ^^^^^ option set here - 63 | option (oneof).oneof = true; + 49 | option (oneof).oneof = true; ... -119 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; -120 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; +105 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; +106 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; | ----------------- | | | targets constrained here @@ -483,18 +483,18 @@ error: unsupported option target for `field` = help: `buf.test.Targets.field` is constrained to message fields error: unsupported option target for `enum` - --> testdata/options/target.proto:64:24 + --> testdata/options/target.proto:50:24 | - 58 | oneof y { + 44 | oneof y { | - applied to this ... - 63 | option (oneof).oneof = true; - 64 | option (oneof).enum = true; + 49 | option (oneof).oneof = true; + 50 | option (oneof).enum = true; | ^^^^ option set here - 65 | option (oneof).value = true; + 51 | option (oneof).value = true; ... -121 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; -122 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; +107 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; +108 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; | ---------------- | | | targets constrained here @@ -502,18 +502,18 @@ error: unsupported option target for `enum` = help: `buf.test.Targets.enum` is constrained to enum definitions error: unsupported option target for `value` - --> testdata/options/target.proto:65:24 + --> testdata/options/target.proto:51:24 | - 58 | oneof y { + 44 | oneof y { | - applied to this ... - 64 | option (oneof).enum = true; - 65 | option (oneof).value = true; + 50 | option (oneof).enum = true; + 51 | option (oneof).value = true; | ^^^^^ option set here - 66 | option (oneof).service = true; + 52 | option (oneof).service = true; ... -122 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; -123 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. +108 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; +109 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. | ---------------------- | | | targets constrained here @@ -521,18 +521,18 @@ error: unsupported option target for `value` = help: `buf.test.Targets.value` is constrained to enum values error: unsupported option target for `service` - --> testdata/options/target.proto:66:24 + --> testdata/options/target.proto:52:24 | - 58 | oneof y { + 44 | oneof y { | - applied to this ... - 65 | option (oneof).value = true; - 66 | option (oneof).service = true; + 51 | option (oneof).value = true; + 52 | option (oneof).service = true; | ^^^^^^^ option set here - 67 | option (oneof).method = true; + 53 | option (oneof).method = true; ... -123 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. -124 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; +109 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. +110 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; | ------------------- | | | targets constrained here @@ -540,18 +540,18 @@ error: unsupported option target for `service` = help: `buf.test.Targets.service` is constrained to service definitions error: unsupported option target for `method` - --> testdata/options/target.proto:67:24 + --> testdata/options/target.proto:53:24 | - 58 | oneof y { + 44 | oneof y { | - applied to this ... - 66 | option (oneof).service = true; - 67 | option (oneof).method = true; + 52 | option (oneof).service = true; + 53 | option (oneof).method = true; | ^^^^^^ option set here - 68 | int32 z = 3; + 54 | int32 z = 3; ... -124 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; -125 | optional bool method = 9 [targets = TARGET_TYPE_METHOD]; +110 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; +111 | optional bool method = 9 [targets = TARGET_TYPE_METHOD]; | ------------------ | | | targets constrained here @@ -559,15 +559,15 @@ error: unsupported option target for `method` = help: `buf.test.Targets.method` is constrained to service methods error: unsupported option target for `file` - --> testdata/options/target.proto:73:19 + --> testdata/options/target.proto:59:19 | - 72 | enum E { + 58 | enum E { | - applied to this - 73 | option (enum).file = true; + 59 | option (enum).file = true; | ^^^^ option set here - 74 | option (enum).range = true; + 60 | option (enum).range = true; ... -117 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; +103 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; | ---------------- | | | targets constrained here @@ -575,17 +575,17 @@ error: unsupported option target for `file` = help: `buf.test.Targets.file` is constrained to file scopes error: unsupported option target for `range` - --> testdata/options/target.proto:74:19 + --> testdata/options/target.proto:60:19 | - 72 | enum E { + 58 | enum E { | - applied to this - 73 | option (enum).file = true; - 74 | option (enum).range = true; + 59 | option (enum).file = true; + 60 | option (enum).range = true; | ^^^^^ option set here - 75 | option (enum).message = true; + 61 | option (enum).message = true; ... -117 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; -118 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; +103 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; +104 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; | --------------------------- | | | targets constrained here @@ -593,18 +593,18 @@ error: unsupported option target for `range` = help: `buf.test.Targets.range` is constrained to extension ranges error: unsupported option target for `message` - --> testdata/options/target.proto:75:19 + --> testdata/options/target.proto:61:19 | - 72 | enum E { + 58 | enum E { | - applied to this - 73 | option (enum).file = true; - 74 | option (enum).range = true; - 75 | option (enum).message = true; + 59 | option (enum).file = true; + 60 | option (enum).range = true; + 61 | option (enum).message = true; | ^^^^^^^ option set here - 76 | option (enum).field = true; + 62 | option (enum).field = true; ... -118 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; -119 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; +104 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; +105 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; | ------------------- | | | targets constrained here @@ -612,18 +612,18 @@ error: unsupported option target for `message` = help: `buf.test.Targets.message` is constrained to message definitions error: unsupported option target for `field` - --> testdata/options/target.proto:76:19 + --> testdata/options/target.proto:62:19 | - 72 | enum E { + 58 | enum E { | - applied to this ... - 75 | option (enum).message = true; - 76 | option (enum).field = true; + 61 | option (enum).message = true; + 62 | option (enum).field = true; | ^^^^^ option set here - 77 | option (enum).oneof = true; + 63 | option (enum).oneof = true; ... -119 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; -120 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; +105 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; +106 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; | ----------------- | | | targets constrained here @@ -631,18 +631,18 @@ error: unsupported option target for `field` = help: `buf.test.Targets.field` is constrained to message fields error: unsupported option target for `oneof` - --> testdata/options/target.proto:77:19 + --> testdata/options/target.proto:63:19 | - 72 | enum E { + 58 | enum E { | - applied to this ... - 76 | option (enum).field = true; - 77 | option (enum).oneof = true; + 62 | option (enum).field = true; + 63 | option (enum).oneof = true; | ^^^^^ option set here - 78 | option (enum).enum = true; + 64 | option (enum).enum = true; ... -120 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; -121 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; +106 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; +107 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; | ----------------- | | | targets constrained here @@ -650,18 +650,18 @@ error: unsupported option target for `oneof` = help: `buf.test.Targets.oneof` is constrained to oneof definitions error: unsupported option target for `value` - --> testdata/options/target.proto:79:19 + --> testdata/options/target.proto:65:19 | - 72 | enum E { + 58 | enum E { | - applied to this ... - 78 | option (enum).enum = true; - 79 | option (enum).value = true; + 64 | option (enum).enum = true; + 65 | option (enum).value = true; | ^^^^^ option set here - 80 | option (enum).service = true; + 66 | option (enum).service = true; ... -122 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; -123 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. +108 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; +109 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. | ---------------------- | | | targets constrained here @@ -669,18 +669,18 @@ error: unsupported option target for `value` = help: `buf.test.Targets.value` is constrained to enum values error: unsupported option target for `service` - --> testdata/options/target.proto:80:19 + --> testdata/options/target.proto:66:19 | - 72 | enum E { + 58 | enum E { | - applied to this ... - 79 | option (enum).value = true; - 80 | option (enum).service = true; + 65 | option (enum).value = true; + 66 | option (enum).service = true; | ^^^^^^^ option set here - 81 | option (enum).method = true; + 67 | option (enum).method = true; ... -123 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. -124 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; +109 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. +110 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; | ------------------- | | | targets constrained here @@ -688,17 +688,17 @@ error: unsupported option target for `service` = help: `buf.test.Targets.service` is constrained to service definitions error: unsupported option target for `method` - --> testdata/options/target.proto:81:19 + --> testdata/options/target.proto:67:19 | - 72 | enum E { + 58 | enum E { | - applied to this ... - 80 | option (enum).service = true; - 81 | option (enum).method = true; + 66 | option (enum).service = true; + 67 | option (enum).method = true; | ^^^^^^ option set here ... -124 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; -125 | optional bool method = 9 [targets = TARGET_TYPE_METHOD]; +110 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; +111 | optional bool method = 9 [targets = TARGET_TYPE_METHOD]; | ------------------ | | | targets constrained here @@ -706,15 +706,15 @@ error: unsupported option target for `method` = help: `buf.test.Targets.method` is constrained to service methods error: unsupported option target for `file` - --> testdata/options/target.proto:84:9 + --> testdata/options/target.proto:70:9 | - 83 | X = 1 [(value) = { + 69 | X = 1 [(value) = { | - applied to this - 84 | file: true + 70 | file: true | ^^^^ option set here - 85 | range: true + 71 | range: true ... -117 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; +103 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; | ---------------- | | | targets constrained here @@ -722,17 +722,17 @@ error: unsupported option target for `file` = help: `buf.test.Targets.file` is constrained to file scopes error: unsupported option target for `range` - --> testdata/options/target.proto:85:9 + --> testdata/options/target.proto:71:9 | - 83 | X = 1 [(value) = { + 69 | X = 1 [(value) = { | - applied to this - 84 | file: true - 85 | range: true + 70 | file: true + 71 | range: true | ^^^^^ option set here - 86 | message: true, field: true, oneof: true + 72 | message: true, field: true, oneof: true ... -117 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; -118 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; +103 | optional bool file = 1 [targets = TARGET_TYPE_FILE]; +104 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; | --------------------------- | | | targets constrained here @@ -740,18 +740,18 @@ error: unsupported option target for `range` = help: `buf.test.Targets.range` is constrained to extension ranges error: unsupported option target for `message` - --> testdata/options/target.proto:86:9 + --> testdata/options/target.proto:72:9 | - 83 | X = 1 [(value) = { + 69 | X = 1 [(value) = { | - applied to this - 84 | file: true - 85 | range: true - 86 | message: true, field: true, oneof: true + 70 | file: true + 71 | range: true + 72 | message: true, field: true, oneof: true | ^^^^^^^ option set here - 87 | enum: true, value: true + 73 | enum: true, value: true ... -118 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; -119 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; +104 | optional bool range = 2 [targets = TARGET_TYPE_EXTENSION_RANGE]; +105 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; | ------------------- | | | targets constrained here @@ -759,18 +759,18 @@ error: unsupported option target for `message` = help: `buf.test.Targets.message` is constrained to message definitions error: unsupported option target for `field` - --> testdata/options/target.proto:86:24 + --> testdata/options/target.proto:72:24 | - 83 | X = 1 [(value) = { + 69 | X = 1 [(value) = { | - applied to this - 84 | file: true - 85 | range: true - 86 | message: true, field: true, oneof: true + 70 | file: true + 71 | range: true + 72 | message: true, field: true, oneof: true | ^^^^^ option set here - 87 | enum: true, value: true + 73 | enum: true, value: true ... -119 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; -120 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; +105 | optional bool message = 3 [targets = TARGET_TYPE_MESSAGE]; +106 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; | ----------------- | | | targets constrained here @@ -778,18 +778,18 @@ error: unsupported option target for `field` = help: `buf.test.Targets.field` is constrained to message fields error: unsupported option target for `oneof` - --> testdata/options/target.proto:86:37 + --> testdata/options/target.proto:72:37 | - 83 | X = 1 [(value) = { + 69 | X = 1 [(value) = { | - applied to this - 84 | file: true - 85 | range: true - 86 | message: true, field: true, oneof: true + 70 | file: true + 71 | range: true + 72 | message: true, field: true, oneof: true | ^^^^^ option set here - 87 | enum: true, value: true + 73 | enum: true, value: true ... -120 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; -121 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; +106 | optional bool field = 4 [targets = TARGET_TYPE_FIELD]; +107 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; | ----------------- | | | targets constrained here @@ -797,18 +797,18 @@ error: unsupported option target for `oneof` = help: `buf.test.Targets.oneof` is constrained to oneof definitions error: unsupported option target for `enum` - --> testdata/options/target.proto:87:9 + --> testdata/options/target.proto:73:9 | - 83 | X = 1 [(value) = { + 69 | X = 1 [(value) = { | - applied to this ... - 86 | message: true, field: true, oneof: true - 87 | enum: true, value: true + 72 | message: true, field: true, oneof: true + 73 | enum: true, value: true | ^^^^ option set here - 88 | service: true, method: true + 74 | service: true, method: true ... -121 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; -122 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; +107 | optional bool oneof = 5 [targets = TARGET_TYPE_ONEOF]; +108 | optional bool enum = 6 [targets = TARGET_TYPE_ENUM]; | ---------------- | | | targets constrained here @@ -816,17 +816,17 @@ error: unsupported option target for `enum` = help: `buf.test.Targets.enum` is constrained to enum definitions error: unsupported option target for `service` - --> testdata/options/target.proto:88:9 + --> testdata/options/target.proto:74:9 | - 83 | X = 1 [(value) = { + 69 | X = 1 [(value) = { | - applied to this ... - 87 | enum: true, value: true - 88 | service: true, method: true + 73 | enum: true, value: true + 74 | service: true, method: true | ^^^^^^^ option set here ... -123 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. -124 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; +109 | optional bool value = 7 [targets = TARGET_TYPE_ENUM_ENTRY]; // Why is it called this. +110 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; | ------------------- | | | targets constrained here @@ -834,17 +834,17 @@ error: unsupported option target for `service` = help: `buf.test.Targets.service` is constrained to service definitions error: unsupported option target for `method` - --> testdata/options/target.proto:88:24 + --> testdata/options/target.proto:74:24 | - 83 | X = 1 [(value) = { + 69 | X = 1 [(value) = { | - applied to this ... - 87 | enum: true, value: true - 88 | service: true, method: true + 73 | enum: true, value: true + 74 | service: true, method: true | ^^^^^^ option set here ... -124 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; -125 | optional bool method = 9 [targets = TARGET_TYPE_METHOD]; +110 | optional bool service = 8 [targets = TARGET_TYPE_SERVICE]; +111 | optional bool method = 9 [targets = TARGET_TYPE_METHOD]; | ------------------ | | | targets constrained here diff --git a/experimental/ir/testdata/options/uinterpreted.proto b/experimental/ir/testdata/options/uinterpreted.proto index 1591c5826..2efd57731 100644 --- a/experimental/ir/testdata/options/uinterpreted.proto +++ b/experimental/ir/testdata/options/uinterpreted.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package buf.test; diff --git a/experimental/ir/testdata/options/uinterpreted.proto.stderr.txt b/experimental/ir/testdata/options/uinterpreted.proto.stderr.txt index 38fec402f..f75a3e8fb 100644 --- a/experimental/ir/testdata/options/uinterpreted.proto.stderr.txt +++ b/experimental/ir/testdata/options/uinterpreted.proto.stderr.txt @@ -1,63 +1,63 @@ error: `uninterpreted_option` cannot be set explicitly - --> testdata/options/uinterpreted.proto:19:8 + --> testdata/options/uinterpreted.proto:5:8 | -19 | option uninterpreted_option = {}; + 5 | option uninterpreted_option = {}; | ^^^^^^^^^^^^^^^^^^^^ = help: `uninterpreted_option` is an implementation detail of protoc error: `uninterpreted_option` cannot be set explicitly - --> testdata/options/uinterpreted.proto:22:12 + --> testdata/options/uinterpreted.proto:8:12 | -22 | option uninterpreted_option = {}; + 8 | option uninterpreted_option = {}; | ^^^^^^^^^^^^^^^^^^^^ = help: `uninterpreted_option` is an implementation detail of protoc error: `uninterpreted_option` cannot be set explicitly - --> testdata/options/uinterpreted.proto:24:27 + --> testdata/options/uinterpreted.proto:10:27 | -24 | optional int32 x = 1 [uninterpreted_option = {}]; +10 | optional int32 x = 1 [uninterpreted_option = {}]; | ^^^^^^^^^^^^^^^^^^^^ = help: `uninterpreted_option` is an implementation detail of protoc error: `uninterpreted_option` cannot be set explicitly - --> testdata/options/uinterpreted.proto:25:19 + --> testdata/options/uinterpreted.proto:11:19 | -25 | extensions 2 [uninterpreted_option = {}]; +11 | extensions 2 [uninterpreted_option = {}]; | ^^^^^^^^^^^^^^^^^^^^ = help: `uninterpreted_option` is an implementation detail of protoc error: `uninterpreted_option` cannot be set explicitly - --> testdata/options/uinterpreted.proto:27:16 + --> testdata/options/uinterpreted.proto:13:16 | -27 | option uninterpreted_option = {}; +13 | option uninterpreted_option = {}; | ^^^^^^^^^^^^^^^^^^^^ = help: `uninterpreted_option` is an implementation detail of protoc error: `uninterpreted_option` cannot be set explicitly - --> testdata/options/uinterpreted.proto:33:12 + --> testdata/options/uinterpreted.proto:19:12 | -33 | option uninterpreted_option = {}; +19 | option uninterpreted_option = {}; | ^^^^^^^^^^^^^^^^^^^^ = help: `uninterpreted_option` is an implementation detail of protoc error: `uninterpreted_option` cannot be set explicitly - --> testdata/options/uinterpreted.proto:35:12 + --> testdata/options/uinterpreted.proto:21:12 | -35 | Z = 0 [uninterpreted_option = {}]; +21 | Z = 0 [uninterpreted_option = {}]; | ^^^^^^^^^^^^^^^^^^^^ = help: `uninterpreted_option` is an implementation detail of protoc error: `uninterpreted_option` cannot be set explicitly - --> testdata/options/uinterpreted.proto:39:12 + --> testdata/options/uinterpreted.proto:25:12 | -39 | option uninterpreted_option = {}; +25 | option uninterpreted_option = {}; | ^^^^^^^^^^^^^^^^^^^^ = help: `uninterpreted_option` is an implementation detail of protoc error: `uninterpreted_option` cannot be set explicitly - --> testdata/options/uinterpreted.proto:41:16 + --> testdata/options/uinterpreted.proto:27:16 | -41 | option uninterpreted_option = {}; +27 | option uninterpreted_option = {}; | ^^^^^^^^^^^^^^^^^^^^ = help: `uninterpreted_option` is an implementation detail of protoc diff --git a/experimental/ir/testdata/options/utf8.proto b/experimental/ir/testdata/options/utf8.proto index 3c68b73aa..36687e3e3 100644 --- a/experimental/ir/testdata/options/utf8.proto +++ b/experimental/ir/testdata/options/utf8.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true edition = "2023"; diff --git a/experimental/ir/testdata/options/utf8.proto.stderr.txt b/experimental/ir/testdata/options/utf8.proto.stderr.txt index 425f375d2..0c37fd961 100644 --- a/experimental/ir/testdata/options/utf8.proto.stderr.txt +++ b/experimental/ir/testdata/options/utf8.proto.stderr.txt @@ -1,30 +1,30 @@ error: non-UTF-8 string literal - --> testdata/options/utf8.proto:22:51 + --> testdata/options/utf8.proto:8:51 | -22 | option (e).default = "this is not a valid escape: \xff"; + 8 | option (e).default = "this is not a valid escape: \xff"; | ^^^^ non-UTF-8 byte -23 | option (e).verify = "this is not a valid escape: \xff"; + 9 | option (e).verify = "this is not a valid escape: \xff"; ... -27 | string default = 1; +13 | string default = 1; | ------------------- this field requires a UTF-8 string | - ::: testdata/options/utf8.proto:16:11 + ::: testdata/options/utf8.proto:2:11 | -16 | edition = "2023"; + 2 | edition = "2023"; | ------ UTF-8 required here error: non-UTF-8 string literal - --> testdata/options/utf8.proto:23:50 + --> testdata/options/utf8.proto:9:50 | -23 | option (e).verify = "this is not a valid escape: \xff"; + 9 | option (e).verify = "this is not a valid escape: \xff"; | ^^^^ non-UTF-8 byte -24 | option (e).none = "this one is valid here: \xff"; +10 | option (e).none = "this one is valid here: \xff"; ... -27 | string default = 1; -28 | / string verify = 2 [ -29 | | features.utf8_validation = VERIFY +13 | string default = 1; +14 | / string verify = 2 [ +15 | | features.utf8_validation = VERIFY | | ------ UTF-8 required here -30 | | ]; +16 | | ]; | \______- this field requires a UTF-8 string encountered 2 errors diff --git a/experimental/ir/testdata/options/validate/ctype_2023.proto b/experimental/ir/testdata/options/validate/ctype_2023.proto index 2bac9c742..e3017b975 100644 --- a/experimental/ir/testdata/options/validate/ctype_2023.proto +++ b/experimental/ir/testdata/options/validate/ctype_2023.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package buf.test; diff --git a/experimental/ir/testdata/options/validate/ctype_2023.proto.stderr.txt b/experimental/ir/testdata/options/validate/ctype_2023.proto.stderr.txt index 8aa7dedf6..597e0be47 100644 --- a/experimental/ir/testdata/options/validate/ctype_2023.proto.stderr.txt +++ b/experimental/ir/testdata/options/validate/ctype_2023.proto.stderr.txt @@ -1,60 +1,60 @@ warning: `ctype` is deprecated in Edition 2023 - --> testdata/options/validate/ctype_2023.proto:20:21 + --> testdata/options/validate/ctype_2023.proto:6:21 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -20 | string foo = 1 [ctype = STRING]; + 6 | string foo = 1 [ctype = STRING]; | ^^^^^ help: replace with `features.(pb.cpp).string_type` | -20 | - string foo = 1 [ctype = STRING]; -20 | + string foo = 1 [features.(pb.cpp).string_type = STRING]; + 6 | - string foo = 1 [ctype = STRING]; + 6 | + string foo = 1 [features.(pb.cpp).string_type = STRING]; | = help: deprecated since Edition 2023, to be removed in Edition 2024 warning: `ctype` is deprecated in Edition 2023 - --> testdata/options/validate/ctype_2023.proto:21:21 + --> testdata/options/validate/ctype_2023.proto:7:21 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -20 | string foo = 1 [ctype = STRING]; -21 | string bar = 2 [ctype = CORD]; + 6 | string foo = 1 [ctype = STRING]; + 7 | string bar = 2 [ctype = CORD]; | ^^^^^ help: replace with `features.(pb.cpp).string_type` | -21 | - string bar = 2 [ctype = CORD]; -21 | + string bar = 2 [features.(pb.cpp).string_type = CORD]; + 7 | - string bar = 2 [ctype = CORD]; + 7 | + string bar = 2 [features.(pb.cpp).string_type = CORD]; | = help: deprecated since Edition 2023, to be removed in Edition 2024 warning: `ctype` is deprecated in Edition 2023 - --> testdata/options/validate/ctype_2023.proto:22:21 + --> testdata/options/validate/ctype_2023.proto:8:21 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -21 | string bar = 2 [ctype = CORD]; -22 | string baz = 3 [ctype = STRING_PIECE]; + 7 | string bar = 2 [ctype = CORD]; + 8 | string baz = 3 [ctype = STRING_PIECE]; | ^^^^^ help: replace with `features.(pb.cpp).string_type` | -22 | - string baz = 3 [ctype = STRING_PIECE]; -22 | + string baz = 3 [features.(pb.cpp).string_type = VIEW]; + 8 | - string baz = 3 [ctype = STRING_PIECE]; + 8 | + string baz = 3 [features.(pb.cpp).string_type = VIEW]; | = help: deprecated since Edition 2023, to be removed in Edition 2024 error: expected `string` or `bytes`, found scalar type `int32` - --> testdata/options/validate/ctype_2023.proto:24:5 + --> testdata/options/validate/ctype_2023.proto:10:5 | -24 | int32 i = 4 [ctype = CORD]; +10 | int32 i = 4 [ctype = CORD]; | ^^^^^ ----- `ctype` set here error: cannot use `CORD` on an extension field - --> testdata/options/validate/ctype_2023.proto:30:5 + --> testdata/options/validate/ctype_2023.proto:16:5 | -30 | string x = 5 [ctype = CORD]; +16 | string x = 5 [ctype = CORD]; | ^^^^^^^^^^^^^^^^^^^^^^----^^ | | | `CORD` set here diff --git a/experimental/ir/testdata/options/validate/ctype_2024.proto b/experimental/ir/testdata/options/validate/ctype_2024.proto index ef11a3a4a..ceb90dd6a 100644 --- a/experimental/ir/testdata/options/validate/ctype_2024.proto +++ b/experimental/ir/testdata/options/validate/ctype_2024.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2024"; package buf.test; diff --git a/experimental/ir/testdata/options/validate/ctype_2024.proto.stderr.txt b/experimental/ir/testdata/options/validate/ctype_2024.proto.stderr.txt index 336119559..a5d41f740 100644 --- a/experimental/ir/testdata/options/validate/ctype_2024.proto.stderr.txt +++ b/experimental/ir/testdata/options/validate/ctype_2024.proto.stderr.txt @@ -1,47 +1,47 @@ error: `ctype` is not supported in Edition 2024 - --> testdata/options/validate/ctype_2024.proto:20:21 + --> testdata/options/validate/ctype_2024.proto:6:21 | -15 | edition = "2024"; + 1 | edition = "2024"; | ------ edition specified here ... -20 | string foo = 1 [ctype = STRING]; + 6 | string foo = 1 [ctype = STRING]; | ^^^^^ help: replace with `features.(pb.cpp).string_type` | -20 | - string foo = 1 [ctype = STRING]; -20 | + string foo = 1 [features.(pb.cpp).string_type = STRING]; + 6 | - string foo = 1 [ctype = STRING]; + 6 | + string foo = 1 [features.(pb.cpp).string_type = STRING]; | = help: deprecated since Edition 2023, removed in Edition 2024 error: `ctype` is not supported in Edition 2024 - --> testdata/options/validate/ctype_2024.proto:21:21 + --> testdata/options/validate/ctype_2024.proto:7:21 | -15 | edition = "2024"; + 1 | edition = "2024"; | ------ edition specified here ... -20 | string foo = 1 [ctype = STRING]; -21 | string bar = 2 [ctype = CORD]; + 6 | string foo = 1 [ctype = STRING]; + 7 | string bar = 2 [ctype = CORD]; | ^^^^^ help: replace with `features.(pb.cpp).string_type` | -21 | - string bar = 2 [ctype = CORD]; -21 | + string bar = 2 [features.(pb.cpp).string_type = CORD]; + 7 | - string bar = 2 [ctype = CORD]; + 7 | + string bar = 2 [features.(pb.cpp).string_type = CORD]; | = help: deprecated since Edition 2023, removed in Edition 2024 error: `ctype` is not supported in Edition 2024 - --> testdata/options/validate/ctype_2024.proto:22:21 + --> testdata/options/validate/ctype_2024.proto:8:21 | -15 | edition = "2024"; + 1 | edition = "2024"; | ------ edition specified here ... -21 | string bar = 2 [ctype = CORD]; -22 | string baz = 3 [ctype = STRING_PIECE]; + 7 | string bar = 2 [ctype = CORD]; + 8 | string baz = 3 [ctype = STRING_PIECE]; | ^^^^^ help: replace with `features.(pb.cpp).string_type` | -22 | - string baz = 3 [ctype = STRING_PIECE]; -22 | + string baz = 3 [features.(pb.cpp).string_type = VIEW]; + 8 | - string baz = 3 [ctype = STRING_PIECE]; + 8 | + string baz = 3 [features.(pb.cpp).string_type = VIEW]; | = help: deprecated since Edition 2023, removed in Edition 2024 diff --git a/experimental/ir/testdata/options/validate/ctype_proto2.proto b/experimental/ir/testdata/options/validate/ctype_proto2.proto index 042f2edcf..3ef92d4d0 100644 --- a/experimental/ir/testdata/options/validate/ctype_proto2.proto +++ b/experimental/ir/testdata/options/validate/ctype_proto2.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package buf.test; diff --git a/experimental/ir/testdata/options/validate/ctype_proto2.proto.stderr.txt b/experimental/ir/testdata/options/validate/ctype_proto2.proto.stderr.txt index cb3d4fabb..fb943d9f9 100644 --- a/experimental/ir/testdata/options/validate/ctype_proto2.proto.stderr.txt +++ b/experimental/ir/testdata/options/validate/ctype_proto2.proto.stderr.txt @@ -1,15 +1,15 @@ warning: expected `string` or `bytes`, found scalar type `int32` - --> testdata/options/validate/ctype_proto2.proto:24:14 + --> testdata/options/validate/ctype_proto2.proto:10:14 | -24 | optional int32 i = 4 [ctype = CORD]; +10 | optional int32 i = 4 [ctype = CORD]; | ^^^^^ ----- `ctype` set here | = help: this becomes a hard error in Edition 2023 warning: cannot use `CORD` on an extension field - --> testdata/options/validate/ctype_proto2.proto:30:5 + --> testdata/options/validate/ctype_proto2.proto:16:5 | -30 | optional string x = 5 [ctype = CORD]; +16 | optional string x = 5 [ctype = CORD]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^----^^ | | | `CORD` set here diff --git a/experimental/ir/testdata/options/validate/enum_names.proto b/experimental/ir/testdata/options/validate/enum_names.proto index 4f0070fb4..2621b29db 100644 --- a/experimental/ir/testdata/options/validate/enum_names.proto +++ b/experimental/ir/testdata/options/validate/enum_names.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true // Regression: camelCase and snake_case enum values that look similar diff --git a/experimental/ir/testdata/options/validate/groups.proto b/experimental/ir/testdata/options/validate/groups.proto index c0ded6fa5..9dccdbc9e 100644 --- a/experimental/ir/testdata/options/validate/groups.proto +++ b/experimental/ir/testdata/options/validate/groups.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package buf.test; diff --git a/experimental/ir/testdata/options/validate/groups.proto.stderr.txt b/experimental/ir/testdata/options/validate/groups.proto.stderr.txt index ea6374256..3b9aed09f 100644 --- a/experimental/ir/testdata/options/validate/groups.proto.stderr.txt +++ b/experimental/ir/testdata/options/validate/groups.proto.stderr.txt @@ -1,15 +1,15 @@ error: expected message type, found scalar type `string` - --> testdata/options/validate/groups.proto:20:5 + --> testdata/options/validate/groups.proto:6:5 | -20 | string x1 = 1 [features.message_encoding = DELIMITED]; + 6 | string x1 = 1 [features.message_encoding = DELIMITED]; | ^^^^^^ ------------------------- `message_encoding` set here | = help: `message_encoding` can only be set on message-typed fields error: expected message type, found map entry type `buf.test.M.X4Entry` - --> testdata/options/validate/groups.proto:23:5 + --> testdata/options/validate/groups.proto:9:5 | -23 | map x4 = 4 [features.message_encoding = DELIMITED]; + 9 | map x4 = 4 [features.message_encoding = DELIMITED]; | ^^^^^^^^^^^^^ ------------------------- | | | `message_encoding` set here diff --git a/experimental/ir/testdata/options/validate/java_multiple_files_2024.proto b/experimental/ir/testdata/options/validate/java_multiple_files_2024.proto index cf0120b63..3427a12d0 100644 --- a/experimental/ir/testdata/options/validate/java_multiple_files_2024.proto +++ b/experimental/ir/testdata/options/validate/java_multiple_files_2024.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2024"; package buf.test; diff --git a/experimental/ir/testdata/options/validate/java_multiple_files_2024.proto.stderr.txt b/experimental/ir/testdata/options/validate/java_multiple_files_2024.proto.stderr.txt index 01a483010..7da0a39dc 100644 --- a/experimental/ir/testdata/options/validate/java_multiple_files_2024.proto.stderr.txt +++ b/experimental/ir/testdata/options/validate/java_multiple_files_2024.proto.stderr.txt @@ -1,15 +1,15 @@ error: `java_multiple_files` is not supported in Edition 2024 - --> testdata/options/validate/java_multiple_files_2024.proto:19:8 + --> testdata/options/validate/java_multiple_files_2024.proto:5:8 | -15 | edition = "2024"; + 1 | edition = "2024"; | ------ edition specified here ... -19 | option java_multiple_files = true; + 5 | option java_multiple_files = true; | ^^^^^^^^^^^^^^^^^^^ help: replace with `features.(pb.java).nest_in_file_class` | -19 | - option java_multiple_files = true; -19 | + option features.(pb.java).nest_in_file_class = YES; + 5 | - option java_multiple_files = true; + 5 | + option features.(pb.java).nest_in_file_class = YES; | = help: deprecated since Edition 2023, removed in Edition 2024 = help: `java_multiple_files` has been replaced with diff --git a/experimental/ir/testdata/options/validate/java_utf8.proto b/experimental/ir/testdata/options/validate/java_utf8.proto index d43012a6e..904bcc3d3 100644 --- a/experimental/ir/testdata/options/validate/java_utf8.proto +++ b/experimental/ir/testdata/options/validate/java_utf8.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package buf.test; diff --git a/experimental/ir/testdata/options/validate/java_utf8.proto.stderr.txt b/experimental/ir/testdata/options/validate/java_utf8.proto.stderr.txt index 3c65071e9..13f3db666 100644 --- a/experimental/ir/testdata/options/validate/java_utf8.proto.stderr.txt +++ b/experimental/ir/testdata/options/validate/java_utf8.proto.stderr.txt @@ -1,11 +1,11 @@ error: cannot set `java_string_check_utf8` in editions mode - --> testdata/options/validate/java_utf8.proto:19:8 + --> testdata/options/validate/java_utf8.proto:5:8 | -19 | option java_string_check_utf8 = true; + 5 | option java_string_check_utf8 = true; | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with `features.(pb.java).utf8_validation` | -19 | - option java_string_check_utf8 = true; -19 | + option features.(pb.java).utf8_validation = VERIFY; + 5 | - option java_string_check_utf8 = true; + 5 | + option features.(pb.java).utf8_validation = VERIFY; encountered 1 error diff --git a/experimental/ir/testdata/options/validate/jstype.proto b/experimental/ir/testdata/options/validate/jstype.proto index 80dfdf6fc..981828288 100644 --- a/experimental/ir/testdata/options/validate/jstype.proto +++ b/experimental/ir/testdata/options/validate/jstype.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package buf.test; diff --git a/experimental/ir/testdata/options/validate/jstype.proto.stderr.txt b/experimental/ir/testdata/options/validate/jstype.proto.stderr.txt index 5d7a3a70f..ae37a2cba 100644 --- a/experimental/ir/testdata/options/validate/jstype.proto.stderr.txt +++ b/experimental/ir/testdata/options/validate/jstype.proto.stderr.txt @@ -1,7 +1,7 @@ error: expected 64-bit integer type, found scalar type `int32` - --> testdata/options/validate/jstype.proto:22:5 + --> testdata/options/validate/jstype.proto:8:5 | -22 | int32 x1 = 1 [jstype = JS_NUMBER]; + 8 | int32 x1 = 1 [jstype = JS_NUMBER]; | ^^^^^ ------ `jstype` set here | = help: `jstype` is specifically for controlling the formatting of large @@ -9,9 +9,9 @@ error: expected 64-bit integer type, found scalar type `int32` into 64-bit IEEE 754 floats error: expected 64-bit integer type, found scalar type `uint32` - --> testdata/options/validate/jstype.proto:24:5 + --> testdata/options/validate/jstype.proto:10:5 | -24 | uint32 x3 = 3 [jstype = JS_NUMBER]; +10 | uint32 x3 = 3 [jstype = JS_NUMBER]; | ^^^^^^ ------ `jstype` set here | = help: `jstype` is specifically for controlling the formatting of large @@ -19,9 +19,9 @@ error: expected 64-bit integer type, found scalar type `uint32` into 64-bit IEEE 754 floats error: expected 64-bit integer type, found scalar type `sint32` - --> testdata/options/validate/jstype.proto:26:5 + --> testdata/options/validate/jstype.proto:12:5 | -26 | sint32 x5 = 5 [jstype = JS_NUMBER]; +12 | sint32 x5 = 5 [jstype = JS_NUMBER]; | ^^^^^^ ------ `jstype` set here | = help: `jstype` is specifically for controlling the formatting of large @@ -29,9 +29,9 @@ error: expected 64-bit integer type, found scalar type `sint32` into 64-bit IEEE 754 floats error: expected 64-bit integer type, found scalar type `fixed32` - --> testdata/options/validate/jstype.proto:28:5 + --> testdata/options/validate/jstype.proto:14:5 | -28 | fixed32 x7 = 7 [jstype = JS_NUMBER]; +14 | fixed32 x7 = 7 [jstype = JS_NUMBER]; | ^^^^^^^ ------ `jstype` set here | = help: `jstype` is specifically for controlling the formatting of large @@ -39,9 +39,9 @@ error: expected 64-bit integer type, found scalar type `fixed32` into 64-bit IEEE 754 floats error: expected 64-bit integer type, found scalar type `sfixed32` - --> testdata/options/validate/jstype.proto:30:5 + --> testdata/options/validate/jstype.proto:16:5 | -30 | sfixed32 x9 = 9 [jstype = JS_NUMBER]; +16 | sfixed32 x9 = 9 [jstype = JS_NUMBER]; | ^^^^^^^^ ------ `jstype` set here | = help: `jstype` is specifically for controlling the formatting of large @@ -49,9 +49,9 @@ error: expected 64-bit integer type, found scalar type `sfixed32` into 64-bit IEEE 754 floats error: expected 64-bit integer type, found scalar type `float` - --> testdata/options/validate/jstype.proto:32:5 + --> testdata/options/validate/jstype.proto:18:5 | -32 | float x11 = 11 [jstype = JS_NUMBER]; +18 | float x11 = 11 [jstype = JS_NUMBER]; | ^^^^^ ------ `jstype` set here | = help: `jstype` is specifically for controlling the formatting of large @@ -59,9 +59,9 @@ error: expected 64-bit integer type, found scalar type `float` into 64-bit IEEE 754 floats error: expected 64-bit integer type, found scalar type `double` - --> testdata/options/validate/jstype.proto:33:5 + --> testdata/options/validate/jstype.proto:19:5 | -33 | double x12 = 12 [jstype = JS_NUMBER]; +19 | double x12 = 12 [jstype = JS_NUMBER]; | ^^^^^^ ------ `jstype` set here | = help: `jstype` is specifically for controlling the formatting of large @@ -69,9 +69,9 @@ error: expected 64-bit integer type, found scalar type `double` into 64-bit IEEE 754 floats error: expected 64-bit integer type, found scalar type `string` - --> testdata/options/validate/jstype.proto:34:5 + --> testdata/options/validate/jstype.proto:20:5 | -34 | string x13 = 13 [jstype = JS_NUMBER]; +20 | string x13 = 13 [jstype = JS_NUMBER]; | ^^^^^^ ------ `jstype` set here | = help: `jstype` is specifically for controlling the formatting of large @@ -79,9 +79,9 @@ error: expected 64-bit integer type, found scalar type `string` into 64-bit IEEE 754 floats error: expected 64-bit integer type, found scalar type `bytes` - --> testdata/options/validate/jstype.proto:35:5 + --> testdata/options/validate/jstype.proto:21:5 | -35 | bytes x14 = 14 [jstype = JS_NUMBER]; +21 | bytes x14 = 14 [jstype = JS_NUMBER]; | ^^^^^ ------ `jstype` set here | = help: `jstype` is specifically for controlling the formatting of large @@ -89,9 +89,9 @@ error: expected 64-bit integer type, found scalar type `bytes` into 64-bit IEEE 754 floats error: expected 64-bit integer type, found scalar type `bool` - --> testdata/options/validate/jstype.proto:36:5 + --> testdata/options/validate/jstype.proto:22:5 | -36 | bool x15 = 15 [jstype = JS_NUMBER]; +22 | bool x15 = 15 [jstype = JS_NUMBER]; | ^^^^ ------ `jstype` set here | = help: `jstype` is specifically for controlling the formatting of large @@ -99,9 +99,9 @@ error: expected 64-bit integer type, found scalar type `bool` into 64-bit IEEE 754 floats error: expected 64-bit integer type, found enum type `buf.test.M.E` - --> testdata/options/validate/jstype.proto:37:5 + --> testdata/options/validate/jstype.proto:23:5 | -37 | E x16 = 16 [jstype = JS_NUMBER]; +23 | E x16 = 16 [jstype = JS_NUMBER]; | ^ ------ `jstype` set here | = help: `jstype` is specifically for controlling the formatting of large @@ -109,9 +109,9 @@ error: expected 64-bit integer type, found enum type `buf.test.M.E` into 64-bit IEEE 754 floats error: expected 64-bit integer type, found message type `buf.test.M` - --> testdata/options/validate/jstype.proto:38:5 + --> testdata/options/validate/jstype.proto:24:5 | -38 | M x17 = 17 [jstype = JS_NUMBER]; +24 | M x17 = 17 [jstype = JS_NUMBER]; | ^ ------ `jstype` set here | = help: `jstype` is specifically for controlling the formatting of large diff --git a/experimental/ir/testdata/options/validate/lazy.proto b/experimental/ir/testdata/options/validate/lazy.proto index af9da474f..42182a484 100644 --- a/experimental/ir/testdata/options/validate/lazy.proto +++ b/experimental/ir/testdata/options/validate/lazy.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package buf.test; diff --git a/experimental/ir/testdata/options/validate/lazy.proto.stderr.txt b/experimental/ir/testdata/options/validate/lazy.proto.stderr.txt index 7598c56ae..d88887f00 100644 --- a/experimental/ir/testdata/options/validate/lazy.proto.stderr.txt +++ b/experimental/ir/testdata/options/validate/lazy.proto.stderr.txt @@ -1,14 +1,14 @@ error: expected length-prefixed field - --> testdata/options/validate/lazy.proto:22:5 + --> testdata/options/validate/lazy.proto:8:5 | -22 | M m1 = 1 [lazy = true]; + 8 | M m1 = 1 [lazy = true]; | ^^^^^^^^^^----^^^^^^^^^ | | | `lazy` set here | - ::: testdata/options/validate/lazy.proto:19:36 + ::: testdata/options/validate/lazy.proto:5:36 | -19 | option features.message_encoding = DELIMITED; + 5 | option features.message_encoding = DELIMITED; | --------- | | | set to use delimited encoding here @@ -16,16 +16,16 @@ error: expected length-prefixed field = help: `lazy` only makes sense for length-prefixed messages error: expected length-prefixed field - --> testdata/options/validate/lazy.proto:23:5 + --> testdata/options/validate/lazy.proto:9:5 | -23 | M m2 = 2 [unverified_lazy = true]; + 9 | M m2 = 2 [unverified_lazy = true]; | ^^^^^^^^^^---------------^^^^^^^^^ | | | `unverified_lazy` set here | - ::: testdata/options/validate/lazy.proto:19:36 + ::: testdata/options/validate/lazy.proto:5:36 | -19 | option features.message_encoding = DELIMITED; + 5 | option features.message_encoding = DELIMITED; | --------- | | | set to use delimited encoding here @@ -33,9 +33,9 @@ error: expected length-prefixed field = help: `unverified_lazy` only makes sense for length-prefixed messages error: expected length-prefixed field - --> testdata/options/validate/lazy.proto:25:5 + --> testdata/options/validate/lazy.proto:11:5 | -25 | M m3 = 3 [lazy = true, features.message_encoding = DELIMITED]; +11 | M m3 = 3 [lazy = true, features.message_encoding = DELIMITED]; | ^^^^^^^^^^----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------^^ | | | | `lazy` set here set to use delimited encoding here @@ -43,9 +43,9 @@ error: expected length-prefixed field = help: `lazy` only makes sense for length-prefixed messages error: expected length-prefixed field - --> testdata/options/validate/lazy.proto:26:5 + --> testdata/options/validate/lazy.proto:12:5 | -26 | M m4 = 4 [unverified_lazy = true, features.message_encoding = DELIMITED]; +12 | M m4 = 4 [unverified_lazy = true, features.message_encoding = DELIMITED]; | ^^^^^^^^^^---------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------^^ | | | | `unverified_lazy` set here set to use delimited encoding here @@ -53,24 +53,24 @@ error: expected length-prefixed field = help: `unverified_lazy` only makes sense for length-prefixed messages error: expected message type, found scalar type `int32` - --> testdata/options/validate/lazy.proto:31:5 + --> testdata/options/validate/lazy.proto:17:5 | -31 | int32 x1 = 7 [lazy = true]; +17 | int32 x1 = 7 [lazy = true]; | ^^^^^ ---- `lazy` set here | = help: `lazy` can only be set on message-typed fields error: expected length-prefixed field - --> testdata/options/validate/lazy.proto:31:5 + --> testdata/options/validate/lazy.proto:17:5 | -31 | int32 x1 = 7 [lazy = true]; +17 | int32 x1 = 7 [lazy = true]; | ^^^^^^^^^^^^^^----^^^^^^^^^ | | | `lazy` set here | - ::: testdata/options/validate/lazy.proto:19:36 + ::: testdata/options/validate/lazy.proto:5:36 | -19 | option features.message_encoding = DELIMITED; + 5 | option features.message_encoding = DELIMITED; | --------- | | | set to use delimited encoding here @@ -78,24 +78,24 @@ error: expected length-prefixed field = help: `lazy` only makes sense for length-prefixed messages error: expected message type, found scalar type `int32` - --> testdata/options/validate/lazy.proto:32:5 + --> testdata/options/validate/lazy.proto:18:5 | -32 | int32 x2 = 8 [unverified_lazy = true]; +18 | int32 x2 = 8 [unverified_lazy = true]; | ^^^^^ --------------- `unverified_lazy` set here | = help: `unverified_lazy` can only be set on message-typed fields error: expected length-prefixed field - --> testdata/options/validate/lazy.proto:32:5 + --> testdata/options/validate/lazy.proto:18:5 | -32 | int32 x2 = 8 [unverified_lazy = true]; +18 | int32 x2 = 8 [unverified_lazy = true]; | ^^^^^^^^^^^^^^---------------^^^^^^^^^ | | | `unverified_lazy` set here | - ::: testdata/options/validate/lazy.proto:19:36 + ::: testdata/options/validate/lazy.proto:5:36 | -19 | option features.message_encoding = DELIMITED; + 5 | option features.message_encoding = DELIMITED; | --------- | | | set to use delimited encoding here @@ -103,16 +103,16 @@ error: expected length-prefixed field = help: `unverified_lazy` only makes sense for length-prefixed messages warning: expected length-prefixed field - --> testdata/options/validate/lazy.proto:36:5 + --> testdata/options/validate/lazy.proto:22:5 | -36 | M m1 = 1 [lazy = false]; +22 | M m1 = 1 [lazy = false]; | ^^^^^^^^^^----^^^^^^^^^^ | | | `lazy` set here | - ::: testdata/options/validate/lazy.proto:19:36 + ::: testdata/options/validate/lazy.proto:5:36 | -19 | option features.message_encoding = DELIMITED; + 5 | option features.message_encoding = DELIMITED; | --------- | | | set to use delimited encoding here @@ -120,16 +120,16 @@ warning: expected length-prefixed field = help: `lazy` only makes sense for length-prefixed messages warning: expected length-prefixed field - --> testdata/options/validate/lazy.proto:37:5 + --> testdata/options/validate/lazy.proto:23:5 | -37 | M m2 = 2 [unverified_lazy = false]; +23 | M m2 = 2 [unverified_lazy = false]; | ^^^^^^^^^^---------------^^^^^^^^^^ | | | `unverified_lazy` set here | - ::: testdata/options/validate/lazy.proto:19:36 + ::: testdata/options/validate/lazy.proto:5:36 | -19 | option features.message_encoding = DELIMITED; + 5 | option features.message_encoding = DELIMITED; | --------- | | | set to use delimited encoding here @@ -137,9 +137,9 @@ warning: expected length-prefixed field = help: `unverified_lazy` only makes sense for length-prefixed messages warning: expected length-prefixed field - --> testdata/options/validate/lazy.proto:39:5 + --> testdata/options/validate/lazy.proto:25:5 | -39 | M m3 = 3 [lazy = false, features.message_encoding = DELIMITED]; +25 | M m3 = 3 [lazy = false, features.message_encoding = DELIMITED]; | ^^^^^^^^^^----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------^^ | | | | `lazy` set here set to use delimited encoding here @@ -147,9 +147,9 @@ warning: expected length-prefixed field = help: `lazy` only makes sense for length-prefixed messages warning: expected length-prefixed field - --> testdata/options/validate/lazy.proto:40:5 + --> testdata/options/validate/lazy.proto:26:5 | -40 | M m4 = 4 [unverified_lazy = false, features.message_encoding = DELIMITED]; +26 | M m4 = 4 [unverified_lazy = false, features.message_encoding = DELIMITED]; | ^^^^^^^^^^---------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------^^ | | | | `unverified_lazy` set here set to use delimited encoding here @@ -157,24 +157,24 @@ warning: expected length-prefixed field = help: `unverified_lazy` only makes sense for length-prefixed messages warning: expected message type, found scalar type `int32` - --> testdata/options/validate/lazy.proto:45:5 + --> testdata/options/validate/lazy.proto:31:5 | -45 | int32 x1 = 7 [lazy = false]; +31 | int32 x1 = 7 [lazy = false]; | ^^^^^ ---- `lazy` set here | = help: `lazy` can only be set on message-typed fields warning: expected length-prefixed field - --> testdata/options/validate/lazy.proto:45:5 + --> testdata/options/validate/lazy.proto:31:5 | -45 | int32 x1 = 7 [lazy = false]; +31 | int32 x1 = 7 [lazy = false]; | ^^^^^^^^^^^^^^----^^^^^^^^^^ | | | `lazy` set here | - ::: testdata/options/validate/lazy.proto:19:36 + ::: testdata/options/validate/lazy.proto:5:36 | -19 | option features.message_encoding = DELIMITED; + 5 | option features.message_encoding = DELIMITED; | --------- | | | set to use delimited encoding here @@ -182,24 +182,24 @@ warning: expected length-prefixed field = help: `lazy` only makes sense for length-prefixed messages warning: expected message type, found scalar type `int32` - --> testdata/options/validate/lazy.proto:46:5 + --> testdata/options/validate/lazy.proto:32:5 | -46 | int32 x2 = 8 [unverified_lazy = false]; +32 | int32 x2 = 8 [unverified_lazy = false]; | ^^^^^ --------------- `unverified_lazy` set here | = help: `unverified_lazy` can only be set on message-typed fields warning: expected length-prefixed field - --> testdata/options/validate/lazy.proto:46:5 + --> testdata/options/validate/lazy.proto:32:5 | -46 | int32 x2 = 8 [unverified_lazy = false]; +32 | int32 x2 = 8 [unverified_lazy = false]; | ^^^^^^^^^^^^^^---------------^^^^^^^^^^ | | | `unverified_lazy` set here | - ::: testdata/options/validate/lazy.proto:19:36 + ::: testdata/options/validate/lazy.proto:5:36 | -19 | option features.message_encoding = DELIMITED; + 5 | option features.message_encoding = DELIMITED; | --------- | | | set to use delimited encoding here diff --git a/experimental/ir/testdata/options/validate/lazy_group.proto b/experimental/ir/testdata/options/validate/lazy_group.proto index c01a7d426..55145ef4c 100644 --- a/experimental/ir/testdata/options/validate/lazy_group.proto +++ b/experimental/ir/testdata/options/validate/lazy_group.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package buf.test; diff --git a/experimental/ir/testdata/options/validate/lazy_group.proto.stderr.txt b/experimental/ir/testdata/options/validate/lazy_group.proto.stderr.txt index 53880f3fc..2af1d55e1 100644 --- a/experimental/ir/testdata/options/validate/lazy_group.proto.stderr.txt +++ b/experimental/ir/testdata/options/validate/lazy_group.proto.stderr.txt @@ -1,21 +1,21 @@ warning: group syntax is deprecated - --> testdata/options/validate/lazy_group.proto:20:14 + --> testdata/options/validate/lazy_group.proto:6:14 | -20 | optional group G1 = 1 [lazy = true] {}; + 6 | optional group G1 = 1 [lazy = true] {}; | ^^^^^ = note: group syntax is not available in proto3 or editions warning: group syntax is deprecated - --> testdata/options/validate/lazy_group.proto:21:14 + --> testdata/options/validate/lazy_group.proto:7:14 | -21 | optional group G2 = 2 [lazy = false] {}; + 7 | optional group G2 = 2 [lazy = false] {}; | ^^^^^ = note: group syntax is not available in proto3 or editions error: expected length-prefixed field - --> testdata/options/validate/lazy_group.proto:20:5 + --> testdata/options/validate/lazy_group.proto:6:5 | -20 | optional group G1 = 1 [lazy = true] {}; + 6 | optional group G1 = 1 [lazy = true] {}; | ^^^^^^^^^-----^^^^^^^^^----^^^^^^^^^^^ | | | | groups are not length-prefixed @@ -25,9 +25,9 @@ error: expected length-prefixed field = help: `lazy` only makes sense for length-prefixed messages warning: expected length-prefixed field - --> testdata/options/validate/lazy_group.proto:21:5 + --> testdata/options/validate/lazy_group.proto:7:5 | -21 | optional group G2 = 2 [lazy = false] {}; + 7 | optional group G2 = 2 [lazy = false] {}; | ^^^^^^^^^-----^^^^^^^^^----^^^^^^^^^^^^ | | | | groups are not length-prefixed diff --git a/experimental/ir/testdata/options/validate/optimize_lite.proto.yaml b/experimental/ir/testdata/options/validate/optimize_lite.proto.yaml index 6b2597c61..0024f834b 100644 --- a/experimental/ir/testdata/options/validate/optimize_lite.proto.yaml +++ b/experimental/ir/testdata/options/validate/optimize_lite.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - errors_only: true filters: ["unused import"] files: diff --git a/experimental/ir/testdata/options/validate/packed_2023.proto b/experimental/ir/testdata/options/validate/packed_2023.proto index 953882ddd..cc667deea 100644 --- a/experimental/ir/testdata/options/validate/packed_2023.proto +++ b/experimental/ir/testdata/options/validate/packed_2023.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package buf.test; diff --git a/experimental/ir/testdata/options/validate/packed_2023.proto.stderr.txt b/experimental/ir/testdata/options/validate/packed_2023.proto.stderr.txt index 497663070..dde08a11e 100644 --- a/experimental/ir/testdata/options/validate/packed_2023.proto.stderr.txt +++ b/experimental/ir/testdata/options/validate/packed_2023.proto.stderr.txt @@ -1,25 +1,25 @@ error: expected repeated field, found singular field - --> testdata/options/validate/packed_2023.proto:22:5 + --> testdata/options/validate/packed_2023.proto:8:5 | -22 | int32 o1 = 1 [features.repeated_field_encoding = PACKED]; + 8 | int32 o1 = 1 [features.repeated_field_encoding = PACKED]; | ^^^^^ -------------------------------- packed encoding set here | = help: packed encoding can only be set on repeated fields of integer, float, `bool`, or enum type error: expected repeated field, found singular field - --> testdata/options/validate/packed_2023.proto:23:5 + --> testdata/options/validate/packed_2023.proto:9:5 | -23 | int32 o2 = 2 [features.repeated_field_encoding = EXPANDED]; + 9 | int32 o2 = 2 [features.repeated_field_encoding = EXPANDED]; | ^^^^^ -------------------------------- packed encoding set here | = help: packed encoding can only be set on repeated fields of integer, float, `bool`, or enum type error: expected packable type, found message type `buf.test.M` - --> testdata/options/validate/packed_2023.proto:25:14 + --> testdata/options/validate/packed_2023.proto:11:14 | -25 | repeated M m1 = 3 [features.repeated_field_encoding = PACKED]; +11 | repeated M m1 = 3 [features.repeated_field_encoding = PACKED]; | ^ -------------------------------- | | | packed encoding set here @@ -28,40 +28,40 @@ error: expected packable type, found message type `buf.test.M` `bool`, or enum type error: `packed` is not supported in Edition 2023 - --> testdata/options/validate/packed_2023.proto:34:28 + --> testdata/options/validate/packed_2023.proto:20:28 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -34 | repeated float f3 = 9 [packed = true]; +20 | repeated float f3 = 9 [packed = true]; | ^^^^^^ help: replace with `repeated_field_encoding` | -34 | - repeated float f3 = 9 [packed = true]; -34 | + repeated float f3 = 9 [repeated_field_encoding = PACKED]; +20 | - repeated float f3 = 9 [packed = true]; +20 | + repeated float f3 = 9 [repeated_field_encoding = PACKED]; | = help: removed in Edition 2023 error: `packed` is not supported in Edition 2023 - --> testdata/options/validate/packed_2023.proto:35:29 + --> testdata/options/validate/packed_2023.proto:21:29 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ edition specified here ... -34 | repeated float f3 = 9 [packed = true]; -35 | repeated float f4 = 10 [packed = false]; +20 | repeated float f3 = 9 [packed = true]; +21 | repeated float f4 = 10 [packed = false]; | ^^^^^^ help: replace with `repeated_field_encoding` | -35 | - repeated float f4 = 10 [packed = false]; -35 | + repeated float f4 = 10 [repeated_field_encoding = EXPANDED]; +21 | - repeated float f4 = 10 [packed = false]; +21 | + repeated float f4 = 10 [repeated_field_encoding = EXPANDED]; | = help: removed in Edition 2023 error: expected packable type, found scalar type `string` - --> testdata/options/validate/packed_2023.proto:37:14 + --> testdata/options/validate/packed_2023.proto:23:14 | -37 | repeated string s1 = 11 [features.repeated_field_encoding = PACKED]; +23 | repeated string s1 = 11 [features.repeated_field_encoding = PACKED]; | ^^^^^^ -------------------------------- | | | packed encoding set here diff --git a/experimental/ir/testdata/options/validate/packed_proto2.proto b/experimental/ir/testdata/options/validate/packed_proto2.proto index 1073dbb52..5599441bd 100644 --- a/experimental/ir/testdata/options/validate/packed_proto2.proto +++ b/experimental/ir/testdata/options/validate/packed_proto2.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package buf.test; diff --git a/experimental/ir/testdata/options/validate/packed_proto2.proto.stderr.txt b/experimental/ir/testdata/options/validate/packed_proto2.proto.stderr.txt index ddb9f65ce..5bb7bb875 100644 --- a/experimental/ir/testdata/options/validate/packed_proto2.proto.stderr.txt +++ b/experimental/ir/testdata/options/validate/packed_proto2.proto.stderr.txt @@ -1,16 +1,16 @@ error: expected repeated field, found singular field - --> testdata/options/validate/packed_proto2.proto:22:5 + --> testdata/options/validate/packed_proto2.proto:8:5 | -22 | optional int32 o1 = 1 [packed = true]; + 8 | optional int32 o1 = 1 [packed = true]; | ^^^^^^^^^^^^^^ ---- packed encoding set here | = help: packed encoding can only be set on repeated fields of integer, float, `bool`, or enum type error: expected packable type, found message type `buf.test.M` - --> testdata/options/validate/packed_proto2.proto:25:14 + --> testdata/options/validate/packed_proto2.proto:11:14 | -25 | repeated M m1 = 3 [packed = true]; +11 | repeated M m1 = 3 [packed = true]; | ^ ---- packed encoding set here | = help: packed encoding can only be set on repeated fields of integer, float, diff --git a/experimental/ir/testdata/options/validate/presence.proto b/experimental/ir/testdata/options/validate/presence.proto index e8c6fa753..71134f9a6 100644 --- a/experimental/ir/testdata/options/validate/presence.proto +++ b/experimental/ir/testdata/options/validate/presence.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package buf.test; diff --git a/experimental/ir/testdata/options/validate/presence.proto.stderr.txt b/experimental/ir/testdata/options/validate/presence.proto.stderr.txt index 0f2debfa3..6b2631d30 100644 --- a/experimental/ir/testdata/options/validate/presence.proto.stderr.txt +++ b/experimental/ir/testdata/options/validate/presence.proto.stderr.txt @@ -1,13 +1,13 @@ error: unexpected `optional` - --> testdata/options/validate/presence.proto:35:5 + --> testdata/options/validate/presence.proto:21:5 | -35 | optional int32 a1 = 10; +21 | optional int32 a1 = 10; | ^^^^^^^^ expected type name or `repeated` | help: delete it | -35 | - optional int32 a1 = 10; -35 | + int32 a1 = 10; +21 | - optional int32 a1 = 10; +21 | + int32 a1 = 10; | | = help: in editions mode, the presence behavior of a singular field is @@ -16,38 +16,38 @@ error: unexpected `optional` = help: see error: unexpected `required` - --> testdata/options/validate/presence.proto:36:5 + --> testdata/options/validate/presence.proto:22:5 | -36 | required int32 a2 = 11; +22 | required int32 a2 = 11; | ^^^^^^^^ expected type name or `repeated` | help: delete it | -36 | - required int32 a2 = 11; -36 | + int32 a2 = 11; +22 | - required int32 a2 = 11; +22 | + int32 a2 = 11; | | = help: required fields are only permitted in proto2; even then, their use is strongly discouraged error: cannot set `LEGACY_REQUIRED` at the file level - --> testdata/options/validate/presence.proto:19:34 + --> testdata/options/validate/presence.proto:5:34 | -19 | option features.field_presence = LEGACY_REQUIRED; + 5 | option features.field_presence = LEGACY_REQUIRED; | ^^^^^^^^^^^^^^^ error: expected singular field, found repeated field - --> testdata/options/validate/presence.proto:22:5 + --> testdata/options/validate/presence.proto:8:5 | -22 | repeated int32 x = 1 [features.field_presence = EXPLICIT]; + 8 | repeated int32 x = 1 [features.field_presence = EXPLICIT]; | ^^^^^^^^^^^^^^ ----------------------- `field_presence` set here | = help: `field_presence` can only be set on singular fields error: expected singular field, found map field - --> testdata/options/validate/presence.proto:23:5 + --> testdata/options/validate/presence.proto:9:5 | -23 | map y = 2 [features.field_presence = EXPLICIT]; + 9 | map y = 2 [features.field_presence = EXPLICIT]; | ^^^^^^^^^^^^^^^^^ ----------------------- | | | `field_presence` set here @@ -55,23 +55,23 @@ error: expected singular field, found map field = help: `field_presence` can only be set on singular fields error: expected singular field, found oneof member - --> testdata/options/validate/presence.proto:26:9 + --> testdata/options/validate/presence.proto:12:9 | -25 | / oneof o { -26 | | int32 z = 3 [features.field_presence = EXPLICIT]; +11 | / oneof o { +12 | | int32 z = 3 [features.field_presence = EXPLICIT]; | | ^^^^^^^^^^^^^-----------------------^^^^^^^^^^^^^ | | | | | `field_presence` set here -27 | | } +13 | | } | \_____- defined in this oneof | = help: `field_presence` cannot be set on oneof members = help: all oneof members have explicit presence error: expected message type, found message type `buf.test.Foo` - --> testdata/options/validate/presence.proto:31:5 + --> testdata/options/validate/presence.proto:17:5 | -31 | Foo m = 5 [features.field_presence = IMPLICIT]; +17 | Foo m = 5 [features.field_presence = IMPLICIT]; | ^^^ -------- | --- | | | @@ -80,17 +80,17 @@ error: expected message type, found message type `buf.test.Foo` = help: all message-typed fields explicit presence warning: required fields are deprecated - --> testdata/options/validate/presence.proto:33:44 + --> testdata/options/validate/presence.proto:19:44 | -33 | int32 r = 6 [features.field_presence = LEGACY_REQUIRED]; +19 | int32 r = 6 [features.field_presence = LEGACY_REQUIRED]; | ^^^^^^^^^^^^^^^ = help: do not attempt to change this to `EXPLICIT` if the field is already in-use; doing so is a wire protocol break error: expected singular field, found extension - --> testdata/options/validate/presence.proto:40:5 + --> testdata/options/validate/presence.proto:26:5 | -40 | int32 e = 4 [features.field_presence = EXPLICIT]; +26 | int32 e = 4 [features.field_presence = EXPLICIT]; | ^^^^^^^^^^^^^-----------------------^^^^^^^^^^^^^ | | | `field_presence` set here diff --git a/experimental/ir/testdata/options/values/any.proto b/experimental/ir/testdata/options/values/any.proto index dab254a4c..bc99565b2 100644 --- a/experimental/ir/testdata/options/values/any.proto +++ b/experimental/ir/testdata/options/values/any.proto @@ -1,18 +1,3 @@ - -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/values/any.proto.stderr.txt b/experimental/ir/testdata/options/values/any.proto.stderr.txt index 82e3737b6..51d30a863 100644 --- a/experimental/ir/testdata/options/values/any.proto.stderr.txt +++ b/experimental/ir/testdata/options/values/any.proto.stderr.txt @@ -1,60 +1,60 @@ error: type URL can only contain a single `/` - --> testdata/options/values/any.proto:32:32 + --> testdata/options/values/any.proto:17:32 | -32 | option (y) = { [buf.build/types/buf.test.Foo] { +17 | option (y) = { [buf.build/types/buf.test.Foo] { | - ^ | | | first one is here error: unsupported domain `buf.build/types` in `Any` type URL - --> testdata/options/values/any.proto:32:17 + --> testdata/options/values/any.proto:17:17 | -32 | option (y) = { [buf.build/types/buf.test.Foo] { +17 | option (y) = { [buf.build/types/buf.test.Foo] { | ^^^^^^^^^^^^^^^ = note: The domain must be one of `type.googleapis.com` or `type.googleprod.com`. This is a quirk of textformat; the compiler does not actually make any network requests. error: missing domain in `Any` type URL - --> testdata/options/values/any.proto:36:16 + --> testdata/options/values/any.proto:21:16 | -36 | option (y) = { [/buf.test.Foo] { +21 | option (y) = { [/buf.test.Foo] { | ^^^^^^^^^^^^^^^ = note: The domain must be one of `type.googleapis.com` or `type.googleprod.com`. This is a quirk of textformat; the compiler does not actually make any network requests. error: partly-qualified name in `Any` type URL - --> testdata/options/values/any.proto:40:37 + --> testdata/options/values/any.proto:25:37 | -40 | option (y) = { [type.googleapis.com/Foo] { +25 | option (y) = { [type.googleapis.com/Foo] { | ^^^ type referenced here | help: replace with fully qualified name | -40 | - option (y) = { [type.googleapis.com/Foo] { -40 | + option (y) = { [type.googleapis.com/buf.test.Foo] { +25 | - option (y) = { [type.googleapis.com/Foo] { +25 | + option (y) = { [type.googleapis.com/buf.test.Foo] { | | = note: `Any` type URL require fully qualified names error: unexpected field in `Any` expression - --> testdata/options/values/any.proto:67:13 + --> testdata/options/values/any.proto:52:13 | -66 | [type.googleapis.com/buf.test.Foo]: { x1: 42 } +51 | [type.googleapis.com/buf.test.Foo]: { x1: 42 } | ---------------------------------- | | | expected this to be the only field -67 | [type.googleapis.com/google.protobuf.FileOptions]: {} +52 | [type.googleapis.com/google.protobuf.FileOptions]: {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: the `Any` type URL must be the only field error: unexpected field in `Any` expression - --> testdata/options/values/any.proto:70:13 + --> testdata/options/values/any.proto:55:13 | -70 | type_url: "type.googleapis.com/buf.test.Bar" +55 | type_url: "type.googleapis.com/buf.test.Bar" | ^^^^^^^^ -71 | [type.googleapis.com/buf.test.Foo]: { x1: 42 } +56 | [type.googleapis.com/buf.test.Foo]: { x1: 42 } | ---------------------------------- | | | expected this to be the only field @@ -62,16 +62,16 @@ error: unexpected field in `Any` expression = note: the `Any` type URL must be the only field error: unexpected field in `Any` expression - --> testdata/options/values/any.proto:72:13 + --> testdata/options/values/any.proto:57:13 | -72 | bytes: "xyz" +57 | bytes: "xyz" | ^^^^^ = note: the `Any` type URL must be the only field error: mismatched types - --> testdata/options/values/any.proto:78:47 + --> testdata/options/values/any.proto:63:47 | -78 | { [type.googleapis.com/buf.test.Foo]: 42 }, +63 | { [type.googleapis.com/buf.test.Foo]: 42 }, | ---------------------------------- ^^ | | | | expected due to this expected `buf.test.Foo`, found integer literal @@ -80,30 +80,30 @@ error: mismatched types found: integer literal error: expected message type, found enum type `buf.test.Bar` - --> testdata/options/values/any.proto:79:32 + --> testdata/options/values/any.proto:64:32 | -79 | { [type.googleapis.com/buf.test.Bar]: BAR_ZERO }, +64 | { [type.googleapis.com/buf.test.Bar]: BAR_ZERO }, | ^^^^^^^^^^^^ expected message type -80 | { [type.googleapis.com/buf.test.NotReal]: {} }, +65 | { [type.googleapis.com/buf.test.NotReal]: {} }, ... -92 | enum Bar { +77 | enum Bar { | --- defined here error: cannot find `buf.test.NotReal` in this scope - --> testdata/options/values/any.proto:80:32 + --> testdata/options/values/any.proto:65:32 | -80 | { [type.googleapis.com/buf.test.NotReal]: {} }, +65 | { [type.googleapis.com/buf.test.NotReal]: {} }, | ^^^^^^^^^^^^^^^^ not found in this scope | = help: the full name of this scope is `buf.test` error: expected message type, found message field `buf.test.Foo.a` - --> testdata/options/values/any.proto:81:32 + --> testdata/options/values/any.proto:66:32 | -81 | { [type.googleapis.com/buf.test.Foo.a]: 42 } +66 | { [type.googleapis.com/buf.test.Foo.a]: 42 } | ^^^^^^^^^^^^^^ expected message type ... -89 | repeated google.protobuf.Any a = 3; +74 | repeated google.protobuf.Any a = 3; | - defined here encountered 11 errors diff --git a/experimental/ir/testdata/options/values/bool.proto b/experimental/ir/testdata/options/values/bool.proto index 0fd204b02..1bbeaae24 100644 --- a/experimental/ir/testdata/options/values/bool.proto +++ b/experimental/ir/testdata/options/values/bool.proto @@ -1,18 +1,3 @@ - -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/values/bool.proto.stderr.txt b/experimental/ir/testdata/options/values/bool.proto.stderr.txt index 2f25db88f..8d227d512 100644 --- a/experimental/ir/testdata/options/values/bool.proto.stderr.txt +++ b/experimental/ir/testdata/options/values/bool.proto.stderr.txt @@ -1,105 +1,105 @@ error: nested array expressions are not allowed - --> testdata/options/values/bool.proto:41:31 + --> testdata/options/values/bool.proto:26:31 | -41 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] +26 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] | -----------------------^^--------- ...within this array expression | | | cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/bool.proto:41:35 + --> testdata/options/values/bool.proto:26:35 | -41 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] +26 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] | ^^^^^^ warning: non-canonical `bool` literal - --> testdata/options/values/bool.proto:26:8 + --> testdata/options/values/bool.proto:11:8 | -26 | x: True +11 | x: True | ^^^^ help: replace with `true` | -26 | - x: True -26 | + x: true +11 | - x: True +11 | + x: true | = note: within message expressions only, `True` is permitted as a `bool`, but should be avoided warning: non-canonical `bool` literal - --> testdata/options/values/bool.proto:27:8 + --> testdata/options/values/bool.proto:12:8 | -27 | x: False +12 | x: False | ^^^^^ help: replace with `false` | -27 | - x: False -27 | + x: false +12 | - x: False +12 | + x: false | = note: within message expressions only, `False` is permitted as a `bool`, but should be avoided warning: non-canonical `bool` literal - --> testdata/options/values/bool.proto:28:8 + --> testdata/options/values/bool.proto:13:8 | -28 | x: t +13 | x: t | ^ help: replace with `true` | -28 | - x: t -28 | + x: true +13 | - x: t +13 | + x: true | = note: within message expressions only, `t` is permitted as a `bool`, but should be avoided warning: non-canonical `bool` literal - --> testdata/options/values/bool.proto:29:8 + --> testdata/options/values/bool.proto:14:8 | -29 | x: f +14 | x: f | ^ help: replace with `false` | -29 | - x: f -29 | + x: false +14 | - x: f +14 | + x: false | = note: within message expressions only, `f` is permitted as a `bool`, but should be avoided error: cannot find `TRUE` in this scope - --> testdata/options/values/bool.proto:32:8 + --> testdata/options/values/bool.proto:17:8 | -32 | x: TRUE +17 | x: TRUE | ^^^^ not found in this scope | = help: the full name of this scope is `buf.test` error: cannot find `FALSE` in this scope - --> testdata/options/values/bool.proto:33:8 + --> testdata/options/values/bool.proto:18:8 | -33 | x: FALSE +18 | x: FALSE | ^^^^^ not found in this scope | = help: the full name of this scope is `buf.test` error: cannot find `T` in this scope - --> testdata/options/values/bool.proto:34:8 + --> testdata/options/values/bool.proto:19:8 | -34 | x: T +19 | x: T | ^ not found in this scope | = help: the full name of this scope is `buf.test` error: cannot find `F` in this scope - --> testdata/options/values/bool.proto:35:8 + --> testdata/options/values/bool.proto:20:8 | -35 | x: F +20 | x: F | ^ not found in this scope | = help: the full name of this scope is `buf.test` error: mismatched types - --> testdata/options/values/bool.proto:37:9 + --> testdata/options/values/bool.proto:22:9 | -37 | x: -true +22 | x: -true | -^^^^ expected number, found `bool` | | | expected due to this @@ -108,9 +108,9 @@ error: mismatched types found: scalar type `bool` error: mismatched types - --> testdata/options/values/bool.proto:38:9 + --> testdata/options/values/bool.proto:23:9 | -38 | x: -True +23 | x: -True | -^^^^ expected number, found `bool` | | | expected due to this @@ -119,126 +119,126 @@ error: mismatched types found: scalar type `bool` warning: non-canonical `bool` literal - --> testdata/options/values/bool.proto:38:9 + --> testdata/options/values/bool.proto:23:9 | -38 | x: -True +23 | x: -True | ^^^^ help: replace with `true` | -38 | - x: -True -38 | + x: -true +23 | - x: -True +23 | + x: -true | = note: within message expressions only, `True` is permitted as a `bool`, but should be avoided error: mismatched types - --> testdata/options/values/bool.proto:41:9 + --> testdata/options/values/bool.proto:26:9 | -41 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] +26 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] | ^ expected `bool`, found integer literal ... -53 | repeated bool x = 1; +38 | repeated bool x = 1; | ------------- expected due to this | = note: expected: scalar type `bool` found: integer literal error: mismatched types - --> testdata/options/values/bool.proto:41:12 + --> testdata/options/values/bool.proto:26:12 | -41 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] +26 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] | ^^^ expected `bool`, found floating-point literal ... -53 | repeated bool x = 1; +38 | repeated bool x = 1; | ------------- expected due to this | = note: expected: scalar type `bool` found: floating-point literal error: mismatched types - --> testdata/options/values/bool.proto:41:17 + --> testdata/options/values/bool.proto:26:17 | -41 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] +26 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] | ^^^ expected `bool`, found floating-point literal ... -53 | repeated bool x = 1; +38 | repeated bool x = 1; | ------------- expected due to this | = note: expected: scalar type `bool` found: floating-point literal error: mismatched types - --> testdata/options/values/bool.proto:41:22 + --> testdata/options/values/bool.proto:26:22 | -41 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] +26 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] | ^^^ expected `bool`, found floating-point literal ... -53 | repeated bool x = 1; +38 | repeated bool x = 1; | ------------- expected due to this | = note: expected: scalar type `bool` found: floating-point literal error: mismatched types - --> testdata/options/values/bool.proto:41:27 + --> testdata/options/values/bool.proto:26:27 | -41 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] +26 | x: [1, 1.0, inf, nan, {}, [], 0 to 1] | ^^ expected `bool`, found message expression ... -53 | repeated bool x = 1; +38 | repeated bool x = 1; | ------------- expected due to this | = note: expected: scalar type `bool` found: message expression error: non-canonical `bool` literal outside of message expression - --> testdata/options/values/bool.proto:47:14 + --> testdata/options/values/bool.proto:32:14 | -47 | option (y) = True; +32 | option (y) = True; | ^^^^ help: replace with `true` | -47 | - option (y) = True; -47 | + option (y) = true; +32 | - option (y) = True; +32 | + option (y) = true; | = note: within message expressions only, `True` is permitted as a `bool`, but should be avoided error: non-canonical `bool` literal outside of message expression - --> testdata/options/values/bool.proto:48:14 + --> testdata/options/values/bool.proto:33:14 | -48 | option (y) = False; +33 | option (y) = False; | ^^^^^ help: replace with `false` | -48 | - option (y) = False; -48 | + option (y) = false; +33 | - option (y) = False; +33 | + option (y) = false; | = note: within message expressions only, `False` is permitted as a `bool`, but should be avoided error: non-canonical `bool` literal outside of message expression - --> testdata/options/values/bool.proto:49:14 + --> testdata/options/values/bool.proto:34:14 | -49 | option (y) = t; +34 | option (y) = t; | ^ help: replace with `true` | -49 | - option (y) = t; -49 | + option (y) = true; +34 | - option (y) = t; +34 | + option (y) = true; | = note: within message expressions only, `t` is permitted as a `bool`, but should be avoided error: non-canonical `bool` literal outside of message expression - --> testdata/options/values/bool.proto:50:14 + --> testdata/options/values/bool.proto:35:14 | -50 | option (y) = f; +35 | option (y) = f; | ^ help: replace with `false` | -50 | - option (y) = f; -50 | + option (y) = false; +35 | - option (y) = f; +35 | + option (y) = false; | = note: within message expressions only, `f` is permitted as a `bool`, but should be avoided diff --git a/experimental/ir/testdata/options/values/enum.proto b/experimental/ir/testdata/options/values/enum.proto index 37433ca9c..33ed67b17 100644 --- a/experimental/ir/testdata/options/values/enum.proto +++ b/experimental/ir/testdata/options/values/enum.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/values/enum.proto.stderr.txt b/experimental/ir/testdata/options/values/enum.proto.stderr.txt index b0950fc5b..85a3f210d 100644 --- a/experimental/ir/testdata/options/values/enum.proto.stderr.txt +++ b/experimental/ir/testdata/options/values/enum.proto.stderr.txt @@ -1,218 +1,218 @@ error: nested array expressions are not allowed - --> testdata/options/values/enum.proto:37:41 + --> testdata/options/values/enum.proto:23:41 | -37 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] +23 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] | ---------------------------------^^--------- | | | | ...within this array expression cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/enum.proto:37:45 + --> testdata/options/values/enum.proto:23:45 | -37 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] +23 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] | ^^^^^^ error: cannot find `BAR_E3` in this scope - --> testdata/options/values/enum.proto:25:8 + --> testdata/options/values/enum.proto:11:8 | -25 | e: BAR_E3 +11 | e: BAR_E3 | ^^^^^^ not found in this scope | = help: the full name of this scope is `buf.test` error: mismatched types - --> testdata/options/values/enum.proto:26:8 + --> testdata/options/values/enum.proto:12:8 | -26 | e: BAZ_ZERO +12 | e: BAZ_ZERO | ^^^^^^^^ expected `buf.test.Bar`, found `buf.test.Baz` -27 | e: buf.test.BAR_E1 +13 | e: buf.test.BAR_E1 ... -41 | repeated Bar e = 1; +27 | repeated Bar e = 1; | ------------ expected due to this | = note: expected: enum type `buf.test.Bar` found: enum type `buf.test.Baz` error: qualified enum value reference - --> testdata/options/values/enum.proto:27:8 + --> testdata/options/values/enum.proto:13:8 | -27 | e: buf.test.BAR_E1 +13 | e: buf.test.BAR_E1 | ^^^^^^^^^^^^^^^ help: replace it with the value's name | -27 | - e: buf.test.BAR_E1 -27 | + e: BAR_E1 +13 | - e: buf.test.BAR_E1 +13 | + e: BAR_E1 | = note: Protobuf requires single identifiers when referencing to the names of enum values error: cannot find `Bar.BAR_E1` in this scope - --> testdata/options/values/enum.proto:28:8 + --> testdata/options/values/enum.proto:14:8 | -28 | e: Bar.BAR_E1 +14 | e: Bar.BAR_E1 | ^^^^^^^^^^ not found in this scope | = help: the full name of this scope is `buf.test` error: mismatched types - --> testdata/options/values/enum.proto:29:9 + --> testdata/options/values/enum.proto:15:9 | -29 | e: -BAR_E1 +15 | e: -BAR_E1 | -^^^^^^ expected number, found `buf.test.Bar` | | | expected due to this | help: replace it with a literal value | -29 | - e: -BAR_E1 -29 | + e: -1 +15 | - e: -BAR_E1 +15 | + e: -1 | | = note: expected: number found: enum type `buf.test.Bar` error: mismatched types - --> testdata/options/values/enum.proto:31:8 + --> testdata/options/values/enum.proto:17:8 | -31 | i: Foo, +17 | i: Foo, | ^^^ expected `int32`, found type reference `buf.test.Foo` -32 | i: Foo.i, +18 | i: Foo.i, ... -41 | repeated Bar e = 1; -42 | repeated int32 i = 2; +27 | repeated Bar e = 1; +28 | repeated int32 i = 2; | -------------- expected due to this | = note: expected: scalar type `int32` found: type reference `buf.test.Foo` error: mismatched types - --> testdata/options/values/enum.proto:32:8 + --> testdata/options/values/enum.proto:18:8 | -32 | i: Foo.i, +18 | i: Foo.i, | ^^^^^ expected `int32`, found `buf.test.Foo.i` -33 | i: Foo.e, +19 | i: Foo.e, ... -41 | repeated Bar e = 1; -42 | repeated int32 i = 2; +27 | repeated Bar e = 1; +28 | repeated int32 i = 2; | -------------- expected due to this | = note: expected: scalar type `int32` found: message field `buf.test.Foo.i` error: mismatched types - --> testdata/options/values/enum.proto:33:8 + --> testdata/options/values/enum.proto:19:8 | -33 | i: Foo.e, +19 | i: Foo.e, | ^^^^^ expected `int32`, found `buf.test.Foo.e` -34 | i: BAR_ZERO +20 | i: BAR_ZERO ... -41 | repeated Bar e = 1; -42 | repeated int32 i = 2; +27 | repeated Bar e = 1; +28 | repeated int32 i = 2; | -------------- expected due to this | = note: expected: scalar type `int32` found: message field `buf.test.Foo.e` error: mismatched types - --> testdata/options/values/enum.proto:34:8 + --> testdata/options/values/enum.proto:20:8 | -34 | i: BAR_ZERO +20 | i: BAR_ZERO | ^^^^^^^^ expected `int32`, found `buf.test.Bar` -35 | i: buf.test.BAR_ZERO +21 | i: buf.test.BAR_ZERO ... -41 | repeated Bar e = 1; -42 | repeated int32 i = 2; +27 | repeated Bar e = 1; +28 | repeated int32 i = 2; | -------------- expected due to this | = note: expected: scalar type `int32` found: enum type `buf.test.Bar` error: mismatched types - --> testdata/options/values/enum.proto:35:8 + --> testdata/options/values/enum.proto:21:8 | -35 | i: buf.test.BAR_ZERO +21 | i: buf.test.BAR_ZERO | ^^^^^^^^^^^^^^^^^ expected `int32`, found `buf.test.Bar` ... -41 | repeated Bar e = 1; -42 | repeated int32 i = 2; +27 | repeated Bar e = 1; +28 | repeated int32 i = 2; | -------------- expected due to this | = note: expected: scalar type `int32` found: enum type `buf.test.Bar` error: mismatched types - --> testdata/options/values/enum.proto:37:9 + --> testdata/options/values/enum.proto:23:9 | -37 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] +23 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] | ^^^ expected `buf.test.Bar`, found floating-point literal ... -41 | repeated Bar e = 1; +27 | repeated Bar e = 1; | ------------ expected due to this | = note: expected: enum type `buf.test.Bar` found: floating-point literal error: mismatched types - --> testdata/options/values/enum.proto:37:14 + --> testdata/options/values/enum.proto:23:14 | -37 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] +23 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] | ^^^^ expected `buf.test.Bar`, found `bool` ... -41 | repeated Bar e = 1; +27 | repeated Bar e = 1; | ------------ expected due to this | = note: expected: enum type `buf.test.Bar` found: scalar type `bool` error: mismatched types - --> testdata/options/values/enum.proto:37:20 + --> testdata/options/values/enum.proto:23:20 | -37 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] +23 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] | ^^^^^ expected `buf.test.Bar`, found `string` ... -41 | repeated Bar e = 1; +27 | repeated Bar e = 1; | ------------ expected due to this | = note: expected: enum type `buf.test.Bar` found: scalar type `string` error: mismatched types - --> testdata/options/values/enum.proto:37:27 + --> testdata/options/values/enum.proto:23:27 | -37 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] +23 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `buf.test.Bar`, found floating-point literal ... -41 | repeated Bar e = 1; +27 | repeated Bar e = 1; | ------------ expected due to this | = note: expected: enum type `buf.test.Bar` found: floating-point literal error: mismatched types - --> testdata/options/values/enum.proto:37:32 + --> testdata/options/values/enum.proto:23:32 | -37 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] +23 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `buf.test.Bar`, found floating-point literal ... -41 | repeated Bar e = 1; +27 | repeated Bar e = 1; | ------------ expected due to this | = note: expected: enum type `buf.test.Bar` found: floating-point literal error: mismatched types - --> testdata/options/values/enum.proto:37:37 + --> testdata/options/values/enum.proto:23:37 | -37 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] +23 | e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1] | ^^ | | | expected `buf.test.Bar`, found message expression ... -41 | repeated Bar e = 1; +27 | repeated Bar e = 1; | ------------ expected due to this | = note: expected: enum type `buf.test.Bar` diff --git a/experimental/ir/testdata/options/values/extra_locations.proto b/experimental/ir/testdata/options/values/extra_locations.proto index 729819c50..00d939de8 100644 --- a/experimental/ir/testdata/options/values/extra_locations.proto +++ b/experimental/ir/testdata/options/values/extra_locations.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% source_code_info: true //% generate_extra_option_locations: true diff --git a/experimental/ir/testdata/options/values/extra_locations.proto.sci.yaml b/experimental/ir/testdata/options/values/extra_locations.proto.sci.yaml index 0a36b7ea0..3569eb540 100644 --- a/experimental/ir/testdata/options/values/extra_locations.proto.sci.yaml +++ b/experimental/ir/testdata/options/values/extra_locations.proto.sci.yaml @@ -1,196 +1,195 @@ "testdata/options/values/extra_locations.proto": -- { path: "", start: { line: 17, column: 0 }, end: { line: 62, column: 1 } } +- { path: "", start: { line: 3, column: 0 }, end: { line: 48, column: 1 } } - path: ".syntax" - start: { line: 17, column: 0 } - end: { line: 17, column: 18 } + start: { line: 3, column: 0 } + end: { line: 3, column: 18 } leading: "% descriptor: true\n% source_code_info: true\n% generate_extra_option_locations: true\n" - detached: {} - path: ".package" - start: { line: 19, column: 0 } - end: { line: 19, column: 17 } + start: { line: 5, column: 0 } + end: { line: 5, column: 17 } - path: ".dependency.0" - start: { line: 21, column: 0 } - end: { line: 21, column: 42 } + start: { line: 7, column: 0 } + end: { line: 7, column: 42 } - path: ".options" - start: { line: 23, column: 0 } - end: { line: 28, column: 2 } + start: { line: 9, column: 0 } + end: { line: 14, column: 2 } - path: ".options.0" - start: { line: 23, column: 7 } - end: { line: 28, column: 1 } + start: { line: 9, column: 7 } + end: { line: 14, column: 1 } - path: ".options.0.0" - start: { line: 24, column: 4 } - end: { line: 24, column: 8 } + start: { line: 10, column: 4 } + end: { line: 10, column: 8 } - path: ".options.0.0.0" - start: { line: 25, column: 4 } - end: { line: 25, column: 8 } + start: { line: 11, column: 4 } + end: { line: 11, column: 8 } - path: ".options.0.0.java_package" - start: { line: 26, column: 4 } - end: { line: 26, column: 8 } + start: { line: 12, column: 4 } + end: { line: 12, column: 8 } - path: ".options.0.0.0" - start: { line: 27, column: 4 } - end: { line: 27, column: 8 } + start: { line: 13, column: 4 } + end: { line: 13, column: 8 } - path: ".message_type[Foo]" - start: { line: 30, column: 0 } - end: { line: 44, column: 1 } + start: { line: 16, column: 0 } + end: { line: 30, column: 1 } - path: ".message_type[Foo].name" - start: { line: 30, column: 8 } - end: { line: 30, column: 11 } + start: { line: 16, column: 8 } + end: { line: 16, column: 11 } - path: ".message_type[Foo].options" - start: { line: 31, column: 4 } - end: { line: 33, column: 6 } + start: { line: 17, column: 4 } + end: { line: 19, column: 6 } - path: ".message_type[Foo].options.0" - start: { line: 31, column: 11 } - end: { line: 33, column: 5 } + start: { line: 17, column: 11 } + end: { line: 19, column: 5 } - path: ".message_type[Foo].options.0.message_set_wire_format" - start: { line: 32, column: 8 } - end: { line: 32, column: 16 } + start: { line: 18, column: 8 } + end: { line: 18, column: 16 } - path: ".message_type[Foo].field[bar].label" - start: { line: 35, column: 4 } - end: { line: 35, column: 12 } + start: { line: 21, column: 4 } + end: { line: 21, column: 12 } - path: ".message_type[Foo].field[bar]" - start: { line: 35, column: 4 } - end: { line: 43, column: 6 } + start: { line: 21, column: 4 } + end: { line: 29, column: 6 } - path: ".message_type[Foo].field[bar].type" - start: { line: 35, column: 13 } - end: { line: 35, column: 19 } + start: { line: 21, column: 13 } + end: { line: 21, column: 19 } - path: ".message_type[Foo].field[bar].name" - start: { line: 35, column: 20 } - end: { line: 35, column: 23 } + start: { line: 21, column: 20 } + end: { line: 21, column: 23 } - path: ".message_type[Foo].field[bar].number" - start: { line: 35, column: 26 } - end: { line: 35, column: 27 } + start: { line: 21, column: 26 } + end: { line: 21, column: 27 } - path: ".message_type[Foo].field[bar].options" - start: { line: 35, column: 28 } - end: { line: 43, column: 5 } + start: { line: 21, column: 28 } + end: { line: 29, column: 5 } - path: ".message_type[Foo].field[bar].options.0" - start: { line: 36, column: 6 } - end: { line: 42, column: 7 } + start: { line: 22, column: 6 } + end: { line: 28, column: 7 } - path: ".message_type[Foo].field[bar].options.0.ctype" - start: { line: 37, column: 10 } - end: { line: 37, column: 18 } + start: { line: 23, column: 10 } + end: { line: 23, column: 18 } - path: ".message_type[Foo].field[bar].options.0.packed" - start: { line: 38, column: 10 } - end: { line: 38, column: 14 } + start: { line: 24, column: 10 } + end: { line: 24, column: 14 } - path: ".message_type[Foo].field[bar].options.0.deprecated.0" - start: { line: 39, column: 10 } - end: { line: 39, column: 14 } + start: { line: 25, column: 10 } + end: { line: 25, column: 14 } - path: ".message_type[Foo].field[bar].options.0.deprecated.0" - start: { line: 40, column: 10 } - end: { line: 40, column: 14 } + start: { line: 26, column: 10 } + end: { line: 26, column: 14 } - path: ".message_type[Foo].field[bar].options.0.deprecated.0" - start: { line: 41, column: 10 } - end: { line: 41, column: 14 } + start: { line: 27, column: 10 } + end: { line: 27, column: 14 } - path: ".message_type[OptionMessage]" - start: { line: 46, column: 0 } - end: { line: 50, column: 1 } + start: { line: 32, column: 0 } + end: { line: 36, column: 1 } - path: ".message_type[OptionMessage].name" - start: { line: 46, column: 8 } - end: { line: 46, column: 21 } + start: { line: 32, column: 8 } + end: { line: 32, column: 21 } - path: ".message_type[OptionMessage].field[a].label" - start: { line: 47, column: 4 } - end: { line: 47, column: 12 } + start: { line: 33, column: 4 } + end: { line: 33, column: 12 } - path: ".message_type[OptionMessage].field[a]" - start: { line: 47, column: 4 } - end: { line: 47, column: 26 } + start: { line: 33, column: 4 } + end: { line: 33, column: 26 } - path: ".message_type[OptionMessage].field[a].type" - start: { line: 47, column: 13 } - end: { line: 47, column: 19 } + start: { line: 33, column: 13 } + end: { line: 33, column: 19 } - path: ".message_type[OptionMessage].field[a].name" - start: { line: 47, column: 20 } - end: { line: 47, column: 21 } + start: { line: 33, column: 20 } + end: { line: 33, column: 21 } - path: ".message_type[OptionMessage].field[a].number" - start: { line: 47, column: 24 } - end: { line: 47, column: 25 } + start: { line: 33, column: 24 } + end: { line: 33, column: 25 } - path: ".message_type[OptionMessage].field[b].label" - start: { line: 48, column: 4 } - end: { line: 48, column: 12 } + start: { line: 34, column: 4 } + end: { line: 34, column: 12 } - path: ".message_type[OptionMessage].field[b]" - start: { line: 48, column: 4 } - end: { line: 48, column: 25 } + start: { line: 34, column: 4 } + end: { line: 34, column: 25 } - path: ".message_type[OptionMessage].field[b].type" - start: { line: 48, column: 13 } - end: { line: 48, column: 18 } + start: { line: 34, column: 13 } + end: { line: 34, column: 18 } - path: ".message_type[OptionMessage].field[b].name" - start: { line: 48, column: 19 } - end: { line: 48, column: 20 } + start: { line: 34, column: 19 } + end: { line: 34, column: 20 } - path: ".message_type[OptionMessage].field[b].number" - start: { line: 48, column: 23 } - end: { line: 48, column: 24 } + start: { line: 34, column: 23 } + end: { line: 34, column: 24 } - path: ".message_type[OptionMessage].field[c].label" - start: { line: 49, column: 4 } - end: { line: 49, column: 12 } + start: { line: 35, column: 4 } + end: { line: 35, column: 12 } - path: ".message_type[OptionMessage].field[c]" - start: { line: 49, column: 4 } - end: { line: 49, column: 25 } + start: { line: 35, column: 4 } + end: { line: 35, column: 25 } - path: ".message_type[OptionMessage].field[c].type" - start: { line: 49, column: 13 } - end: { line: 49, column: 18 } + start: { line: 35, column: 13 } + end: { line: 35, column: 18 } - path: ".message_type[OptionMessage].field[c].name" - start: { line: 49, column: 19 } - end: { line: 49, column: 20 } + start: { line: 35, column: 19 } + end: { line: 35, column: 20 } - path: ".message_type[OptionMessage].field[c].number" - start: { line: 49, column: 23 } - end: { line: 49, column: 24 } + start: { line: 35, column: 23 } + end: { line: 35, column: 24 } - path: ".extension" - start: { line: 52, column: 0 } - end: { line: 54, column: 1 } + start: { line: 38, column: 0 } + end: { line: 40, column: 1 } - path: ".extension[x].extendee" - start: { line: 52, column: 7 } - end: { line: 52, column: 34 } + start: { line: 38, column: 7 } + end: { line: 38, column: 34 } - path: ".extension[x].label" - start: { line: 53, column: 4 } - end: { line: 53, column: 12 } + start: { line: 39, column: 4 } + end: { line: 39, column: 12 } - path: ".extension[x]" - start: { line: 53, column: 4 } - end: { line: 53, column: 36 } + start: { line: 39, column: 4 } + end: { line: 39, column: 36 } - path: ".extension[x].type_name" - start: { line: 53, column: 13 } - end: { line: 53, column: 26 } + start: { line: 39, column: 13 } + end: { line: 39, column: 26 } - path: ".extension[x].name" - start: { line: 53, column: 27 } - end: { line: 53, column: 28 } + start: { line: 39, column: 27 } + end: { line: 39, column: 28 } - path: ".extension[x].number" - start: { line: 53, column: 31 } - end: { line: 53, column: 35 } + start: { line: 39, column: 31 } + end: { line: 39, column: 35 } - path: ".extension" - start: { line: 56, column: 0 } - end: { line: 58, column: 1 } + start: { line: 42, column: 0 } + end: { line: 44, column: 1 } - path: ".extension[y].extendee" - start: { line: 56, column: 7 } - end: { line: 56, column: 37 } + start: { line: 42, column: 7 } + end: { line: 42, column: 37 } - path: ".extension[y].label" - start: { line: 57, column: 4 } - end: { line: 57, column: 12 } + start: { line: 43, column: 4 } + end: { line: 43, column: 12 } - path: ".extension[y]" - start: { line: 57, column: 4 } - end: { line: 57, column: 36 } + start: { line: 43, column: 4 } + end: { line: 43, column: 36 } - path: ".extension[y].type_name" - start: { line: 57, column: 13 } - end: { line: 57, column: 26 } + start: { line: 43, column: 13 } + end: { line: 43, column: 26 } - path: ".extension[y].name" - start: { line: 57, column: 27 } - end: { line: 57, column: 28 } + start: { line: 43, column: 27 } + end: { line: 43, column: 28 } - path: ".extension[y].number" - start: { line: 57, column: 31 } - end: { line: 57, column: 35 } + start: { line: 43, column: 31 } + end: { line: 43, column: 35 } - path: ".extension" - start: { line: 60, column: 0 } - end: { line: 62, column: 1 } + start: { line: 46, column: 0 } + end: { line: 48, column: 1 } - path: ".extension[z].extendee" - start: { line: 60, column: 7 } - end: { line: 60, column: 35 } + start: { line: 46, column: 7 } + end: { line: 46, column: 35 } - path: ".extension[z].label" - start: { line: 61, column: 4 } - end: { line: 61, column: 12 } + start: { line: 47, column: 4 } + end: { line: 47, column: 12 } - path: ".extension[z]" - start: { line: 61, column: 4 } - end: { line: 61, column: 36 } + start: { line: 47, column: 4 } + end: { line: 47, column: 36 } - path: ".extension[z].type_name" - start: { line: 61, column: 13 } - end: { line: 61, column: 26 } + start: { line: 47, column: 13 } + end: { line: 47, column: 26 } - path: ".extension[z].name" - start: { line: 61, column: 27 } - end: { line: 61, column: 28 } + start: { line: 47, column: 27 } + end: { line: 47, column: 28 } - path: ".extension[z].number" - start: { line: 61, column: 31 } - end: { line: 61, column: 35 } + start: { line: 47, column: 31 } + end: { line: 47, column: 35 } diff --git a/experimental/ir/testdata/options/values/float.proto b/experimental/ir/testdata/options/values/float.proto index 6bc2870d7..4a45d1419 100644 --- a/experimental/ir/testdata/options/values/float.proto +++ b/experimental/ir/testdata/options/values/float.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/values/float.proto.stderr.txt b/experimental/ir/testdata/options/values/float.proto.stderr.txt index 179f75e9f..8980a3eec 100644 --- a/experimental/ir/testdata/options/values/float.proto.stderr.txt +++ b/experimental/ir/testdata/options/values/float.proto.stderr.txt @@ -1,338 +1,338 @@ error: nested array expressions are not allowed - --> testdata/options/values/float.proto:56:28 + --> testdata/options/values/float.proto:42:28 | -56 | f32: ["foo", true, {}, [], 0 to 1] +42 | f32: ["foo", true, {}, [], 0 to 1] | ------------------^^--------- ...within this array expression | | | cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/float.proto:56:32 + --> testdata/options/values/float.proto:42:32 | -56 | f32: ["foo", true, {}, [], 0 to 1] +42 | f32: ["foo", true, {}, [], 0 to 1] | ^^^^^^ error: nested array expressions are not allowed - --> testdata/options/values/float.proto:57:28 + --> testdata/options/values/float.proto:43:28 | -57 | f64: ["foo", true, {}, [], 0 to 1] +43 | f64: ["foo", true, {}, [], 0 to 1] | ------------------^^--------- ...within this array expression | | | cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/float.proto:57:32 + --> testdata/options/values/float.proto:43:32 | -57 | f64: ["foo", true, {}, [], 0 to 1] +43 | f64: ["foo", true, {}, [], 0 to 1] | ^^^^^^ warning: non-canonical floating-point literal - --> testdata/options/values/float.proto:28:9 + --> testdata/options/values/float.proto:14:9 | -28 | Infinity, -InFiNiTy, +14 | Infinity, -InFiNiTy, | ^^^^^^^^ help: replace with `inf` | -28 | - Infinity, -InFiNiTy, -28 | + inf, -InFiNiTy, +14 | - Infinity, -InFiNiTy, +14 | + inf, -InFiNiTy, | = note: within message expressions only, some floating-point literals are case-insensitive warning: non-canonical floating-point literal - --> testdata/options/values/float.proto:28:20 + --> testdata/options/values/float.proto:14:20 | -28 | Infinity, -InFiNiTy, +14 | Infinity, -InFiNiTy, | ^^^^^^^^ help: replace with `inf` | -28 | - Infinity, -InFiNiTy, -28 | + Infinity, -inf, +14 | - Infinity, -InFiNiTy, +14 | + Infinity, -inf, | = note: within message expressions only, some floating-point literals are case-insensitive warning: non-canonical floating-point literal - --> testdata/options/values/float.proto:29:9 + --> testdata/options/values/float.proto:15:9 | -29 | NaN, -nAn +15 | NaN, -nAn | ^^^ help: replace with `nan` | -29 | - NaN, -nAn -29 | + nan, -nAn +15 | - NaN, -nAn +15 | + nan, -nAn | = note: within message expressions only, some floating-point literals are case-insensitive warning: non-canonical floating-point literal - --> testdata/options/values/float.proto:29:15 + --> testdata/options/values/float.proto:15:15 | -29 | NaN, -nAn +15 | NaN, -nAn | ^^^ help: replace with `nan` | -29 | - NaN, -nAn -29 | + NaN, -nan +15 | - NaN, -nAn +15 | + NaN, -nan | = note: within message expressions only, some floating-point literals are case-insensitive warning: floating-point literal rounds to infinity - --> testdata/options/values/float.proto:37:9 + --> testdata/options/values/float.proto:23:9 | -37 | 1234567890123456789012345678901234567890, +23 | 1234567890123456789012345678901234567890, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | this value is beyond the dynamic range of `float` | help: replace with `inf` | -37 | - 1234567890123456789012345678901234567890, -37 | + inf, +23 | - 1234567890123456789012345678901234567890, +23 | + inf, | | = note: this value is of order 1e39; `float` can only represent around 1e38 warning: floating-point literal rounds to infinity - --> testdata/options/values/float.proto:38:10 + --> testdata/options/values/float.proto:24:10 | -38 | -1234567890123456789012345678901234567890 +24 | -1234567890123456789012345678901234567890 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | this value is beyond the dynamic range of `float` | help: replace with `inf` | -38 | - -1234567890123456789012345678901234567890 -38 | + -inf +24 | - -1234567890123456789012345678901234567890 +24 | + -inf | | = note: this value is of order 1e39; `float` can only represent around 1e38 warning: non-canonical floating-point literal - --> testdata/options/values/float.proto:46:9 + --> testdata/options/values/float.proto:32:9 | -46 | Infinity, -InFiNiTy, +32 | Infinity, -InFiNiTy, | ^^^^^^^^ help: replace with `inf` | -46 | - Infinity, -InFiNiTy, -46 | + inf, -InFiNiTy, +32 | - Infinity, -InFiNiTy, +32 | + inf, -InFiNiTy, | = note: within message expressions only, some floating-point literals are case-insensitive warning: non-canonical floating-point literal - --> testdata/options/values/float.proto:46:20 + --> testdata/options/values/float.proto:32:20 | -46 | Infinity, -InFiNiTy, +32 | Infinity, -InFiNiTy, | ^^^^^^^^ help: replace with `inf` | -46 | - Infinity, -InFiNiTy, -46 | + Infinity, -inf, +32 | - Infinity, -InFiNiTy, +32 | + Infinity, -inf, | = note: within message expressions only, some floating-point literals are case-insensitive warning: non-canonical floating-point literal - --> testdata/options/values/float.proto:47:9 + --> testdata/options/values/float.proto:33:9 | -47 | NaN, -nAn +33 | NaN, -nAn | ^^^ help: replace with `nan` | -47 | - NaN, -nAn -47 | + nan, -nAn +33 | - NaN, -nAn +33 | + nan, -nAn | = note: within message expressions only, some floating-point literals are case-insensitive warning: non-canonical floating-point literal - --> testdata/options/values/float.proto:47:15 + --> testdata/options/values/float.proto:33:15 | -47 | NaN, -nAn +33 | NaN, -nAn | ^^^ help: replace with `nan` | -47 | - NaN, -nAn -47 | + NaN, -nan +33 | - NaN, -nAn +33 | + NaN, -nan | = note: within message expressions only, some floating-point literals are case-insensitive warning: floating-point literal rounds to infinity - --> testdata/options/values/float.proto:53:11 + --> testdata/options/values/float.proto:39:11 | -53 | f64: [1e1000, -1e1000], // Snap to Infinity. +39 | f64: [1e1000, -1e1000], // Snap to Infinity. | ^^^^^^ this value is beyond the dynamic range of `double` | help: replace with `inf` | -53 | - f64: [1e1000, -1e1000], // Snap to Infinity. -53 | + f64: [inf, -1e1000], // Snap to Infinity. +39 | - f64: [1e1000, -1e1000], // Snap to Infinity. +39 | + f64: [inf, -1e1000], // Snap to Infinity. | | = note: this value is of order 1e1000; `double` can only represent around 1e308 warning: floating-point literal rounds to infinity - --> testdata/options/values/float.proto:53:20 + --> testdata/options/values/float.proto:39:20 | -53 | f64: [1e1000, -1e1000], // Snap to Infinity. +39 | f64: [1e1000, -1e1000], // Snap to Infinity. | ^^^^^^ | | | this value is beyond the dynamic range of `double` | help: replace with `inf` | -53 | - f64: [1e1000, -1e1000], // Snap to Infinity. -53 | + f64: [1e1000, -inf], // Snap to Infinity. +39 | - f64: [1e1000, -1e1000], // Snap to Infinity. +39 | + f64: [1e1000, -inf], // Snap to Infinity. | | = note: this value is of order 1e1000; `double` can only represent around 1e308 error: mismatched types - --> testdata/options/values/float.proto:56:11 + --> testdata/options/values/float.proto:42:11 | -56 | f32: ["foo", true, {}, [], 0 to 1] +42 | f32: ["foo", true, {}, [], 0 to 1] | ^^^^^ expected `float`, found `string` -57 | f64: ["foo", true, {}, [], 0 to 1] +43 | f64: ["foo", true, {}, [], 0 to 1] ... -69 | repeated float f32 = 1; +55 | repeated float f32 = 1; | -------------- expected due to this | = note: expected: scalar type `float` found: scalar type `string` error: mismatched types - --> testdata/options/values/float.proto:56:18 + --> testdata/options/values/float.proto:42:18 | -56 | f32: ["foo", true, {}, [], 0 to 1] +42 | f32: ["foo", true, {}, [], 0 to 1] | ^^^^ expected `float`, found `bool` -57 | f64: ["foo", true, {}, [], 0 to 1] +43 | f64: ["foo", true, {}, [], 0 to 1] ... -69 | repeated float f32 = 1; +55 | repeated float f32 = 1; | -------------- expected due to this | = note: expected: scalar type `float` found: scalar type `bool` error: mismatched types - --> testdata/options/values/float.proto:56:24 + --> testdata/options/values/float.proto:42:24 | -56 | f32: ["foo", true, {}, [], 0 to 1] +42 | f32: ["foo", true, {}, [], 0 to 1] | ^^ expected `float`, found message expression -57 | f64: ["foo", true, {}, [], 0 to 1] +43 | f64: ["foo", true, {}, [], 0 to 1] ... -69 | repeated float f32 = 1; +55 | repeated float f32 = 1; | -------------- expected due to this | = note: expected: scalar type `float` found: message expression error: mismatched types - --> testdata/options/values/float.proto:57:11 + --> testdata/options/values/float.proto:43:11 | -57 | f64: ["foo", true, {}, [], 0 to 1] +43 | f64: ["foo", true, {}, [], 0 to 1] | ^^^^^ expected `double`, found `string` ... -69 | repeated float f32 = 1; -70 | repeated double f64 = 2; +55 | repeated float f32 = 1; +56 | repeated double f64 = 2; | --------------- expected due to this | = note: expected: scalar type `double` found: scalar type `string` error: mismatched types - --> testdata/options/values/float.proto:57:18 + --> testdata/options/values/float.proto:43:18 | -57 | f64: ["foo", true, {}, [], 0 to 1] +43 | f64: ["foo", true, {}, [], 0 to 1] | ^^^^ expected `double`, found `bool` ... -69 | repeated float f32 = 1; -70 | repeated double f64 = 2; +55 | repeated float f32 = 1; +56 | repeated double f64 = 2; | --------------- expected due to this | = note: expected: scalar type `double` found: scalar type `bool` error: mismatched types - --> testdata/options/values/float.proto:57:24 + --> testdata/options/values/float.proto:43:24 | -57 | f64: ["foo", true, {}, [], 0 to 1] +43 | f64: ["foo", true, {}, [], 0 to 1] | ^^ expected `double`, found message expression ... -69 | repeated float f32 = 1; -70 | repeated double f64 = 2; +55 | repeated float f32 = 1; +56 | repeated double f64 = 2; | --------------- expected due to this | = note: expected: scalar type `double` found: message expression error: non-canonical floating-point literal outside of message expression - --> testdata/options/values/float.proto:61:14 + --> testdata/options/values/float.proto:47:14 | -61 | option (y) = infinity; +47 | option (y) = infinity; | ^^^^^^^^ help: replace with `inf` | -61 | - option (y) = infinity; -61 | + option (y) = inf; +47 | - option (y) = infinity; +47 | + option (y) = inf; | = note: within message expressions only, some floating-point literals are case-insensitive error: non-canonical floating-point literal outside of message expression - --> testdata/options/values/float.proto:62:14 + --> testdata/options/values/float.proto:48:14 | -62 | option (y) = INF; +48 | option (y) = INF; | ^^^ help: replace with `inf` | -62 | - option (y) = INF; -62 | + option (y) = inf; +48 | - option (y) = INF; +48 | + option (y) = inf; | = note: within message expressions only, some floating-point literals are case-insensitive error: non-canonical floating-point literal outside of message expression - --> testdata/options/values/float.proto:63:14 + --> testdata/options/values/float.proto:49:14 | -63 | option (y) = Infinity; +49 | option (y) = Infinity; | ^^^^^^^^ help: replace with `inf` | -63 | - option (y) = Infinity; -63 | + option (y) = inf; +49 | - option (y) = Infinity; +49 | + option (y) = inf; | = note: within message expressions only, some floating-point literals are case-insensitive error: non-canonical floating-point literal outside of message expression - --> testdata/options/values/float.proto:65:14 + --> testdata/options/values/float.proto:51:14 | -65 | option (y) = NaN; +51 | option (y) = NaN; | ^^^ help: replace with `nan` | -65 | - option (y) = NaN; -65 | + option (y) = nan; +51 | - option (y) = NaN; +51 | + option (y) = nan; | = note: within message expressions only, some floating-point literals are case-insensitive error: non-canonical floating-point literal outside of message expression - --> testdata/options/values/float.proto:66:14 + --> testdata/options/values/float.proto:52:14 | -66 | option (y) = NAN; +52 | option (y) = NAN; | ^^^ help: replace with `nan` | -66 | - option (y) = NAN; -66 | + option (y) = nan; +52 | - option (y) = NAN; +52 | + option (y) = nan; | = note: within message expressions only, some floating-point literals are case-insensitive diff --git a/experimental/ir/testdata/options/values/int32.proto b/experimental/ir/testdata/options/values/int32.proto index 24fb3b4b2..cfcefbb8a 100644 --- a/experimental/ir/testdata/options/values/int32.proto +++ b/experimental/ir/testdata/options/values/int32.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/values/int32.proto.stderr.txt b/experimental/ir/testdata/options/values/int32.proto.stderr.txt index 80871eeb1..bae8cb8c3 100644 --- a/experimental/ir/testdata/options/values/int32.proto.stderr.txt +++ b/experimental/ir/testdata/options/values/int32.proto.stderr.txt @@ -1,734 +1,734 @@ error: nested array expressions are not allowed - --> testdata/options/values/int32.proto:58:42 + --> testdata/options/values/int32.proto:44:42 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ---------------------------------^^--------- | | | | ...within this array expression cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/int32.proto:58:46 + --> testdata/options/values/int32.proto:44:46 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^^ error: nested array expressions are not allowed - --> testdata/options/values/int32.proto:59:42 + --> testdata/options/values/int32.proto:45:42 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ---------------------------------^^--------- | | | | ...within this array expression cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/int32.proto:59:46 + --> testdata/options/values/int32.proto:45:46 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^^ error: nested array expressions are not allowed - --> testdata/options/values/int32.proto:60:42 + --> testdata/options/values/int32.proto:46:42 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ---------------------------------^^--------- | | | | ...within this array expression cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/int32.proto:60:46 + --> testdata/options/values/int32.proto:46:46 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^^ error: nested array expressions are not allowed - --> testdata/options/values/int32.proto:61:42 + --> testdata/options/values/int32.proto:47:42 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ---------------------------------^^--------- | | | | ...within this array expression cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/int32.proto:61:46 + --> testdata/options/values/int32.proto:47:46 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^^ error: nested array expressions are not allowed - --> testdata/options/values/int32.proto:62:42 + --> testdata/options/values/int32.proto:48:42 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ---------------------------------^^--------- | | | | ...within this array expression cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/int32.proto:62:46 + --> testdata/options/values/int32.proto:48:46 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^^ error: literal out of range for `int32` - --> testdata/options/values/int32.proto:26:9 + --> testdata/options/values/int32.proto:12:9 | -26 | 0x80000000, -0x80000001, // Out-of-range values. +12 | 0x80000000, -0x80000001, // Out-of-range values. | ^^^^^^^^^^ -27 | 0x10000000000000000 // *big.Int value. +13 | 0x10000000000000000 // *big.Int value. ... -66 | repeated int32 i1 = 1; +52 | repeated int32 i1 = 1; | -------------- expected due to this | = note: the range for `int32` is `-0x80000000 to 0x7fffffff` error: literal out of range for `int32` - --> testdata/options/values/int32.proto:26:21 + --> testdata/options/values/int32.proto:12:21 | -26 | 0x80000000, -0x80000001, // Out-of-range values. +12 | 0x80000000, -0x80000001, // Out-of-range values. | ^^^^^^^^^^^ -27 | 0x10000000000000000 // *big.Int value. +13 | 0x10000000000000000 // *big.Int value. ... -66 | repeated int32 i1 = 1; +52 | repeated int32 i1 = 1; | -------------- expected due to this | = note: the range for `int32` is `-0x80000000 to 0x7fffffff` error: literal out of range for `int32` - --> testdata/options/values/int32.proto:27:9 + --> testdata/options/values/int32.proto:13:9 | -27 | 0x10000000000000000 // *big.Int value. +13 | 0x10000000000000000 // *big.Int value. | ^^^^^^^^^^^^^^^^^^^ ... -66 | repeated int32 i1 = 1; +52 | repeated int32 i1 = 1; | -------------- expected due to this | = note: the range for `int32` is `-0x80000000 to 0x7fffffff` error: literal out of range for `sint32` - --> testdata/options/values/int32.proto:32:9 + --> testdata/options/values/int32.proto:18:9 | -32 | 0x80000000, -0x80000001, // Out-of-range values. +18 | 0x80000000, -0x80000001, // Out-of-range values. | ^^^^^^^^^^ -33 | 0x10000000000000000 // *big.Int value. +19 | 0x10000000000000000 // *big.Int value. ... -66 | repeated int32 i1 = 1; -67 | repeated sint32 i2 = 2; +52 | repeated int32 i1 = 1; +53 | repeated sint32 i2 = 2; | --------------- expected due to this | = note: the range for `sint32` is `-0x80000000 to 0x7fffffff` error: literal out of range for `sint32` - --> testdata/options/values/int32.proto:32:21 + --> testdata/options/values/int32.proto:18:21 | -32 | 0x80000000, -0x80000001, // Out-of-range values. +18 | 0x80000000, -0x80000001, // Out-of-range values. | ^^^^^^^^^^^ -33 | 0x10000000000000000 // *big.Int value. +19 | 0x10000000000000000 // *big.Int value. ... -66 | repeated int32 i1 = 1; -67 | repeated sint32 i2 = 2; +52 | repeated int32 i1 = 1; +53 | repeated sint32 i2 = 2; | --------------- expected due to this | = note: the range for `sint32` is `-0x80000000 to 0x7fffffff` error: literal out of range for `sint32` - --> testdata/options/values/int32.proto:33:9 + --> testdata/options/values/int32.proto:19:9 | -33 | 0x10000000000000000 // *big.Int value. +19 | 0x10000000000000000 // *big.Int value. | ^^^^^^^^^^^^^^^^^^^ ... -66 | repeated int32 i1 = 1; -67 | repeated sint32 i2 = 2; +52 | repeated int32 i1 = 1; +53 | repeated sint32 i2 = 2; | --------------- expected due to this | = note: the range for `sint32` is `-0x80000000 to 0x7fffffff` error: literal out of range for `sfixed32` - --> testdata/options/values/int32.proto:38:9 + --> testdata/options/values/int32.proto:24:9 | -38 | 0x80000000, -0x80000001, // Out-of-range values. +24 | 0x80000000, -0x80000001, // Out-of-range values. | ^^^^^^^^^^ -39 | 0x10000000000000000 // *big.Int value. +25 | 0x10000000000000000 // *big.Int value. ... -67 | repeated sint32 i2 = 2; -68 | repeated sfixed32 i3 = 3; +53 | repeated sint32 i2 = 2; +54 | repeated sfixed32 i3 = 3; | ----------------- expected due to this | = note: the range for `sfixed32` is `-0x80000000 to 0x7fffffff` error: literal out of range for `sfixed32` - --> testdata/options/values/int32.proto:38:21 + --> testdata/options/values/int32.proto:24:21 | -38 | 0x80000000, -0x80000001, // Out-of-range values. +24 | 0x80000000, -0x80000001, // Out-of-range values. | ^^^^^^^^^^^ -39 | 0x10000000000000000 // *big.Int value. +25 | 0x10000000000000000 // *big.Int value. ... -67 | repeated sint32 i2 = 2; -68 | repeated sfixed32 i3 = 3; +53 | repeated sint32 i2 = 2; +54 | repeated sfixed32 i3 = 3; | ----------------- expected due to this | = note: the range for `sfixed32` is `-0x80000000 to 0x7fffffff` error: literal out of range for `sfixed32` - --> testdata/options/values/int32.proto:39:9 + --> testdata/options/values/int32.proto:25:9 | -39 | 0x10000000000000000 // *big.Int value. +25 | 0x10000000000000000 // *big.Int value. | ^^^^^^^^^^^^^^^^^^^ ... -67 | repeated sint32 i2 = 2; -68 | repeated sfixed32 i3 = 3; +53 | repeated sint32 i2 = 2; +54 | repeated sfixed32 i3 = 3; | ----------------- expected due to this | = note: the range for `sfixed32` is `-0x80000000 to 0x7fffffff` error: literal out of range for `uint32` - --> testdata/options/values/int32.proto:44:9 + --> testdata/options/values/int32.proto:30:9 | -44 | -1, -2, +30 | -1, -2, | ^^ -45 | 0xffffffff, // Max value. +31 | 0xffffffff, // Max value. ... -70 | repeated uint32 u1 = 11; +56 | repeated uint32 u1 = 11; | --------------- expected due to this | = note: the range for `uint32` is `0 to 4294967295` error: literal out of range for `uint32` - --> testdata/options/values/int32.proto:44:13 + --> testdata/options/values/int32.proto:30:13 | -44 | -1, -2, +30 | -1, -2, | ^^ -45 | 0xffffffff, // Max value. +31 | 0xffffffff, // Max value. ... -70 | repeated uint32 u1 = 11; +56 | repeated uint32 u1 = 11; | --------------- expected due to this | = note: the range for `uint32` is `0 to 4294967295` error: literal out of range for `uint32` - --> testdata/options/values/int32.proto:46:9 + --> testdata/options/values/int32.proto:32:9 | -46 | 0x100000000, -0x80000000, // Out-of-range values. +32 | 0x100000000, -0x80000000, // Out-of-range values. | ^^^^^^^^^^^ -47 | 0x10000000000000000 // *big.Int value. +33 | 0x10000000000000000 // *big.Int value. ... -70 | repeated uint32 u1 = 11; +56 | repeated uint32 u1 = 11; | --------------- expected due to this | = note: the range for `uint32` is `0x0 to 0xffffffff` error: literal out of range for `uint32` - --> testdata/options/values/int32.proto:46:22 + --> testdata/options/values/int32.proto:32:22 | -46 | 0x100000000, -0x80000000, // Out-of-range values. +32 | 0x100000000, -0x80000000, // Out-of-range values. | ^^^^^^^^^^^ -47 | 0x10000000000000000 // *big.Int value. +33 | 0x10000000000000000 // *big.Int value. ... -70 | repeated uint32 u1 = 11; +56 | repeated uint32 u1 = 11; | --------------- expected due to this | = note: the range for `uint32` is `0x0 to 0xffffffff` error: literal out of range for `uint32` - --> testdata/options/values/int32.proto:47:9 + --> testdata/options/values/int32.proto:33:9 | -47 | 0x10000000000000000 // *big.Int value. +33 | 0x10000000000000000 // *big.Int value. | ^^^^^^^^^^^^^^^^^^^ ... -70 | repeated uint32 u1 = 11; +56 | repeated uint32 u1 = 11; | --------------- expected due to this | = note: the range for `uint32` is `0x0 to 0xffffffff` error: literal out of range for `fixed32` - --> testdata/options/values/int32.proto:51:9 + --> testdata/options/values/int32.proto:37:9 | -51 | -1, -2, +37 | -1, -2, | ^^ -52 | 0xffffffff, // Max value. +38 | 0xffffffff, // Max value. ... -70 | repeated uint32 u1 = 11; -71 | repeated fixed32 u2 = 12; +56 | repeated uint32 u1 = 11; +57 | repeated fixed32 u2 = 12; | ---------------- expected due to this | = note: the range for `fixed32` is `0 to 4294967295` error: literal out of range for `fixed32` - --> testdata/options/values/int32.proto:51:13 + --> testdata/options/values/int32.proto:37:13 | -51 | -1, -2, +37 | -1, -2, | ^^ -52 | 0xffffffff, // Max value. +38 | 0xffffffff, // Max value. ... -70 | repeated uint32 u1 = 11; -71 | repeated fixed32 u2 = 12; +56 | repeated uint32 u1 = 11; +57 | repeated fixed32 u2 = 12; | ---------------- expected due to this | = note: the range for `fixed32` is `0 to 4294967295` error: literal out of range for `fixed32` - --> testdata/options/values/int32.proto:53:9 + --> testdata/options/values/int32.proto:39:9 | -53 | 0x100000000, -0x80000000, // Out-of-range values. +39 | 0x100000000, -0x80000000, // Out-of-range values. | ^^^^^^^^^^^ -54 | 0x10000000000000000 // *big.Int value. +40 | 0x10000000000000000 // *big.Int value. ... -70 | repeated uint32 u1 = 11; -71 | repeated fixed32 u2 = 12; +56 | repeated uint32 u1 = 11; +57 | repeated fixed32 u2 = 12; | ---------------- expected due to this | = note: the range for `fixed32` is `0x0 to 0xffffffff` error: literal out of range for `fixed32` - --> testdata/options/values/int32.proto:53:22 + --> testdata/options/values/int32.proto:39:22 | -53 | 0x100000000, -0x80000000, // Out-of-range values. +39 | 0x100000000, -0x80000000, // Out-of-range values. | ^^^^^^^^^^^ -54 | 0x10000000000000000 // *big.Int value. +40 | 0x10000000000000000 // *big.Int value. ... -70 | repeated uint32 u1 = 11; -71 | repeated fixed32 u2 = 12; +56 | repeated uint32 u1 = 11; +57 | repeated fixed32 u2 = 12; | ---------------- expected due to this | = note: the range for `fixed32` is `0x0 to 0xffffffff` error: literal out of range for `fixed32` - --> testdata/options/values/int32.proto:54:9 + --> testdata/options/values/int32.proto:40:9 | -54 | 0x10000000000000000 // *big.Int value. +40 | 0x10000000000000000 // *big.Int value. | ^^^^^^^^^^^^^^^^^^^ ... -70 | repeated uint32 u1 = 11; -71 | repeated fixed32 u2 = 12; +56 | repeated uint32 u1 = 11; +57 | repeated fixed32 u2 = 12; | ---------------- expected due to this | = note: the range for `fixed32` is `0x0 to 0xffffffff` error: mismatched types - --> testdata/options/values/int32.proto:58:10 + --> testdata/options/values/int32.proto:44:10 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ expected `int32`, found floating-point literal -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int32 i1 = 1; +52 | repeated int32 i1 = 1; | -------------- expected due to this | = note: expected: scalar type `int32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:58:15 + --> testdata/options/values/int32.proto:44:15 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^ expected `int32`, found `string` -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int32 i1 = 1; +52 | repeated int32 i1 = 1; | -------------- expected due to this | = note: expected: scalar type `int32` found: scalar type `string` error: mismatched types - --> testdata/options/values/int32.proto:58:22 + --> testdata/options/values/int32.proto:44:22 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^ expected `int32`, found `bool` -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int32 i1 = 1; +52 | repeated int32 i1 = 1; | -------------- expected due to this | = note: expected: scalar type `int32` found: scalar type `bool` error: mismatched types - --> testdata/options/values/int32.proto:58:28 + --> testdata/options/values/int32.proto:44:28 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `int32`, found floating-point literal -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int32 i1 = 1; +52 | repeated int32 i1 = 1; | -------------- expected due to this | = note: expected: scalar type `int32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:58:33 + --> testdata/options/values/int32.proto:44:33 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `int32`, found floating-point literal -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int32 i1 = 1; +52 | repeated int32 i1 = 1; | -------------- expected due to this | = note: expected: scalar type `int32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:58:38 + --> testdata/options/values/int32.proto:44:38 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^ | | | expected `int32`, found message expression -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int32 i1 = 1; +52 | repeated int32 i1 = 1; | -------------- expected due to this | = note: expected: scalar type `int32` found: message expression error: mismatched types - --> testdata/options/values/int32.proto:59:10 + --> testdata/options/values/int32.proto:45:10 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ expected `sint32`, found floating-point literal -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int32 i1 = 1; -67 | repeated sint32 i2 = 2; +52 | repeated int32 i1 = 1; +53 | repeated sint32 i2 = 2; | --------------- expected due to this | = note: expected: scalar type `sint32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:59:15 + --> testdata/options/values/int32.proto:45:15 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^ expected `sint32`, found `string` -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int32 i1 = 1; -67 | repeated sint32 i2 = 2; +52 | repeated int32 i1 = 1; +53 | repeated sint32 i2 = 2; | --------------- expected due to this | = note: expected: scalar type `sint32` found: scalar type `string` error: mismatched types - --> testdata/options/values/int32.proto:59:22 + --> testdata/options/values/int32.proto:45:22 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^ expected `sint32`, found `bool` -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int32 i1 = 1; -67 | repeated sint32 i2 = 2; +52 | repeated int32 i1 = 1; +53 | repeated sint32 i2 = 2; | --------------- expected due to this | = note: expected: scalar type `sint32` found: scalar type `bool` error: mismatched types - --> testdata/options/values/int32.proto:59:28 + --> testdata/options/values/int32.proto:45:28 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `sint32`, found floating-point literal -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int32 i1 = 1; -67 | repeated sint32 i2 = 2; +52 | repeated int32 i1 = 1; +53 | repeated sint32 i2 = 2; | --------------- expected due to this | = note: expected: scalar type `sint32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:59:33 + --> testdata/options/values/int32.proto:45:33 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `sint32`, found floating-point literal -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int32 i1 = 1; -67 | repeated sint32 i2 = 2; +52 | repeated int32 i1 = 1; +53 | repeated sint32 i2 = 2; | --------------- expected due to this | = note: expected: scalar type `sint32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:59:38 + --> testdata/options/values/int32.proto:45:38 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^ | | | expected `sint32`, found message expression -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int32 i1 = 1; -67 | repeated sint32 i2 = 2; +52 | repeated int32 i1 = 1; +53 | repeated sint32 i2 = 2; | --------------- expected due to this | = note: expected: scalar type `sint32` found: message expression error: mismatched types - --> testdata/options/values/int32.proto:60:10 + --> testdata/options/values/int32.proto:46:10 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ expected `sfixed32`, found floating-point literal -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -67 | repeated sint32 i2 = 2; -68 | repeated sfixed32 i3 = 3; +53 | repeated sint32 i2 = 2; +54 | repeated sfixed32 i3 = 3; | ----------------- expected due to this | = note: expected: scalar type `sfixed32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:60:15 + --> testdata/options/values/int32.proto:46:15 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^ expected `sfixed32`, found `string` -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -67 | repeated sint32 i2 = 2; -68 | repeated sfixed32 i3 = 3; +53 | repeated sint32 i2 = 2; +54 | repeated sfixed32 i3 = 3; | ----------------- expected due to this | = note: expected: scalar type `sfixed32` found: scalar type `string` error: mismatched types - --> testdata/options/values/int32.proto:60:22 + --> testdata/options/values/int32.proto:46:22 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^ expected `sfixed32`, found `bool` -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -67 | repeated sint32 i2 = 2; -68 | repeated sfixed32 i3 = 3; +53 | repeated sint32 i2 = 2; +54 | repeated sfixed32 i3 = 3; | ----------------- expected due to this | = note: expected: scalar type `sfixed32` found: scalar type `bool` error: mismatched types - --> testdata/options/values/int32.proto:60:28 + --> testdata/options/values/int32.proto:46:28 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `sfixed32`, found floating-point literal -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -67 | repeated sint32 i2 = 2; -68 | repeated sfixed32 i3 = 3; +53 | repeated sint32 i2 = 2; +54 | repeated sfixed32 i3 = 3; | ----------------- expected due to this | = note: expected: scalar type `sfixed32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:60:33 + --> testdata/options/values/int32.proto:46:33 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `sfixed32`, found floating-point literal -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -67 | repeated sint32 i2 = 2; -68 | repeated sfixed32 i3 = 3; +53 | repeated sint32 i2 = 2; +54 | repeated sfixed32 i3 = 3; | ----------------- expected due to this | = note: expected: scalar type `sfixed32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:60:38 + --> testdata/options/values/int32.proto:46:38 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^ | | | expected `sfixed32`, found message expression -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -67 | repeated sint32 i2 = 2; -68 | repeated sfixed32 i3 = 3; +53 | repeated sint32 i2 = 2; +54 | repeated sfixed32 i3 = 3; | ----------------- expected due to this | = note: expected: scalar type `sfixed32` found: message expression error: mismatched types - --> testdata/options/values/int32.proto:61:10 + --> testdata/options/values/int32.proto:47:10 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ expected `uint32`, found floating-point literal -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -70 | repeated uint32 u1 = 11; +56 | repeated uint32 u1 = 11; | --------------- expected due to this | = note: expected: scalar type `uint32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:61:15 + --> testdata/options/values/int32.proto:47:15 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^ expected `uint32`, found `string` -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -70 | repeated uint32 u1 = 11; +56 | repeated uint32 u1 = 11; | --------------- expected due to this | = note: expected: scalar type `uint32` found: scalar type `string` error: mismatched types - --> testdata/options/values/int32.proto:61:22 + --> testdata/options/values/int32.proto:47:22 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^ expected `uint32`, found `bool` -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -70 | repeated uint32 u1 = 11; +56 | repeated uint32 u1 = 11; | --------------- expected due to this | = note: expected: scalar type `uint32` found: scalar type `bool` error: mismatched types - --> testdata/options/values/int32.proto:61:28 + --> testdata/options/values/int32.proto:47:28 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `uint32`, found floating-point literal -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -70 | repeated uint32 u1 = 11; +56 | repeated uint32 u1 = 11; | --------------- expected due to this | = note: expected: scalar type `uint32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:61:33 + --> testdata/options/values/int32.proto:47:33 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `uint32`, found floating-point literal -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -70 | repeated uint32 u1 = 11; +56 | repeated uint32 u1 = 11; | --------------- expected due to this | = note: expected: scalar type `uint32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:61:38 + --> testdata/options/values/int32.proto:47:38 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^ | | | expected `uint32`, found message expression -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -70 | repeated uint32 u1 = 11; +56 | repeated uint32 u1 = 11; | --------------- expected due to this | = note: expected: scalar type `uint32` found: message expression error: mismatched types - --> testdata/options/values/int32.proto:62:10 + --> testdata/options/values/int32.proto:48:10 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ expected `fixed32`, found floating-point literal ... -70 | repeated uint32 u1 = 11; -71 | repeated fixed32 u2 = 12; +56 | repeated uint32 u1 = 11; +57 | repeated fixed32 u2 = 12; | ---------------- expected due to this | = note: expected: scalar type `fixed32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:62:15 + --> testdata/options/values/int32.proto:48:15 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^ expected `fixed32`, found `string` ... -70 | repeated uint32 u1 = 11; -71 | repeated fixed32 u2 = 12; +56 | repeated uint32 u1 = 11; +57 | repeated fixed32 u2 = 12; | ---------------- expected due to this | = note: expected: scalar type `fixed32` found: scalar type `string` error: mismatched types - --> testdata/options/values/int32.proto:62:22 + --> testdata/options/values/int32.proto:48:22 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^ expected `fixed32`, found `bool` ... -70 | repeated uint32 u1 = 11; -71 | repeated fixed32 u2 = 12; +56 | repeated uint32 u1 = 11; +57 | repeated fixed32 u2 = 12; | ---------------- expected due to this | = note: expected: scalar type `fixed32` found: scalar type `bool` error: mismatched types - --> testdata/options/values/int32.proto:62:28 + --> testdata/options/values/int32.proto:48:28 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `fixed32`, found floating-point literal ... -70 | repeated uint32 u1 = 11; -71 | repeated fixed32 u2 = 12; +56 | repeated uint32 u1 = 11; +57 | repeated fixed32 u2 = 12; | ---------------- expected due to this | = note: expected: scalar type `fixed32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:62:33 + --> testdata/options/values/int32.proto:48:33 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `fixed32`, found floating-point literal ... -70 | repeated uint32 u1 = 11; -71 | repeated fixed32 u2 = 12; +56 | repeated uint32 u1 = 11; +57 | repeated fixed32 u2 = 12; | ---------------- expected due to this | = note: expected: scalar type `fixed32` found: floating-point literal error: mismatched types - --> testdata/options/values/int32.proto:62:38 + --> testdata/options/values/int32.proto:48:38 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^ | | | expected `fixed32`, found message expression ... -70 | repeated uint32 u1 = 11; -71 | repeated fixed32 u2 = 12; +56 | repeated uint32 u1 = 11; +57 | repeated fixed32 u2 = 12; | ---------------- expected due to this | = note: expected: scalar type `fixed32` diff --git a/experimental/ir/testdata/options/values/int64.proto b/experimental/ir/testdata/options/values/int64.proto index 10db1ce21..be3c85111 100644 --- a/experimental/ir/testdata/options/values/int64.proto +++ b/experimental/ir/testdata/options/values/int64.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/values/int64.proto.stderr.txt b/experimental/ir/testdata/options/values/int64.proto.stderr.txt index 389638e55..f2214f7cf 100644 --- a/experimental/ir/testdata/options/values/int64.proto.stderr.txt +++ b/experimental/ir/testdata/options/values/int64.proto.stderr.txt @@ -1,737 +1,737 @@ error: nested array expressions are not allowed - --> testdata/options/values/int64.proto:58:42 + --> testdata/options/values/int64.proto:44:42 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ---------------------------------^^--------- | | | | ...within this array expression cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/int64.proto:58:46 + --> testdata/options/values/int64.proto:44:46 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^^ error: nested array expressions are not allowed - --> testdata/options/values/int64.proto:59:42 + --> testdata/options/values/int64.proto:45:42 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ---------------------------------^^--------- | | | | ...within this array expression cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/int64.proto:59:46 + --> testdata/options/values/int64.proto:45:46 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^^ error: nested array expressions are not allowed - --> testdata/options/values/int64.proto:60:42 + --> testdata/options/values/int64.proto:46:42 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ---------------------------------^^--------- | | | | ...within this array expression cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/int64.proto:60:46 + --> testdata/options/values/int64.proto:46:46 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^^ error: nested array expressions are not allowed - --> testdata/options/values/int64.proto:61:42 + --> testdata/options/values/int64.proto:47:42 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ---------------------------------^^--------- | | | | ...within this array expression cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/int64.proto:61:46 + --> testdata/options/values/int64.proto:47:46 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^^ error: nested array expressions are not allowed - --> testdata/options/values/int64.proto:62:42 + --> testdata/options/values/int64.proto:48:42 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ---------------------------------^^--------- | | | | ...within this array expression cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/int64.proto:62:46 + --> testdata/options/values/int64.proto:48:46 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^^ error: literal out of range for `int64` - --> testdata/options/values/int64.proto:26:9 + --> testdata/options/values/int64.proto:12:9 | -26 | 0x8000000000000000, -0x8000000000000001, // Out-of-range values. +12 | 0x8000000000000000, -0x8000000000000001, // Out-of-range values. | ^^^^^^^^^^^^^^^^^^ -27 | 0x10000000000000000 // *big.Int value. +13 | 0x10000000000000000 // *big.Int value. ... -66 | repeated int64 i1 = 1; +52 | repeated int64 i1 = 1; | -------------- expected due to this | = note: the range for `int64` is `-0x8000000000000000 to 0x7fffffffffffffff` error: literal out of range for `int64` - --> testdata/options/values/int64.proto:26:29 + --> testdata/options/values/int64.proto:12:29 | -26 | 0x8000000000000000, -0x8000000000000001, // Out-of-range values. +12 | 0x8000000000000000, -0x8000000000000001, // Out-of-range values. | ^^^^^^^^^^^^^^^^^^^ -27 | 0x10000000000000000 // *big.Int value. +13 | 0x10000000000000000 // *big.Int value. ... -66 | repeated int64 i1 = 1; +52 | repeated int64 i1 = 1; | -------------- expected due to this | = note: the range for `int64` is `-0x8000000000000000 to 0x7fffffffffffffff` error: literal out of range for `int64` - --> testdata/options/values/int64.proto:27:9 + --> testdata/options/values/int64.proto:13:9 | -27 | 0x10000000000000000 // *big.Int value. +13 | 0x10000000000000000 // *big.Int value. | ^^^^^^^^^^^^^^^^^^^ ... -66 | repeated int64 i1 = 1; +52 | repeated int64 i1 = 1; | -------------- expected due to this | = note: the range for `int64` is `-0x8000000000000000 to 0x7fffffffffffffff` error: literal out of range for `sint64` - --> testdata/options/values/int64.proto:32:9 + --> testdata/options/values/int64.proto:18:9 | -32 | 0x8000000000000000, -0x8000000000000001, // Out-of-range values. +18 | 0x8000000000000000, -0x8000000000000001, // Out-of-range values. | ^^^^^^^^^^^^^^^^^^ -33 | 0x10000000000000000 // *big.Int value. +19 | 0x10000000000000000 // *big.Int value. ... -66 | repeated int64 i1 = 1; -67 | repeated sint64 i2 = 2; +52 | repeated int64 i1 = 1; +53 | repeated sint64 i2 = 2; | --------------- expected due to this | = note: the range for `sint64` is `-0x8000000000000000 to 0x7fffffffffffffff` error: literal out of range for `sint64` - --> testdata/options/values/int64.proto:32:29 + --> testdata/options/values/int64.proto:18:29 | -32 | 0x8000000000000000, -0x8000000000000001, // Out-of-range values. +18 | 0x8000000000000000, -0x8000000000000001, // Out-of-range values. | ^^^^^^^^^^^^^^^^^^^ -33 | 0x10000000000000000 // *big.Int value. +19 | 0x10000000000000000 // *big.Int value. ... -66 | repeated int64 i1 = 1; -67 | repeated sint64 i2 = 2; +52 | repeated int64 i1 = 1; +53 | repeated sint64 i2 = 2; | --------------- expected due to this | = note: the range for `sint64` is `-0x8000000000000000 to 0x7fffffffffffffff` error: literal out of range for `sint64` - --> testdata/options/values/int64.proto:33:9 + --> testdata/options/values/int64.proto:19:9 | -33 | 0x10000000000000000 // *big.Int value. +19 | 0x10000000000000000 // *big.Int value. | ^^^^^^^^^^^^^^^^^^^ ... -66 | repeated int64 i1 = 1; -67 | repeated sint64 i2 = 2; +52 | repeated int64 i1 = 1; +53 | repeated sint64 i2 = 2; | --------------- expected due to this | = note: the range for `sint64` is `-0x8000000000000000 to 0x7fffffffffffffff` error: literal out of range for `sfixed64` - --> testdata/options/values/int64.proto:38:9 + --> testdata/options/values/int64.proto:24:9 | -38 | 0x8000000000000000, -0x8000000000000001, // Out-of-range values. +24 | 0x8000000000000000, -0x8000000000000001, // Out-of-range values. | ^^^^^^^^^^^^^^^^^^ -39 | 0x10000000000000000 // *big.Int value. +25 | 0x10000000000000000 // *big.Int value. ... -67 | repeated sint64 i2 = 2; -68 | repeated sfixed64 i3 = 3; +53 | repeated sint64 i2 = 2; +54 | repeated sfixed64 i3 = 3; | ----------------- expected due to this | = note: the range for `sfixed64` is `-0x8000000000000000 to 0x7fffffffffffffff` error: literal out of range for `sfixed64` - --> testdata/options/values/int64.proto:38:29 + --> testdata/options/values/int64.proto:24:29 | -38 | 0x8000000000000000, -0x8000000000000001, // Out-of-range values. +24 | 0x8000000000000000, -0x8000000000000001, // Out-of-range values. | ^^^^^^^^^^^^^^^^^^^ -39 | 0x10000000000000000 // *big.Int value. +25 | 0x10000000000000000 // *big.Int value. ... -67 | repeated sint64 i2 = 2; -68 | repeated sfixed64 i3 = 3; +53 | repeated sint64 i2 = 2; +54 | repeated sfixed64 i3 = 3; | ----------------- expected due to this | = note: the range for `sfixed64` is `-0x8000000000000000 to 0x7fffffffffffffff` error: literal out of range for `sfixed64` - --> testdata/options/values/int64.proto:39:9 + --> testdata/options/values/int64.proto:25:9 | -39 | 0x10000000000000000 // *big.Int value. +25 | 0x10000000000000000 // *big.Int value. | ^^^^^^^^^^^^^^^^^^^ ... -67 | repeated sint64 i2 = 2; -68 | repeated sfixed64 i3 = 3; +53 | repeated sint64 i2 = 2; +54 | repeated sfixed64 i3 = 3; | ----------------- expected due to this | = note: the range for `sfixed64` is `-0x8000000000000000 to 0x7fffffffffffffff` error: literal out of range for `uint64` - --> testdata/options/values/int64.proto:44:9 + --> testdata/options/values/int64.proto:30:9 | -44 | -1, -2, +30 | -1, -2, | ^^ -45 | 0xffffffffffffffff, // Max value. +31 | 0xffffffffffffffff, // Max value. ... -70 | repeated uint64 u1 = 11; +56 | repeated uint64 u1 = 11; | --------------- expected due to this | = note: the range for `uint64` is `0 to 18446744073709551615` error: literal out of range for `uint64` - --> testdata/options/values/int64.proto:44:13 + --> testdata/options/values/int64.proto:30:13 | -44 | -1, -2, +30 | -1, -2, | ^^ -45 | 0xffffffffffffffff, // Max value. +31 | 0xffffffffffffffff, // Max value. ... -70 | repeated uint64 u1 = 11; +56 | repeated uint64 u1 = 11; | --------------- expected due to this | = note: the range for `uint64` is `0 to 18446744073709551615` error: literal out of range for `uint64` - --> testdata/options/values/int64.proto:46:9 + --> testdata/options/values/int64.proto:32:9 | -46 | 0x10000000000000000, -0x8000000000000000, // Out-of-range values. +32 | 0x10000000000000000, -0x8000000000000000, // Out-of-range values. | ^^^^^^^^^^^^^^^^^^^ -47 | 0x10000000000000000 // *big.Int value. +33 | 0x10000000000000000 // *big.Int value. ... -70 | repeated uint64 u1 = 11; +56 | repeated uint64 u1 = 11; | --------------- expected due to this | = note: the range for `uint64` is `0x0 to 0xffffffffffffffff` error: literal out of range for `uint64` - --> testdata/options/values/int64.proto:46:30 + --> testdata/options/values/int64.proto:32:30 | -46 | 0x10000000000000000, -0x8000000000000000, // Out-of-range values. +32 | 0x10000000000000000, -0x8000000000000000, // Out-of-range values. | ^^^^^^^^^^^^^^^^^^^ -47 | 0x10000000000000000 // *big.Int value. +33 | 0x10000000000000000 // *big.Int value. ... -70 | repeated uint64 u1 = 11; +56 | repeated uint64 u1 = 11; | --------------- expected due to this | = note: the range for `uint64` is `0x0 to 0xffffffffffffffff` error: literal out of range for `uint64` - --> testdata/options/values/int64.proto:47:9 + --> testdata/options/values/int64.proto:33:9 | -47 | 0x10000000000000000 // *big.Int value. +33 | 0x10000000000000000 // *big.Int value. | ^^^^^^^^^^^^^^^^^^^ ... -70 | repeated uint64 u1 = 11; +56 | repeated uint64 u1 = 11; | --------------- expected due to this | = note: the range for `uint64` is `0x0 to 0xffffffffffffffff` error: literal out of range for `fixed64` - --> testdata/options/values/int64.proto:51:9 + --> testdata/options/values/int64.proto:37:9 | -51 | -1, -2, +37 | -1, -2, | ^^ -52 | 0xffffffffffffffff, // Max value. +38 | 0xffffffffffffffff, // Max value. ... -70 | repeated uint64 u1 = 11; -71 | repeated fixed64 u2 = 12; +56 | repeated uint64 u1 = 11; +57 | repeated fixed64 u2 = 12; | ---------------- expected due to this | = note: the range for `fixed64` is `0 to 18446744073709551615` error: literal out of range for `fixed64` - --> testdata/options/values/int64.proto:51:13 + --> testdata/options/values/int64.proto:37:13 | -51 | -1, -2, +37 | -1, -2, | ^^ -52 | 0xffffffffffffffff, // Max value. +38 | 0xffffffffffffffff, // Max value. ... -70 | repeated uint64 u1 = 11; -71 | repeated fixed64 u2 = 12; +56 | repeated uint64 u1 = 11; +57 | repeated fixed64 u2 = 12; | ---------------- expected due to this | = note: the range for `fixed64` is `0 to 18446744073709551615` error: literal out of range for `fixed64` - --> testdata/options/values/int64.proto:53:9 + --> testdata/options/values/int64.proto:39:9 | -53 | 0x10000000000000000, -0x8000000000000000, // Out-of-range values. +39 | 0x10000000000000000, -0x8000000000000000, // Out-of-range values. | ^^^^^^^^^^^^^^^^^^^ -54 | 0x10000000000000000 // *big.Int value. +40 | 0x10000000000000000 // *big.Int value. ... -70 | repeated uint64 u1 = 11; -71 | repeated fixed64 u2 = 12; +56 | repeated uint64 u1 = 11; +57 | repeated fixed64 u2 = 12; | ---------------- expected due to this | = note: the range for `fixed64` is `0x0 to 0xffffffffffffffff` error: literal out of range for `fixed64` - --> testdata/options/values/int64.proto:53:30 + --> testdata/options/values/int64.proto:39:30 | -53 | 0x10000000000000000, -0x8000000000000000, // Out-of-range values. +39 | 0x10000000000000000, -0x8000000000000000, // Out-of-range values. | ^^^^^^^^^^^^^^^^^^^ -54 | 0x10000000000000000 // *big.Int value. +40 | 0x10000000000000000 // *big.Int value. ... -70 | repeated uint64 u1 = 11; -71 | repeated fixed64 u2 = 12; +56 | repeated uint64 u1 = 11; +57 | repeated fixed64 u2 = 12; | ---------------- expected due to this | = note: the range for `fixed64` is `0x0 to 0xffffffffffffffff` error: literal out of range for `fixed64` - --> testdata/options/values/int64.proto:54:9 + --> testdata/options/values/int64.proto:40:9 | -54 | 0x10000000000000000 // *big.Int value. +40 | 0x10000000000000000 // *big.Int value. | ^^^^^^^^^^^^^^^^^^^ ... -70 | repeated uint64 u1 = 11; -71 | repeated fixed64 u2 = 12; +56 | repeated uint64 u1 = 11; +57 | repeated fixed64 u2 = 12; | ---------------- expected due to this | = note: the range for `fixed64` is `0x0 to 0xffffffffffffffff` error: mismatched types - --> testdata/options/values/int64.proto:58:10 + --> testdata/options/values/int64.proto:44:10 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ expected `int64`, found floating-point literal -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int64 i1 = 1; +52 | repeated int64 i1 = 1; | -------------- expected due to this | = note: expected: scalar type `int64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:58:15 + --> testdata/options/values/int64.proto:44:15 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^ expected `int64`, found `string` -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int64 i1 = 1; +52 | repeated int64 i1 = 1; | -------------- expected due to this | = note: expected: scalar type `int64` found: scalar type `string` error: mismatched types - --> testdata/options/values/int64.proto:58:22 + --> testdata/options/values/int64.proto:44:22 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^ expected `int64`, found `bool` -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int64 i1 = 1; +52 | repeated int64 i1 = 1; | -------------- expected due to this | = note: expected: scalar type `int64` found: scalar type `bool` error: mismatched types - --> testdata/options/values/int64.proto:58:28 + --> testdata/options/values/int64.proto:44:28 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `int64`, found floating-point literal -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int64 i1 = 1; +52 | repeated int64 i1 = 1; | -------------- expected due to this | = note: expected: scalar type `int64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:58:33 + --> testdata/options/values/int64.proto:44:33 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `int64`, found floating-point literal -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int64 i1 = 1; +52 | repeated int64 i1 = 1; | -------------- expected due to this | = note: expected: scalar type `int64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:58:38 + --> testdata/options/values/int64.proto:44:38 | -58 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +44 | i1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^ | | | expected `int64`, found message expression -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int64 i1 = 1; +52 | repeated int64 i1 = 1; | -------------- expected due to this | = note: expected: scalar type `int64` found: message expression error: mismatched types - --> testdata/options/values/int64.proto:59:10 + --> testdata/options/values/int64.proto:45:10 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ expected `sint64`, found floating-point literal -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int64 i1 = 1; -67 | repeated sint64 i2 = 2; +52 | repeated int64 i1 = 1; +53 | repeated sint64 i2 = 2; | --------------- expected due to this | = note: expected: scalar type `sint64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:59:15 + --> testdata/options/values/int64.proto:45:15 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^ expected `sint64`, found `string` -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int64 i1 = 1; -67 | repeated sint64 i2 = 2; +52 | repeated int64 i1 = 1; +53 | repeated sint64 i2 = 2; | --------------- expected due to this | = note: expected: scalar type `sint64` found: scalar type `string` error: mismatched types - --> testdata/options/values/int64.proto:59:22 + --> testdata/options/values/int64.proto:45:22 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^ expected `sint64`, found `bool` -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int64 i1 = 1; -67 | repeated sint64 i2 = 2; +52 | repeated int64 i1 = 1; +53 | repeated sint64 i2 = 2; | --------------- expected due to this | = note: expected: scalar type `sint64` found: scalar type `bool` error: mismatched types - --> testdata/options/values/int64.proto:59:28 + --> testdata/options/values/int64.proto:45:28 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `sint64`, found floating-point literal -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int64 i1 = 1; -67 | repeated sint64 i2 = 2; +52 | repeated int64 i1 = 1; +53 | repeated sint64 i2 = 2; | --------------- expected due to this | = note: expected: scalar type `sint64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:59:33 + --> testdata/options/values/int64.proto:45:33 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `sint64`, found floating-point literal -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int64 i1 = 1; -67 | repeated sint64 i2 = 2; +52 | repeated int64 i1 = 1; +53 | repeated sint64 i2 = 2; | --------------- expected due to this | = note: expected: scalar type `sint64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:59:38 + --> testdata/options/values/int64.proto:45:38 | -59 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +45 | i2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^ | | | expected `sint64`, found message expression -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -66 | repeated int64 i1 = 1; -67 | repeated sint64 i2 = 2; +52 | repeated int64 i1 = 1; +53 | repeated sint64 i2 = 2; | --------------- expected due to this | = note: expected: scalar type `sint64` found: message expression error: mismatched types - --> testdata/options/values/int64.proto:60:10 + --> testdata/options/values/int64.proto:46:10 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ expected `sfixed64`, found floating-point literal -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -67 | repeated sint64 i2 = 2; -68 | repeated sfixed64 i3 = 3; +53 | repeated sint64 i2 = 2; +54 | repeated sfixed64 i3 = 3; | ----------------- expected due to this | = note: expected: scalar type `sfixed64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:60:15 + --> testdata/options/values/int64.proto:46:15 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^ expected `sfixed64`, found `string` -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -67 | repeated sint64 i2 = 2; -68 | repeated sfixed64 i3 = 3; +53 | repeated sint64 i2 = 2; +54 | repeated sfixed64 i3 = 3; | ----------------- expected due to this | = note: expected: scalar type `sfixed64` found: scalar type `string` error: mismatched types - --> testdata/options/values/int64.proto:60:22 + --> testdata/options/values/int64.proto:46:22 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^ expected `sfixed64`, found `bool` -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -67 | repeated sint64 i2 = 2; -68 | repeated sfixed64 i3 = 3; +53 | repeated sint64 i2 = 2; +54 | repeated sfixed64 i3 = 3; | ----------------- expected due to this | = note: expected: scalar type `sfixed64` found: scalar type `bool` error: mismatched types - --> testdata/options/values/int64.proto:60:28 + --> testdata/options/values/int64.proto:46:28 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `sfixed64`, found floating-point literal -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -67 | repeated sint64 i2 = 2; -68 | repeated sfixed64 i3 = 3; +53 | repeated sint64 i2 = 2; +54 | repeated sfixed64 i3 = 3; | ----------------- expected due to this | = note: expected: scalar type `sfixed64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:60:33 + --> testdata/options/values/int64.proto:46:33 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `sfixed64`, found floating-point literal -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -67 | repeated sint64 i2 = 2; -68 | repeated sfixed64 i3 = 3; +53 | repeated sint64 i2 = 2; +54 | repeated sfixed64 i3 = 3; | ----------------- expected due to this | = note: expected: scalar type `sfixed64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:60:38 + --> testdata/options/values/int64.proto:46:38 | -60 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +46 | i3: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^ | | | expected `sfixed64`, found message expression -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -67 | repeated sint64 i2 = 2; -68 | repeated sfixed64 i3 = 3; +53 | repeated sint64 i2 = 2; +54 | repeated sfixed64 i3 = 3; | ----------------- expected due to this | = note: expected: scalar type `sfixed64` found: message expression error: mismatched types - --> testdata/options/values/int64.proto:61:10 + --> testdata/options/values/int64.proto:47:10 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ expected `uint64`, found floating-point literal -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -70 | repeated uint64 u1 = 11; +56 | repeated uint64 u1 = 11; | --------------- expected due to this | = note: expected: scalar type `uint64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:61:15 + --> testdata/options/values/int64.proto:47:15 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^ expected `uint64`, found `string` -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -70 | repeated uint64 u1 = 11; +56 | repeated uint64 u1 = 11; | --------------- expected due to this | = note: expected: scalar type `uint64` found: scalar type `string` error: mismatched types - --> testdata/options/values/int64.proto:61:22 + --> testdata/options/values/int64.proto:47:22 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^ expected `uint64`, found `bool` -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -70 | repeated uint64 u1 = 11; +56 | repeated uint64 u1 = 11; | --------------- expected due to this | = note: expected: scalar type `uint64` found: scalar type `bool` error: mismatched types - --> testdata/options/values/int64.proto:61:28 + --> testdata/options/values/int64.proto:47:28 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `uint64`, found floating-point literal -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -70 | repeated uint64 u1 = 11; +56 | repeated uint64 u1 = 11; | --------------- expected due to this | = note: expected: scalar type `uint64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:61:33 + --> testdata/options/values/int64.proto:47:33 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `uint64`, found floating-point literal -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -70 | repeated uint64 u1 = 11; +56 | repeated uint64 u1 = 11; | --------------- expected due to this | = note: expected: scalar type `uint64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:61:38 + --> testdata/options/values/int64.proto:47:38 | -61 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +47 | u1: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^ | | | expected `uint64`, found message expression -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] ... -70 | repeated uint64 u1 = 11; +56 | repeated uint64 u1 = 11; | --------------- expected due to this | = note: expected: scalar type `uint64` found: message expression error: mismatched types - --> testdata/options/values/int64.proto:62:10 + --> testdata/options/values/int64.proto:48:10 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ expected `fixed64`, found floating-point literal ... -70 | repeated uint64 u1 = 11; -71 | repeated fixed64 u2 = 12; +56 | repeated uint64 u1 = 11; +57 | repeated fixed64 u2 = 12; | ---------------- expected due to this | = note: expected: scalar type `fixed64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:62:15 + --> testdata/options/values/int64.proto:48:15 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^^ expected `fixed64`, found `string` ... -70 | repeated uint64 u1 = 11; -71 | repeated fixed64 u2 = 12; +56 | repeated uint64 u1 = 11; +57 | repeated fixed64 u2 = 12; | ---------------- expected due to this | = note: expected: scalar type `fixed64` found: scalar type `string` error: mismatched types - --> testdata/options/values/int64.proto:62:22 + --> testdata/options/values/int64.proto:48:22 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^^ expected `fixed64`, found `bool` ... -70 | repeated uint64 u1 = 11; -71 | repeated fixed64 u2 = 12; +56 | repeated uint64 u1 = 11; +57 | repeated fixed64 u2 = 12; | ---------------- expected due to this | = note: expected: scalar type `fixed64` found: scalar type `bool` error: mismatched types - --> testdata/options/values/int64.proto:62:28 + --> testdata/options/values/int64.proto:48:28 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `fixed64`, found floating-point literal ... -70 | repeated uint64 u1 = 11; -71 | repeated fixed64 u2 = 12; +56 | repeated uint64 u1 = 11; +57 | repeated fixed64 u2 = 12; | ---------------- expected due to this | = note: expected: scalar type `fixed64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:62:33 + --> testdata/options/values/int64.proto:48:33 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `fixed64`, found floating-point literal ... -70 | repeated uint64 u1 = 11; -71 | repeated fixed64 u2 = 12; +56 | repeated uint64 u1 = 11; +57 | repeated fixed64 u2 = 12; | ---------------- expected due to this | = note: expected: scalar type `fixed64` found: floating-point literal error: mismatched types - --> testdata/options/values/int64.proto:62:38 + --> testdata/options/values/int64.proto:48:38 | -62 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] +48 | u2: [1.5, "foo", true, inf, nan, {}, [], 0 to 1] | ^^ | | | expected `fixed64`, found message expression ... -70 | repeated uint64 u1 = 11; -71 | repeated fixed64 u2 = 12; +56 | repeated uint64 u1 = 11; +57 | repeated fixed64 u2 = 12; | ---------------- expected due to this | = note: expected: scalar type `fixed64` diff --git a/experimental/ir/testdata/options/values/locations.proto b/experimental/ir/testdata/options/values/locations.proto index ff259fc60..d90add809 100644 --- a/experimental/ir/testdata/options/values/locations.proto +++ b/experimental/ir/testdata/options/values/locations.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true //% source_code_info: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/values/locations.proto.sci.yaml b/experimental/ir/testdata/options/values/locations.proto.sci.yaml index 7cb3ca57f..9325c7123 100644 --- a/experimental/ir/testdata/options/values/locations.proto.sci.yaml +++ b/experimental/ir/testdata/options/values/locations.proto.sci.yaml @@ -1,166 +1,165 @@ "testdata/options/values/locations.proto": -- { path: "", start: { line: 16, column: 0 }, end: { line: 61, column: 1 } } +- { path: "", start: { line: 2, column: 0 }, end: { line: 47, column: 1 } } - path: ".syntax" - start: { line: 16, column: 0 } - end: { line: 16, column: 18 } + start: { line: 2, column: 0 } + end: { line: 2, column: 18 } leading: "% descriptor: true\n% source_code_info: true\n" - detached: {} - path: ".package" - start: { line: 18, column: 0 } - end: { line: 18, column: 17 } + start: { line: 4, column: 0 } + end: { line: 4, column: 17 } - path: ".dependency.0" - start: { line: 20, column: 0 } - end: { line: 20, column: 42 } + start: { line: 6, column: 0 } + end: { line: 6, column: 42 } - path: ".options" - start: { line: 22, column: 0 } - end: { line: 27, column: 2 } + start: { line: 8, column: 0 } + end: { line: 13, column: 2 } - path: ".options.0" - start: { line: 22, column: 7 } - end: { line: 27, column: 1 } + start: { line: 8, column: 7 } + end: { line: 13, column: 1 } - path: ".message_type[Foo]" - start: { line: 29, column: 0 } - end: { line: 43, column: 1 } + start: { line: 15, column: 0 } + end: { line: 29, column: 1 } - path: ".message_type[Foo].name" - start: { line: 29, column: 8 } - end: { line: 29, column: 11 } + start: { line: 15, column: 8 } + end: { line: 15, column: 11 } - path: ".message_type[Foo].options" - start: { line: 30, column: 4 } - end: { line: 32, column: 6 } + start: { line: 16, column: 4 } + end: { line: 18, column: 6 } - path: ".message_type[Foo].options.0" - start: { line: 30, column: 11 } - end: { line: 32, column: 5 } + start: { line: 16, column: 11 } + end: { line: 18, column: 5 } - path: ".message_type[Foo].field[bar].label" - start: { line: 34, column: 4 } - end: { line: 34, column: 12 } + start: { line: 20, column: 4 } + end: { line: 20, column: 12 } - path: ".message_type[Foo].field[bar]" - start: { line: 34, column: 4 } - end: { line: 42, column: 6 } + start: { line: 20, column: 4 } + end: { line: 28, column: 6 } - path: ".message_type[Foo].field[bar].type" - start: { line: 34, column: 13 } - end: { line: 34, column: 19 } + start: { line: 20, column: 13 } + end: { line: 20, column: 19 } - path: ".message_type[Foo].field[bar].name" - start: { line: 34, column: 20 } - end: { line: 34, column: 23 } + start: { line: 20, column: 20 } + end: { line: 20, column: 23 } - path: ".message_type[Foo].field[bar].number" - start: { line: 34, column: 26 } - end: { line: 34, column: 27 } + start: { line: 20, column: 26 } + end: { line: 20, column: 27 } - path: ".message_type[Foo].field[bar].options" - start: { line: 34, column: 28 } - end: { line: 42, column: 5 } + start: { line: 20, column: 28 } + end: { line: 28, column: 5 } - path: ".message_type[Foo].field[bar].options.0" - start: { line: 35, column: 6 } - end: { line: 41, column: 7 } + start: { line: 21, column: 6 } + end: { line: 27, column: 7 } - path: ".message_type[OptionMessage]" - start: { line: 45, column: 0 } - end: { line: 49, column: 1 } + start: { line: 31, column: 0 } + end: { line: 35, column: 1 } - path: ".message_type[OptionMessage].name" - start: { line: 45, column: 8 } - end: { line: 45, column: 21 } + start: { line: 31, column: 8 } + end: { line: 31, column: 21 } - path: ".message_type[OptionMessage].field[a].label" - start: { line: 46, column: 4 } - end: { line: 46, column: 12 } + start: { line: 32, column: 4 } + end: { line: 32, column: 12 } - path: ".message_type[OptionMessage].field[a]" - start: { line: 46, column: 4 } - end: { line: 46, column: 26 } + start: { line: 32, column: 4 } + end: { line: 32, column: 26 } - path: ".message_type[OptionMessage].field[a].type" - start: { line: 46, column: 13 } - end: { line: 46, column: 19 } + start: { line: 32, column: 13 } + end: { line: 32, column: 19 } - path: ".message_type[OptionMessage].field[a].name" - start: { line: 46, column: 20 } - end: { line: 46, column: 21 } + start: { line: 32, column: 20 } + end: { line: 32, column: 21 } - path: ".message_type[OptionMessage].field[a].number" - start: { line: 46, column: 24 } - end: { line: 46, column: 25 } + start: { line: 32, column: 24 } + end: { line: 32, column: 25 } - path: ".message_type[OptionMessage].field[b].label" - start: { line: 47, column: 4 } - end: { line: 47, column: 12 } + start: { line: 33, column: 4 } + end: { line: 33, column: 12 } - path: ".message_type[OptionMessage].field[b]" - start: { line: 47, column: 4 } - end: { line: 47, column: 25 } + start: { line: 33, column: 4 } + end: { line: 33, column: 25 } - path: ".message_type[OptionMessage].field[b].type" - start: { line: 47, column: 13 } - end: { line: 47, column: 18 } + start: { line: 33, column: 13 } + end: { line: 33, column: 18 } - path: ".message_type[OptionMessage].field[b].name" - start: { line: 47, column: 19 } - end: { line: 47, column: 20 } + start: { line: 33, column: 19 } + end: { line: 33, column: 20 } - path: ".message_type[OptionMessage].field[b].number" - start: { line: 47, column: 23 } - end: { line: 47, column: 24 } + start: { line: 33, column: 23 } + end: { line: 33, column: 24 } - path: ".message_type[OptionMessage].field[c].label" - start: { line: 48, column: 4 } - end: { line: 48, column: 12 } + start: { line: 34, column: 4 } + end: { line: 34, column: 12 } - path: ".message_type[OptionMessage].field[c]" - start: { line: 48, column: 4 } - end: { line: 48, column: 25 } + start: { line: 34, column: 4 } + end: { line: 34, column: 25 } - path: ".message_type[OptionMessage].field[c].type" - start: { line: 48, column: 13 } - end: { line: 48, column: 18 } + start: { line: 34, column: 13 } + end: { line: 34, column: 18 } - path: ".message_type[OptionMessage].field[c].name" - start: { line: 48, column: 19 } - end: { line: 48, column: 20 } + start: { line: 34, column: 19 } + end: { line: 34, column: 20 } - path: ".message_type[OptionMessage].field[c].number" - start: { line: 48, column: 23 } - end: { line: 48, column: 24 } + start: { line: 34, column: 23 } + end: { line: 34, column: 24 } - path: ".extension" - start: { line: 51, column: 0 } - end: { line: 53, column: 1 } + start: { line: 37, column: 0 } + end: { line: 39, column: 1 } - path: ".extension[x].extendee" - start: { line: 51, column: 7 } - end: { line: 51, column: 34 } + start: { line: 37, column: 7 } + end: { line: 37, column: 34 } - path: ".extension[x].label" - start: { line: 52, column: 4 } - end: { line: 52, column: 12 } + start: { line: 38, column: 4 } + end: { line: 38, column: 12 } - path: ".extension[x]" - start: { line: 52, column: 4 } - end: { line: 52, column: 36 } + start: { line: 38, column: 4 } + end: { line: 38, column: 36 } - path: ".extension[x].type_name" - start: { line: 52, column: 13 } - end: { line: 52, column: 26 } + start: { line: 38, column: 13 } + end: { line: 38, column: 26 } - path: ".extension[x].name" - start: { line: 52, column: 27 } - end: { line: 52, column: 28 } + start: { line: 38, column: 27 } + end: { line: 38, column: 28 } - path: ".extension[x].number" - start: { line: 52, column: 31 } - end: { line: 52, column: 35 } + start: { line: 38, column: 31 } + end: { line: 38, column: 35 } - path: ".extension" - start: { line: 55, column: 0 } - end: { line: 57, column: 1 } + start: { line: 41, column: 0 } + end: { line: 43, column: 1 } - path: ".extension[y].extendee" - start: { line: 55, column: 7 } - end: { line: 55, column: 37 } + start: { line: 41, column: 7 } + end: { line: 41, column: 37 } - path: ".extension[y].label" - start: { line: 56, column: 4 } - end: { line: 56, column: 12 } + start: { line: 42, column: 4 } + end: { line: 42, column: 12 } - path: ".extension[y]" - start: { line: 56, column: 4 } - end: { line: 56, column: 36 } + start: { line: 42, column: 4 } + end: { line: 42, column: 36 } - path: ".extension[y].type_name" - start: { line: 56, column: 13 } - end: { line: 56, column: 26 } + start: { line: 42, column: 13 } + end: { line: 42, column: 26 } - path: ".extension[y].name" - start: { line: 56, column: 27 } - end: { line: 56, column: 28 } + start: { line: 42, column: 27 } + end: { line: 42, column: 28 } - path: ".extension[y].number" - start: { line: 56, column: 31 } - end: { line: 56, column: 35 } + start: { line: 42, column: 31 } + end: { line: 42, column: 35 } - path: ".extension" - start: { line: 59, column: 0 } - end: { line: 61, column: 1 } + start: { line: 45, column: 0 } + end: { line: 47, column: 1 } - path: ".extension[z].extendee" - start: { line: 59, column: 7 } - end: { line: 59, column: 35 } + start: { line: 45, column: 7 } + end: { line: 45, column: 35 } - path: ".extension[z].label" - start: { line: 60, column: 4 } - end: { line: 60, column: 12 } + start: { line: 46, column: 4 } + end: { line: 46, column: 12 } - path: ".extension[z]" - start: { line: 60, column: 4 } - end: { line: 60, column: 36 } + start: { line: 46, column: 4 } + end: { line: 46, column: 36 } - path: ".extension[z].type_name" - start: { line: 60, column: 13 } - end: { line: 60, column: 26 } + start: { line: 46, column: 13 } + end: { line: 46, column: 26 } - path: ".extension[z].name" - start: { line: 60, column: 27 } - end: { line: 60, column: 28 } + start: { line: 46, column: 27 } + end: { line: 46, column: 28 } - path: ".extension[z].number" - start: { line: 60, column: 31 } - end: { line: 60, column: 35 } + start: { line: 46, column: 31 } + end: { line: 46, column: 35 } diff --git a/experimental/ir/testdata/options/values/message.proto b/experimental/ir/testdata/options/values/message.proto index fd8a62262..211b4f0f2 100644 --- a/experimental/ir/testdata/options/values/message.proto +++ b/experimental/ir/testdata/options/values/message.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/values/message.proto.stderr.txt b/experimental/ir/testdata/options/values/message.proto.stderr.txt index 19525c6ec..d593e3e0c 100644 --- a/experimental/ir/testdata/options/values/message.proto.stderr.txt +++ b/experimental/ir/testdata/options/values/message.proto.stderr.txt @@ -1,160 +1,160 @@ error: cannot name extension field using `(...)` in message expression - --> testdata/options/values/message.proto:25:5 + --> testdata/options/values/message.proto:11:5 | -25 | (buf.test.x) {} +11 | (buf.test.x) {} | ^^^^^^^^^^^^ expected this to be wrapped in `[...]` instead | help: replace the `(...)` with `[...]` | -25 | - (buf.test.x) {} -25 | + [buf.test.x] {} +11 | - (buf.test.x) {} +11 | + [buf.test.x] {} error: unexpected absolute path in extension name - --> testdata/options/values/message.proto:27:6 + --> testdata/options/values/message.proto:13:6 | -27 | [.buf.test.x] {} +13 | [.buf.test.x] {} | ^^^^^^^^^^^ expected a path without a leading `.` | help: remove the leading `.` | -27 | - [.buf.test.x] {} -27 | + [buf.test.x] {} +13 | - [.buf.test.x] {} +13 | + [buf.test.x] {} error: cannot name extension field using `(...)` in message expression - --> testdata/options/values/message.proto:41:5 + --> testdata/options/values/message.proto:27:5 | -41 | (Foo.z): 1, +27 | (Foo.z): 1, | ^^^^^^^ expected this to be wrapped in `[...]` instead | help: replace the `(...)` with `[...]` | -41 | - (Foo.z): 1, -41 | + [Foo.z]: 1, +27 | - (Foo.z): 1, +27 | + [Foo.z]: 1, error: unexpected absolute path in extension name - --> testdata/options/values/message.proto:46:6 + --> testdata/options/values/message.proto:32:6 | -46 | [.buf.test.Foo.z]: 3, +32 | [.buf.test.Foo.z]: 3, | ^^^^^^^^^^^^^^^ expected a path without a leading `.` | help: remove the leading `.` | -46 | - [.buf.test.Foo.z]: 3, -46 | + [buf.test.Foo.z]: 3, +32 | - [.buf.test.Foo.z]: 3, +32 | + [buf.test.Foo.z]: 3, error: mismatched types - --> testdata/options/values/message.proto:23:5 + --> testdata/options/values/message.proto:9:5 | -23 | [x] {} + 9 | [x] {} | ^^^ | | | expected `buf.test.Foo` field, found `google.protobuf.FileOptions` field -24 | [buf.test.x] {} +10 | [buf.test.x] {} ... -59 | optional Foo x = 1000; +45 | optional Foo x = 1000; | ------------ expected due to this | = note: expected: `buf.test.Foo` field found: `google.protobuf.FileOptions` field error: mismatched types - --> testdata/options/values/message.proto:24:5 + --> testdata/options/values/message.proto:10:5 | -24 | [buf.test.x] {} +10 | [buf.test.x] {} | ^^^^^^^^^^^^ | | | expected `buf.test.Foo` field, found `google.protobuf.FileOptions` field -25 | (buf.test.x) {} +11 | (buf.test.x) {} ... -59 | optional Foo x = 1000; +45 | optional Foo x = 1000; | ------------ expected due to this | = note: expected: `buf.test.Foo` field found: `google.protobuf.FileOptions` field error: mismatched types - --> testdata/options/values/message.proto:26:5 + --> testdata/options/values/message.proto:12:5 | -26 | "buf.test.x" {} +12 | "buf.test.x" {} | ^^^^^^^^^^^^ | | | expected `buf.test.Foo` field, found `google.protobuf.FileOptions` field -27 | [.buf.test.x] {} +13 | [.buf.test.x] {} ... -59 | optional Foo x = 1000; +45 | optional Foo x = 1000; | ------------ expected due to this | = note: expected: `buf.test.Foo` field found: `google.protobuf.FileOptions` field error: mismatched types - --> testdata/options/values/message.proto:27:5 + --> testdata/options/values/message.proto:13:5 | -27 | [.buf.test.x] {} +13 | [.buf.test.x] {} | ^^^^^^^^^^^^^ | | | expected `buf.test.Foo` field, found `google.protobuf.FileOptions` field ... -59 | optional Foo x = 1000; +45 | optional Foo x = 1000; | ------------ expected due to this | = note: expected: `buf.test.Foo` field found: `google.protobuf.FileOptions` field error: message field `buf.test.Foo.y` referenced incorrectly - --> testdata/options/values/message.proto:29:5 + --> testdata/options/values/message.proto:15:5 | -29 | [y]: 0, +15 | [y]: 0, | ^^^ referenced here | help: reference it as `y` | -29 | - [y]: 0, -29 | + y: 0, +15 | - [y]: 0, +15 | + y: 0, | | = note: `[...]` must only be used when referencing extensions or concrete `Any` types error: message field `buf.test.Foo.y` referenced incorrectly - --> testdata/options/values/message.proto:30:5 + --> testdata/options/values/message.proto:16:5 | -30 | "y": 0, +16 | "y": 0, | ^^^ referenced here | help: reference it as `y` | -30 | - "y": 0, -30 | + y: 0, +16 | - "y": 0, +16 | + y: 0, | | = note: due to a parser quirk, `.protoc` rejects quoted strings here, even though textproto does not error: message field `buf.test.Foo.y` set multiple times - --> testdata/options/values/message.proto:30:5 + --> testdata/options/values/message.proto:16:5 | -29 | [y]: 0, +15 | [y]: 0, | --- first set here... -30 | "y": 0, +16 | "y": 0, | ^^^ ... also set here -31 | [Foo.y]: 0, +17 | [Foo.y]: 0, ... -50 | optional int32 y = 1; +36 | optional int32 y = 1; | - not a repeated field | = note: a non-`repeated` option may be set at most once error: message field `buf.test.Foo.y` referenced incorrectly - --> testdata/options/values/message.proto:31:5 + --> testdata/options/values/message.proto:17:5 | -31 | [Foo.y]: 0, +17 | [Foo.y]: 0, | ^^^^^^^ referenced here | help: reference it as `y` | -31 | - [Foo.y]: 0, -31 | + y: 0, +17 | - [Foo.y]: 0, +17 | + y: 0, | | = note: `[...]` must only be used when referencing extensions or concrete @@ -162,60 +162,60 @@ error: message field `buf.test.Foo.y` referenced incorrectly = note: field names must be a single identifier error: message field `buf.test.Foo.y` set multiple times - --> testdata/options/values/message.proto:31:5 + --> testdata/options/values/message.proto:17:5 | -29 | [y]: 0, +15 | [y]: 0, | --- first set here... -30 | "y": 0, -31 | [Foo.y]: 0, +16 | "y": 0, +17 | [Foo.y]: 0, | ^^^^^^^ ... also set here -32 | Foo.y: 0, +18 | Foo.y: 0, ... -50 | optional int32 y = 1; +36 | optional int32 y = 1; | - not a repeated field | = note: a non-`repeated` option may be set at most once error: message field `buf.test.Foo.y` referenced incorrectly - --> testdata/options/values/message.proto:32:5 + --> testdata/options/values/message.proto:18:5 | -32 | Foo.y: 0, +18 | Foo.y: 0, | ^^^^^ referenced here | help: reference it as `y` | -32 | - Foo.y: 0, -32 | + y: 0, +18 | - Foo.y: 0, +18 | + y: 0, | | = note: field names must be a single identifier error: message field `buf.test.Foo.y` set multiple times - --> testdata/options/values/message.proto:32:5 + --> testdata/options/values/message.proto:18:5 | -29 | [y]: 0, +15 | [y]: 0, | --- first set here... -30 | "y": 0, -31 | [Foo.y]: 0, -32 | Foo.y: 0, +16 | "y": 0, +17 | [Foo.y]: 0, +18 | Foo.y: 0, | ^^^^^ ... also set here -33 | ["Foo.y"]: 0, +19 | ["Foo.y"]: 0, ... -50 | optional int32 y = 1; +36 | optional int32 y = 1; | - not a repeated field | = note: a non-`repeated` option may be set at most once error: message field `buf.test.Foo.y` referenced incorrectly - --> testdata/options/values/message.proto:33:5 + --> testdata/options/values/message.proto:19:5 | -33 | ["Foo.y"]: 0, +19 | ["Foo.y"]: 0, | ^^^^^^^^^ referenced here | help: reference it as `y` | -33 | - ["Foo.y"]: 0, -33 | + y: 0, +19 | - ["Foo.y"]: 0, +19 | + y: 0, | | = note: `[...]` must only be used when referencing extensions or concrete @@ -223,32 +223,32 @@ error: message field `buf.test.Foo.y` referenced incorrectly = note: field names must be a single identifier error: message field `buf.test.Foo.y` set multiple times - --> testdata/options/values/message.proto:33:5 + --> testdata/options/values/message.proto:19:5 | -29 | [y]: 0, +15 | [y]: 0, | --- first set here... -30 | "y": 0, -31 | [Foo.y]: 0, -32 | Foo.y: 0, -33 | ["Foo.y"]: 0, +16 | "y": 0, +17 | [Foo.y]: 0, +18 | Foo.y: 0, +19 | ["Foo.y"]: 0, | ^^^^^^^^^ ... also set here -34 | "Foo.y": 0, +20 | "Foo.y": 0, ... -50 | optional int32 y = 1; +36 | optional int32 y = 1; | - not a repeated field | = note: a non-`repeated` option may be set at most once error: message field `buf.test.Foo.y` referenced incorrectly - --> testdata/options/values/message.proto:34:5 + --> testdata/options/values/message.proto:20:5 | -34 | "Foo.y": 0, +20 | "Foo.y": 0, | ^^^^^^^ referenced here | help: reference it as `y` | -34 | - "Foo.y": 0, -34 | + y: 0, +20 | - "Foo.y": 0, +20 | + y: 0, | | = note: field names must be a single identifier @@ -256,31 +256,31 @@ error: message field `buf.test.Foo.y` referenced incorrectly though textproto does not error: message field `buf.test.Foo.y` set multiple times - --> testdata/options/values/message.proto:34:5 + --> testdata/options/values/message.proto:20:5 | -29 | [y]: 0, +15 | [y]: 0, | --- first set here... -30 | "y": 0, +16 | "y": 0, ... -33 | ["Foo.y"]: 0, -34 | "Foo.y": 0, +19 | ["Foo.y"]: 0, +20 | "Foo.y": 0, | ^^^^^^^ ... also set here ... -50 | optional int32 y = 1; +36 | optional int32 y = 1; | - not a repeated field | = note: a non-`repeated` option may be set at most once error: message field `buf.test.Foo.y` referenced incorrectly - --> testdata/options/values/message.proto:36:5 + --> testdata/options/values/message.proto:22:5 | -36 | 1: 0, +22 | 1: 0, | ^ referenced here | help: reference it as `y` | -36 | - 1: 0, -36 | + y: 0, +22 | - 1: 0, +22 | + y: 0, | | = note: field names must be a single identifier @@ -288,106 +288,106 @@ error: message field `buf.test.Foo.y` referenced incorrectly textproto does not error: message field `buf.test.Foo.y` set multiple times - --> testdata/options/values/message.proto:36:5 + --> testdata/options/values/message.proto:22:5 | -29 | [y]: 0, +15 | [y]: 0, | --- first set here... -30 | "y": 0, +16 | "y": 0, ... -36 | 1: 0, +22 | 1: 0, | ^ ... also set here -37 | 1000: 1, +23 | 1000: 1, ... -50 | optional int32 y = 1; +36 | optional int32 y = 1; | - not a repeated field | = note: a non-`repeated` option may be set at most once error: cannot resolve message field name for `buf.test.Foo` - --> testdata/options/values/message.proto:37:5 + --> testdata/options/values/message.proto:23:5 | -37 | 1000: 1, +23 | 1000: 1, | ^^^^^^^ field referenced here ... -59 | optional Foo x = 1000; +45 | optional Foo x = 1000; | ------------ expected `Foo` field due to this error: cannot resolve message field name for `buf.test.Foo` - --> testdata/options/values/message.proto:39:5 + --> testdata/options/values/message.proto:25:5 | -39 | [z]: 0, +25 | [z]: 0, | ^^^^^^ field referenced here -40 | [Foo.z]: 1, +26 | [Foo.z]: 1, ... -59 | optional Foo x = 1000; +45 | optional Foo x = 1000; | ------------ expected `Foo` field due to this error: message extension `buf.test.Foo.z` referenced incorrectly - --> testdata/options/values/message.proto:42:5 + --> testdata/options/values/message.proto:28:5 | -42 | ["Foo.z"]: 1, +28 | ["Foo.z"]: 1, | ^^^^^^^^^ referenced here | help: reference it as `[buf.test.Foo.z]` | -42 | - ["Foo.z"]: 1, -42 | + [buf.test.Foo.z]: 1, +28 | - ["Foo.z"]: 1, +28 | + [buf.test.Foo.z]: 1, error: message extension `buf.test.Foo.z` set multiple times - --> testdata/options/values/message.proto:42:5 + --> testdata/options/values/message.proto:28:5 | -40 | [Foo.z]: 1, +26 | [Foo.z]: 1, | ------- first set here... -41 | (Foo.z): 1, -42 | ["Foo.z"]: 1, +27 | (Foo.z): 1, +28 | ["Foo.z"]: 1, | ^^^^^^^^^ ... also set here -43 | Foo.z: 1, +29 | Foo.z: 1, ... -54 | optional int32 z = 1000; +40 | optional int32 z = 1000; | - not a repeated field | = note: a non-`repeated` option may be set at most once error: message extension `buf.test.Foo.z` referenced incorrectly - --> testdata/options/values/message.proto:43:5 + --> testdata/options/values/message.proto:29:5 | -43 | Foo.z: 1, +29 | Foo.z: 1, | ^^^^^ referenced here | help: reference it as `[buf.test.Foo.z]` | -43 | - Foo.z: 1, -43 | + [buf.test.Foo.z]: 1, +29 | - Foo.z: 1, +29 | + [buf.test.Foo.z]: 1, | | = note: extension names must be surrounded by `[...]` error: message extension `buf.test.Foo.z` set multiple times - --> testdata/options/values/message.proto:43:5 + --> testdata/options/values/message.proto:29:5 | -40 | [Foo.z]: 1, +26 | [Foo.z]: 1, | ------- first set here... -41 | (Foo.z): 1, -42 | ["Foo.z"]: 1, -43 | Foo.z: 1, +27 | (Foo.z): 1, +28 | ["Foo.z"]: 1, +29 | Foo.z: 1, | ^^^^^ ... also set here -44 | "Foo.z": 1, +30 | "Foo.z": 1, ... -54 | optional int32 z = 1000; +40 | optional int32 z = 1000; | - not a repeated field | = note: a non-`repeated` option may be set at most once error: message extension `buf.test.Foo.z` referenced incorrectly - --> testdata/options/values/message.proto:44:5 + --> testdata/options/values/message.proto:30:5 | -44 | "Foo.z": 1, +30 | "Foo.z": 1, | ^^^^^^^ referenced here | help: reference it as `[buf.test.Foo.z]` | -44 | - "Foo.z": 1, -44 | + [buf.test.Foo.z]: 1, +30 | - "Foo.z": 1, +30 | + [buf.test.Foo.z]: 1, | | = note: extension names must be surrounded by `[...]` @@ -395,51 +395,51 @@ error: message extension `buf.test.Foo.z` referenced incorrectly though textproto does not error: message extension `buf.test.Foo.z` set multiple times - --> testdata/options/values/message.proto:44:5 + --> testdata/options/values/message.proto:30:5 | -40 | [Foo.z]: 1, +26 | [Foo.z]: 1, | ------- first set here... -41 | (Foo.z): 1, -42 | ["Foo.z"]: 1, -43 | Foo.z: 1, -44 | "Foo.z": 1, +27 | (Foo.z): 1, +28 | ["Foo.z"]: 1, +29 | Foo.z: 1, +30 | "Foo.z": 1, | ^^^^^^^ ... also set here -45 | [buf.test.Foo.z]: 2, +31 | [buf.test.Foo.z]: 2, ... -54 | optional int32 z = 1000; +40 | optional int32 z = 1000; | - not a repeated field | = note: a non-`repeated` option may be set at most once error: message extension `buf.test.Foo.z` set multiple times - --> testdata/options/values/message.proto:45:5 + --> testdata/options/values/message.proto:31:5 | -40 | [Foo.z]: 1, +26 | [Foo.z]: 1, | ------- first set here... -41 | (Foo.z): 1, +27 | (Foo.z): 1, ... -44 | "Foo.z": 1, -45 | [buf.test.Foo.z]: 2, +30 | "Foo.z": 1, +31 | [buf.test.Foo.z]: 2, | ^^^^^^^^^^^^^^^^ ... also set here -46 | [.buf.test.Foo.z]: 3, +32 | [.buf.test.Foo.z]: 3, ... -54 | optional int32 z = 1000; +40 | optional int32 z = 1000; | - not a repeated field | = note: a non-`repeated` option may be set at most once error: message extension `buf.test.Foo.z` set multiple times - --> testdata/options/values/message.proto:46:5 + --> testdata/options/values/message.proto:32:5 | -40 | [Foo.z]: 1, +26 | [Foo.z]: 1, | ------- first set here... -41 | (Foo.z): 1, +27 | (Foo.z): 1, ... -45 | [buf.test.Foo.z]: 2, -46 | [.buf.test.Foo.z]: 3, +31 | [buf.test.Foo.z]: 2, +32 | [.buf.test.Foo.z]: 3, | ^^^^^^^^^^^^^^^^^ ... also set here ... -54 | optional int32 z = 1000; +40 | optional int32 z = 1000; | - not a repeated field | = note: a non-`repeated` option may be set at most once diff --git a/experimental/ir/testdata/options/values/message_set.proto b/experimental/ir/testdata/options/values/message_set.proto index 580b95fd5..a490492d3 100644 --- a/experimental/ir/testdata/options/values/message_set.proto +++ b/experimental/ir/testdata/options/values/message_set.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% requires_no_message_set_support: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/values/message_set.proto.stderr.txt b/experimental/ir/testdata/options/values/message_set.proto.stderr.txt index 4c7ccd8e0..51fda83f4 100644 --- a/experimental/ir/testdata/options/values/message_set.proto.stderr.txt +++ b/experimental/ir/testdata/options/values/message_set.proto.stderr.txt @@ -1,9 +1,9 @@ warning: message set types are deprecated - --> testdata/options/values/message_set.proto:23:12 + --> testdata/options/values/message_set.proto:9:12 | -22 | message MessageSet { + 8 | message MessageSet { | ------------------ -23 | option message_set_wire_format = true; + 9 | option message_set_wire_format = true; | ^^^^^^^^^^^^^^^^^^^^^^^ declared as message set here | = help: message set types are not implemented correctly in most Protobuf @@ -11,24 +11,24 @@ warning: message set types are deprecated error: field `test.Foo.message_set_field` may not be used in an option: it uses 'message set wire format' legacy proto1 feature which is not supported - --> testdata/options/values/message_set.proto:40:12 + --> testdata/options/values/message_set.proto:26:12 | -40 | option (m1).(Foo.message_set_field).name = "abc"; +26 | option (m1).(Foo.message_set_field).name = "abc"; | ^^^^^^^^^^^^^^^^^^^^^^^^ - ::: testdata/options/values/message_set.proto:22:1 + ::: testdata/options/values/message_set.proto:8:1 | -22 | message MessageSet { + 8 | message MessageSet { | ------------------ `test.MessageSet` declared as message set here error: field `test.Foo.message_set_field` may not be used in an option: it uses 'message set wire format' legacy proto1 feature which is not supported - --> testdata/options/values/message_set.proto:44:5 + --> testdata/options/values/message_set.proto:30:5 | -44 | [test.Foo.message_set_field] { +30 | [test.Foo.message_set_field] { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ::: testdata/options/values/message_set.proto:22:1 + ::: testdata/options/values/message_set.proto:8:1 | -22 | message MessageSet { + 8 | message MessageSet { | ------------------ `test.MessageSet` declared as message set here encountered 2 errors and 1 warning diff --git a/experimental/ir/testdata/options/values/nested.proto b/experimental/ir/testdata/options/values/nested.proto index 752d3df8a..1a00ce2f1 100644 --- a/experimental/ir/testdata/options/values/nested.proto +++ b/experimental/ir/testdata/options/values/nested.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/values/nested.proto.stderr.txt b/experimental/ir/testdata/options/values/nested.proto.stderr.txt index 827b0729b..ee8e2c768 100644 --- a/experimental/ir/testdata/options/values/nested.proto.stderr.txt +++ b/experimental/ir/testdata/options/values/nested.proto.stderr.txt @@ -1,54 +1,54 @@ error: expected singular message, found repeated `buf.test.Foo` - --> testdata/options/values/nested.proto:25:14 + --> testdata/options/values/nested.proto:11:14 | -25 | option (x).b.a = {}; +11 | option (x).b.a = {}; | - ^ field selector requires singular message | | | found repeated `buf.test.Foo` ... -43 | optional Foo a = 1; -44 | repeated Foo b = 2; +29 | optional Foo a = 1; +30 | repeated Foo b = 2; | ------------ type specified here error: message field `buf.test.Foo.a` set multiple times - --> testdata/options/values/nested.proto:28:8 + --> testdata/options/values/nested.proto:14:8 | -27 | option (x).a.a = {}; +13 | option (x).a.a = {}; | ----- first set here... -28 | option (x).a = {}; +14 | option (x).a = {}; | ^^^^^ ... also set here -29 | option (x).a.a.a = {}; +15 | option (x).a.a.a = {}; ... -43 | optional Foo a = 1; +29 | optional Foo a = 1; | - not a repeated field | = note: a non-`repeated` option may be set at most once error: message extension `buf.test.y` set multiple times - --> testdata/options/values/nested.proto:32:8 + --> testdata/options/values/nested.proto:18:8 | -31 | option (x).(y).a = {}; +17 | option (x).(y).a = {}; | ------- first set here... -32 | option (x).(y) = {}; +18 | option (x).(y) = {}; | ^^^^^^^ ... also set here -33 | option (x).(y).a.(y) = {}; +19 | option (x).(y).a.(y) = {}; ... -53 | optional Foo y = 1000; +39 | optional Foo y = 1000; | - not a repeated field | = note: a non-`repeated` option may be set at most once error: expected singular message, found repeated `buf.test.Foo` - --> testdata/options/values/nested.proto:38:18 + --> testdata/options/values/nested.proto:24:18 | -38 | option (x).a.(z).a = {}; +24 | option (x).a.(z).a = {}; | --- ^ field selector requires singular message | | | found repeated `buf.test.Foo` -39 | option (x).a.(z) = {}; +25 | option (x).a.(z) = {}; ... -53 | optional Foo y = 1000; -54 | repeated Foo z = 1001; +39 | optional Foo y = 1000; +40 | repeated Foo z = 1001; | ------------ type specified here encountered 4 errors diff --git a/experimental/ir/testdata/options/values/oneof.proto b/experimental/ir/testdata/options/values/oneof.proto index 56c4c70f1..c096251cf 100644 --- a/experimental/ir/testdata/options/values/oneof.proto +++ b/experimental/ir/testdata/options/values/oneof.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/values/oneof.proto.stderr.txt b/experimental/ir/testdata/options/values/oneof.proto.stderr.txt index 947edab01..c15933881 100644 --- a/experimental/ir/testdata/options/values/oneof.proto.stderr.txt +++ b/experimental/ir/testdata/options/values/oneof.proto.stderr.txt @@ -1,41 +1,41 @@ error: oneof `buf.test.Foo.o` set multiple times - --> testdata/options/values/oneof.proto:22:21 + --> testdata/options/values/oneof.proto:8:21 | -22 | option (x) = {a: 1, b: {}}; + 8 | option (x) = {a: 1, b: {}}; | - ^ ... also set here | | | first set here... -23 | option (y).b.a = 1; + 9 | option (y).b.a = 1; ... -28 | oneof o { +14 | oneof o { | - not a repeated field | = note: at most one member of a oneof may be set by an option error: oneof `buf.test.Foo.o` set multiple times - --> testdata/options/values/oneof.proto:24:8 + --> testdata/options/values/oneof.proto:10:8 | -23 | option (y).b.a = 1; + 9 | option (y).b.a = 1; | ------- first set here... -24 | option (y).b.b = {}; +10 | option (y).b.b = {}; | ^^^^^^^ ... also set here -25 | option (y).a = 2; +11 | option (y).a = 2; ... -28 | oneof o { +14 | oneof o { | - not a repeated field | = note: at most one member of a oneof may be set by an option error: oneof `buf.test.Foo.o` set multiple times - --> testdata/options/values/oneof.proto:25:8 + --> testdata/options/values/oneof.proto:11:8 | -23 | option (y).b.a = 1; + 9 | option (y).b.a = 1; | ----- first set here... -24 | option (y).b.b = {}; -25 | option (y).a = 2; +10 | option (y).b.b = {}; +11 | option (y).a = 2; | ^^^^^ ... also set here ... -28 | oneof o { +14 | oneof o { | - not a repeated field | = note: at most one member of a oneof may be set by an option diff --git a/experimental/ir/testdata/options/values/singular.proto b/experimental/ir/testdata/options/values/singular.proto index 2a472dc6c..7f6c11ec5 100644 --- a/experimental/ir/testdata/options/values/singular.proto +++ b/experimental/ir/testdata/options/values/singular.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/values/singular.proto.stderr.txt b/experimental/ir/testdata/options/values/singular.proto.stderr.txt index 521a8d706..088180629 100644 --- a/experimental/ir/testdata/options/values/singular.proto.stderr.txt +++ b/experimental/ir/testdata/options/values/singular.proto.stderr.txt @@ -1,64 +1,64 @@ error: message field `buf.test.Foo.x1` set multiple times - --> testdata/options/values/singular.proto:24:5 + --> testdata/options/values/singular.proto:10:5 | -23 | x1: 1, + 9 | x1: 1, | -- first set here... -24 | x1: 2, // Setting more than once is an error. +10 | x1: 2, // Setting more than once is an error. | ^^ ... also set here ... -34 | optional int32 x1 = 1; +20 | optional int32 x1 = 1; | -- not a repeated field | = note: a non-`repeated` option may be set at most once error: mismatched types - --> testdata/options/values/singular.proto:26:9 + --> testdata/options/values/singular.proto:12:9 | -26 | x2: [-1, 1], // Setting from an array is an error. +12 | x2: [-1, 1], // Setting from an array is an error. | ^^^^^^^ expected `int32`, found array expression ... -34 | optional int32 x1 = 1; -35 | optional int32 x2 = 2; +20 | optional int32 x1 = 1; +21 | optional int32 x2 = 2; | -------------- expected due to this | = note: expected: scalar type `int32` found: array expression error: message field `buf.test.Foo.x3` set multiple times - --> testdata/options/values/singular.proto:29:5 + --> testdata/options/values/singular.proto:15:5 | -28 | x3: -1, +14 | x3: -1, | -- first set here... -29 | x3: [0, "foo"], // Setting more than once with an array is an error, +15 | x3: [0, "foo"], // Setting more than once with an array is an error, | ^^ ... also set here ... -35 | optional int32 x2 = 2; -36 | optional int32 x3 = 3; +21 | optional int32 x2 = 2; +22 | optional int32 x3 = 3; | -- not a repeated field | = note: a non-`repeated` option may be set at most once error: mismatched types - --> testdata/options/values/singular.proto:29:9 + --> testdata/options/values/singular.proto:15:9 | -29 | x3: [0, "foo"], // Setting more than once with an array is an error, +15 | x3: [0, "foo"], // Setting more than once with an array is an error, | ^^^^^^^^^^ expected `int32`, found array expression ... -35 | optional int32 x2 = 2; -36 | optional int32 x3 = 3; +21 | optional int32 x2 = 2; +22 | optional int32 x3 = 3; | -------------- expected due to this | = note: expected: scalar type `int32` found: array expression error: mismatched types - --> testdata/options/values/singular.proto:29:13 + --> testdata/options/values/singular.proto:15:13 | -29 | x3: [0, "foo"], // Setting more than once with an array is an error, +15 | x3: [0, "foo"], // Setting more than once with an array is an error, | ^^^^^ expected `int32`, found `string` ... -35 | optional int32 x2 = 2; -36 | optional int32 x3 = 3; +21 | optional int32 x2 = 2; +22 | optional int32 x3 = 3; | -------------- expected due to this | = note: expected: scalar type `int32` diff --git a/experimental/ir/testdata/options/values/string.proto b/experimental/ir/testdata/options/values/string.proto index c4334b413..c676343b4 100644 --- a/experimental/ir/testdata/options/values/string.proto +++ b/experimental/ir/testdata/options/values/string.proto @@ -1,18 +1,3 @@ - -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/options/values/string.proto.stderr.txt b/experimental/ir/testdata/options/values/string.proto.stderr.txt index a88eed2d9..fa0075808 100644 --- a/experimental/ir/testdata/options/values/string.proto.stderr.txt +++ b/experimental/ir/testdata/options/values/string.proto.stderr.txt @@ -1,27 +1,27 @@ warning: non-printable character in string literal - --> testdata/options/values/string.proto:24:40 + --> testdata/options/values/string.proto:9:40 | -24 | s: ["", "foo", "foo bar" 'baz', '🐈⬛', "\xff"] + 9 | s: ["", "foo", "foo bar" 'baz', '🐈⬛', "\xff"] | ^^^^^^^^ help: consider escaping it | -24 | - s: ["", "foo", "foo bar" 'baz', '🐈⬛', "\xff"] -24 | + s: ["", "foo", "foo bar" 'baz', '🐈\u200d⬛', "\xff"] + 9 | - s: ["", "foo", "foo bar" 'baz', '🐈⬛', "\xff"] + 9 | + s: ["", "foo", "foo bar" 'baz', '🐈\u200d⬛', "\xff"] warning: non-printable character in string literal - --> testdata/options/values/string.proto:25:40 + --> testdata/options/values/string.proto:10:40 | -25 | b: ["", "foo", "foo bar" 'baz', '🐈⬛', "\xff"] +10 | b: ["", "foo", "foo bar" 'baz', '🐈⬛', "\xff"] | ^^^^^^^^ help: consider escaping it | -25 | - b: ["", "foo", "foo bar" 'baz', '🐈⬛', "\xff"] -25 | + b: ["", "foo", "foo bar" 'baz', '🐈\u200d⬛', "\xff"] +10 | - b: ["", "foo", "foo bar" 'baz', '🐈⬛', "\xff"] +10 | + b: ["", "foo", "foo bar" 'baz', '🐈\u200d⬛', "\xff"] error: nested array expressions are not allowed - --> testdata/options/values/string.proto:30:37 + --> testdata/options/values/string.proto:15:37 | -30 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +15 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | -----------------------------^^--------- | | | | ...within this array expression @@ -29,15 +29,15 @@ error: nested array expressions are not allowed | cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/string.proto:30:41 + --> testdata/options/values/string.proto:15:41 | -30 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +15 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^^^^^^ error: nested array expressions are not allowed - --> testdata/options/values/string.proto:31:37 + --> testdata/options/values/string.proto:16:37 | -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | -----------------------------^^--------- | | | | ...within this array expression @@ -45,15 +45,15 @@ error: nested array expressions are not allowed | cannot nest this array expression... error: unexpected range expression in option setting value - --> testdata/options/values/string.proto:31:41 + --> testdata/options/values/string.proto:16:41 | -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^^^^^^ error: mismatched types - --> testdata/options/values/string.proto:27:9 + --> testdata/options/values/string.proto:12:9 | -27 | s: -"neg" +12 | s: -"neg" | -^^^^^ expected number, found `string` | | | expected due to this @@ -62,164 +62,164 @@ error: mismatched types found: scalar type `string` error: mismatched types - --> testdata/options/values/string.proto:30:9 + --> testdata/options/values/string.proto:15:9 | -30 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +15 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^ expected `string`, found integer literal -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] ... -35 | repeated string s = 1; +20 | repeated string s = 1; | --------------- expected due to this | = note: expected: scalar type `string` found: integer literal error: mismatched types - --> testdata/options/values/string.proto:30:12 + --> testdata/options/values/string.proto:15:12 | -30 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +15 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^^^ expected `string`, found floating-point literal -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] ... -35 | repeated string s = 1; +20 | repeated string s = 1; | --------------- expected due to this | = note: expected: scalar type `string` found: floating-point literal error: mismatched types - --> testdata/options/values/string.proto:30:17 + --> testdata/options/values/string.proto:15:17 | -30 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +15 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^^^^ expected `string`, found `bool` -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] ... -35 | repeated string s = 1; +20 | repeated string s = 1; | --------------- expected due to this | = note: expected: scalar type `string` found: scalar type `bool` error: mismatched types - --> testdata/options/values/string.proto:30:23 + --> testdata/options/values/string.proto:15:23 | -30 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +15 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^^^ expected `string`, found floating-point literal -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] ... -35 | repeated string s = 1; +20 | repeated string s = 1; | --------------- expected due to this | = note: expected: scalar type `string` found: floating-point literal error: mismatched types - --> testdata/options/values/string.proto:30:28 + --> testdata/options/values/string.proto:15:28 | -30 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +15 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `string`, found floating-point literal -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] ... -35 | repeated string s = 1; +20 | repeated string s = 1; | --------------- expected due to this | = note: expected: scalar type `string` found: floating-point literal error: mismatched types - --> testdata/options/values/string.proto:30:33 + --> testdata/options/values/string.proto:15:33 | -30 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +15 | s: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^^ | | | expected `string`, found message expression -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] ... -35 | repeated string s = 1; +20 | repeated string s = 1; | --------------- expected due to this | = note: expected: scalar type `string` found: message expression error: mismatched types - --> testdata/options/values/string.proto:31:9 + --> testdata/options/values/string.proto:16:9 | -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^ expected `bytes`, found integer literal ... -35 | repeated string s = 1; -36 | repeated bytes b = 2; +20 | repeated string s = 1; +21 | repeated bytes b = 2; | -------------- expected due to this | = note: expected: scalar type `bytes` found: integer literal error: mismatched types - --> testdata/options/values/string.proto:31:12 + --> testdata/options/values/string.proto:16:12 | -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^^^ expected `bytes`, found floating-point literal ... -35 | repeated string s = 1; -36 | repeated bytes b = 2; +20 | repeated string s = 1; +21 | repeated bytes b = 2; | -------------- expected due to this | = note: expected: scalar type `bytes` found: floating-point literal error: mismatched types - --> testdata/options/values/string.proto:31:17 + --> testdata/options/values/string.proto:16:17 | -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^^^^ expected `bytes`, found `bool` ... -35 | repeated string s = 1; -36 | repeated bytes b = 2; +20 | repeated string s = 1; +21 | repeated bytes b = 2; | -------------- expected due to this | = note: expected: scalar type `bytes` found: scalar type `bool` error: mismatched types - --> testdata/options/values/string.proto:31:23 + --> testdata/options/values/string.proto:16:23 | -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^^^ expected `bytes`, found floating-point literal ... -35 | repeated string s = 1; -36 | repeated bytes b = 2; +20 | repeated string s = 1; +21 | repeated bytes b = 2; | -------------- expected due to this | = note: expected: scalar type `bytes` found: floating-point literal error: mismatched types - --> testdata/options/values/string.proto:31:28 + --> testdata/options/values/string.proto:16:28 | -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^^^ | | | expected `bytes`, found floating-point literal ... -35 | repeated string s = 1; -36 | repeated bytes b = 2; +20 | repeated string s = 1; +21 | repeated bytes b = 2; | -------------- expected due to this | = note: expected: scalar type `bytes` found: floating-point literal error: mismatched types - --> testdata/options/values/string.proto:31:33 + --> testdata/options/values/string.proto:16:33 | -31 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] +16 | b: [1, 1.0, true, inf, nan, {}, [], 0 to 1] | ^^ | | | expected `bytes`, found message expression ... -35 | repeated string s = 1; -36 | repeated bytes b = 2; +20 | repeated string s = 1; +21 | repeated bytes b = 2; | -------------- expected due to this | = note: expected: scalar type `bytes` diff --git a/experimental/ir/testdata/options/wrong_symbol.proto b/experimental/ir/testdata/options/wrong_symbol.proto index 64ddd3400..94bb37248 100644 --- a/experimental/ir/testdata/options/wrong_symbol.proto +++ b/experimental/ir/testdata/options/wrong_symbol.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package buf.test; diff --git a/experimental/ir/testdata/options/wrong_symbol.proto.stderr.txt b/experimental/ir/testdata/options/wrong_symbol.proto.stderr.txt index 67d7776b7..62320e2cc 100644 --- a/experimental/ir/testdata/options/wrong_symbol.proto.stderr.txt +++ b/experimental/ir/testdata/options/wrong_symbol.proto.stderr.txt @@ -1,50 +1,50 @@ error: expected `google.protobuf.FieldOptions` extension, found message extension in `google.protobuf.MessageOptions` - --> testdata/options/wrong_symbol.proto:23:9 + --> testdata/options/wrong_symbol.proto:9:9 | -23 | (x) = 42, + 9 | (x) = 42, | ^^^ because of this field selector -24 | (z) = 42, +10 | (z) = 42, ... -30 | / extend google.protobuf.MessageOptions { -31 | | optional int32 x = 1000; +16 | / extend google.protobuf.MessageOptions { +17 | | optional int32 x = 1000; | | - `buf.test.x` defined here -32 | | } +18 | | } | \_- ... within this message extension block error: expected `google.protobuf.FieldOptions` extension, found message field in `buf.test.Foo` - --> testdata/options/wrong_symbol.proto:24:9 + --> testdata/options/wrong_symbol.proto:10:9 | -21 | / message Foo { -22 | | optional int32 z = 1 [ + 7 | / message Foo { + 8 | | optional int32 z = 1 [ | | - `buf.test.Foo.z` defined here -23 | | (x) = 42, -24 | | (z) = 42, + 9 | | (x) = 42, +10 | | (z) = 42, | | ^^^ because of this field selector -25 | | (Foo) = 42, +11 | | (Foo) = 42, ... | -28 | | } +14 | | } | \_- ... within this message definition error: expected message extension, found message type `buf.test.Foo` - --> testdata/options/wrong_symbol.proto:25:10 + --> testdata/options/wrong_symbol.proto:11:10 | -21 | message Foo { + 7 | message Foo { | --- defined here ... -24 | (z) = 42, -25 | (Foo) = 42, +10 | (z) = 42, +11 | (Foo) = 42, | ^^^ expected message extension error: expected message extension, found `package` declaration `buf.test` - --> testdata/options/wrong_symbol.proto:26:10 + --> testdata/options/wrong_symbol.proto:12:10 | -17 | package buf.test; + 3 | package buf.test; | ----------------- defined here ... -25 | (Foo) = 42, -26 | (buf.test) = 42 +11 | (Foo) = 42, +12 | (buf.test) = 42 | ^^^^^^^^ expected message extension encountered 4 errors diff --git a/experimental/ir/testdata/services/missing_args.proto b/experimental/ir/testdata/services/missing_args.proto index 5d03badb7..187fa0d41 100644 --- a/experimental/ir/testdata/services/missing_args.proto +++ b/experimental/ir/testdata/services/missing_args.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package buf.test; diff --git a/experimental/ir/testdata/services/missing_args.proto.stderr.txt b/experimental/ir/testdata/services/missing_args.proto.stderr.txt index 70f8166ca..44fe84957 100644 --- a/experimental/ir/testdata/services/missing_args.proto.stderr.txt +++ b/experimental/ir/testdata/services/missing_args.proto.stderr.txt @@ -1,13 +1,13 @@ error: expected exactly one type in method return type, got 0 - --> testdata/services/missing_args.proto:21:23 + --> testdata/services/missing_args.proto:7:23 | -21 | rpc M1(M) returns (); + 7 | rpc M1(M) returns (); | ^^ error: expected exactly one type in method parameter list, got 0 - --> testdata/services/missing_args.proto:22:11 + --> testdata/services/missing_args.proto:8:11 | -22 | rpc M2() returns (M); + 8 | rpc M2() returns (M); | ^^ encountered 2 errors diff --git a/experimental/ir/testdata/services/ok.proto b/experimental/ir/testdata/services/ok.proto index 1ef17b115..cbad628b8 100644 --- a/experimental/ir/testdata/services/ok.proto +++ b/experimental/ir/testdata/services/ok.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/services/options.proto b/experimental/ir/testdata/services/options.proto index f595f085a..7705d44ac 100644 --- a/experimental/ir/testdata/services/options.proto +++ b/experimental/ir/testdata/services/options.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/services/references.proto b/experimental/ir/testdata/services/references.proto index adb4515a4..e506da637 100644 --- a/experimental/ir/testdata/services/references.proto +++ b/experimental/ir/testdata/services/references.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package buf.test; diff --git a/experimental/ir/testdata/services/references.proto.stderr.txt b/experimental/ir/testdata/services/references.proto.stderr.txt index 3e202aef3..fa6ea7750 100644 --- a/experimental/ir/testdata/services/references.proto.stderr.txt +++ b/experimental/ir/testdata/services/references.proto.stderr.txt @@ -1,25 +1,25 @@ error: expected type, found service definition `buf.test.S` - --> testdata/services/references.proto:20:14 + --> testdata/services/references.proto:6:14 | -20 | optional S s = 1; + 6 | optional S s = 1; | ^ expected type -21 | optional S.X x = 2; + 7 | optional S.X x = 2; ... -24 | service S { +10 | service S { | - defined here error: cannot find `S.X` in this scope - --> testdata/services/references.proto:21:14 + --> testdata/services/references.proto:7:14 | -21 | optional S.X x = 2; + 7 | optional S.X x = 2; | ^^^ not found in this scope | = help: the full name of this scope is `buf.test.M` error: expected message type, found service method `buf.test.S2.M` - --> testdata/services/references.proto:31:11 + --> testdata/services/references.proto:17:11 | -31 | rpc M(M) returns (buf.test.M); +17 | rpc M(M) returns (buf.test.M); | - ^ expected message type | | | defined here diff --git a/experimental/ir/testdata/services/wrong_type.proto b/experimental/ir/testdata/services/wrong_type.proto index 0d37e06b0..0775d03af 100644 --- a/experimental/ir/testdata/services/wrong_type.proto +++ b/experimental/ir/testdata/services/wrong_type.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package buf.test; diff --git a/experimental/ir/testdata/services/wrong_type.proto.stderr.txt b/experimental/ir/testdata/services/wrong_type.proto.stderr.txt index 1bcbf1d11..aa195a903 100644 --- a/experimental/ir/testdata/services/wrong_type.proto.stderr.txt +++ b/experimental/ir/testdata/services/wrong_type.proto.stderr.txt @@ -1,38 +1,38 @@ error: expected message type, found enum type `buf.test.E` - --> testdata/services/wrong_type.proto:23:24 + --> testdata/services/wrong_type.proto:9:24 | -20 | enum E { Z = 0; } + 6 | enum E { Z = 0; } | - defined here ... -23 | rpc M1(M) returns (E); + 9 | rpc M1(M) returns (E); | ^ expected message type error: expected message type, found enum type `buf.test.E` - --> testdata/services/wrong_type.proto:24:19 + --> testdata/services/wrong_type.proto:10:19 | -20 | enum E { Z = 0; } + 6 | enum E { Z = 0; } | - defined here ... -23 | rpc M1(M) returns (E); -24 | rpc M2(stream E) returns (M); + 9 | rpc M1(M) returns (E); +10 | rpc M2(stream E) returns (M); | ^ expected message type error: expected message type, found scalar type `int32` - --> testdata/services/wrong_type.proto:25:31 + --> testdata/services/wrong_type.proto:11:31 | -25 | rpc M3(M) returns (stream int32); +11 | rpc M3(M) returns (stream int32); | ^^^^^ expected message type error: expected message type, found scalar type `string` - --> testdata/services/wrong_type.proto:26:19 + --> testdata/services/wrong_type.proto:12:19 | -26 | rpc M4(stream string) returns (stream N); +12 | rpc M4(stream string) returns (stream N); | ^^^^^^ expected message type error: cannot find `N` in this scope - --> testdata/services/wrong_type.proto:26:43 + --> testdata/services/wrong_type.proto:12:43 | -26 | rpc M4(stream string) returns (stream N); +12 | rpc M4(stream string) returns (stream N); | ^ not found in this scope | = help: the full name of this scope is `buf.test.S` diff --git a/experimental/ir/testdata/smoke.proto b/experimental/ir/testdata/smoke.proto index 91f031981..4b983977d 100644 --- a/experimental/ir/testdata/smoke.proto +++ b/experimental/ir/testdata/smoke.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/strict_visibility.proto b/experimental/ir/testdata/strict_visibility.proto index 7de14f56d..0cf18eb9b 100644 --- a/experimental/ir/testdata/strict_visibility.proto +++ b/experimental/ir/testdata/strict_visibility.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2024"; package buf.test; diff --git a/experimental/ir/testdata/strict_visibility.proto.stderr.txt b/experimental/ir/testdata/strict_visibility.proto.stderr.txt index 78db381a8..b9cacf6a4 100644 --- a/experimental/ir/testdata/strict_visibility.proto.stderr.txt +++ b/experimental/ir/testdata/strict_visibility.proto.stderr.txt @@ -1,58 +1,58 @@ error: nested message type marked as exported - --> testdata/strict_visibility.proto:21:5 + --> testdata/strict_visibility.proto:7:5 | -20 | / export message Complete { -21 | | export message M {} + 6 | / export message Complete { + 7 | | export message M {} | | ^^^^^^ nested type exported here -22 | | export enum E { Z = 0; } -23 | | reserved 1 to max; -24 | | } + 8 | | export enum E { Z = 0; } + 9 | | reserved 1 to max; +10 | | } | \_- ... within this type | - ::: testdata/strict_visibility.proto:18:45 + ::: testdata/strict_visibility.proto:4:45 | -18 | option features.default_symbol_visibility = STRICT; + 4 | option features.default_symbol_visibility = STRICT; | ------ `STRICT` specified here | = help: in strict mode, nested message types cannot be marked as exported, even if all the field numbers of its parent are reserved error: nested message type marked as exported - --> testdata/strict_visibility.proto:27:5 + --> testdata/strict_visibility.proto:13:5 | -26 | / export message Complete2 { -27 | | export message M {} +12 | / export message Complete2 { +13 | | export message M {} | | ^^^^^^ nested type exported here -28 | | export enum E { Z = 0; } -29 | | reserved 1 to 536870911; -30 | | } +14 | | export enum E { Z = 0; } +15 | | reserved 1 to 536870911; +16 | | } | \_- ... within this type | - ::: testdata/strict_visibility.proto:18:45 + ::: testdata/strict_visibility.proto:4:45 | -18 | option features.default_symbol_visibility = STRICT; + 4 | option features.default_symbol_visibility = STRICT; | ------ `STRICT` specified here | = help: in strict mode, nested message types cannot be marked as exported, even if all the field numbers of its parent are reserved error: expected exactly one reserved range - --> testdata/strict_visibility.proto:33:5 + --> testdata/strict_visibility.proto:19:5 | -32 | / export message Split { -33 | | export message M {} +18 | / export message Split { +19 | | export message M {} | | ^^^^^^ nested type exported here -34 | | export enum E { Z = 0; } -35 | | reserved 1 to 5, 6 to max; +20 | | export enum E { Z = 0; } +21 | | reserved 1 to 5, 6 to max; | | ------ -------- another here | | | | | one here -36 | | } +22 | | } | \_- ... within this type | - ::: testdata/strict_visibility.proto:18:45 + ::: testdata/strict_visibility.proto:4:45 | -18 | option features.default_symbol_visibility = STRICT; + 4 | option features.default_symbol_visibility = STRICT; | ------ `STRICT` specified here | = help: in strict mode, nesting an exported type within another type requires @@ -61,22 +61,22 @@ error: expected exactly one reserved range = help: protoc erroneously rejects this, despite being equivalent error: expected exactly one reserved range - --> testdata/strict_visibility.proto:34:5 + --> testdata/strict_visibility.proto:20:5 | -32 | / export message Split { -33 | | export message M {} -34 | | export enum E { Z = 0; } +18 | / export message Split { +19 | | export message M {} +20 | | export enum E { Z = 0; } | | ^^^^^^ nested type exported here -35 | | reserved 1 to 5, 6 to max; +21 | | reserved 1 to 5, 6 to max; | | ------ -------- another here | | | | | one here -36 | | } +22 | | } | \_- ... within this type | - ::: testdata/strict_visibility.proto:18:45 + ::: testdata/strict_visibility.proto:4:45 | -18 | option features.default_symbol_visibility = STRICT; + 4 | option features.default_symbol_visibility = STRICT; | ------ `STRICT` specified here | = help: in strict mode, nesting an exported type within another type requires @@ -85,19 +85,19 @@ error: expected exactly one reserved range = help: protoc erroneously rejects this, despite being equivalent warning: message type `buf.test.Incomplete1` does not reserve all field numbers - --> testdata/strict_visibility.proto:39:5 + --> testdata/strict_visibility.proto:25:5 | -38 | / export message Incomplete1 { -39 | | export message M {} +24 | / export message Incomplete1 { +25 | | export message M {} | | ^^^^^^ nested type exported here -40 | | export enum E { Z = 0; } -41 | | reserved 1 to 5; -42 | | } +26 | | export enum E { Z = 0; } +27 | | reserved 1 to 5; +28 | | } | \_- ... within this type | - ::: testdata/strict_visibility.proto:18:45 + ::: testdata/strict_visibility.proto:4:45 | -18 | option features.default_symbol_visibility = STRICT; + 4 | option features.default_symbol_visibility = STRICT; | ------ `STRICT` specified here | = help: in strict mode, nesting an exported type within another type requires @@ -107,19 +107,19 @@ warning: message type `buf.test.Incomplete1` does not reserve all field numbers that there is exactly one reserved range warning: message type `buf.test.Incomplete1` does not reserve all field numbers - --> testdata/strict_visibility.proto:40:5 + --> testdata/strict_visibility.proto:26:5 | -38 | / export message Incomplete1 { -39 | | export message M {} -40 | | export enum E { Z = 0; } +24 | / export message Incomplete1 { +25 | | export message M {} +26 | | export enum E { Z = 0; } | | ^^^^^^ nested type exported here -41 | | reserved 1 to 5; -42 | | } +27 | | reserved 1 to 5; +28 | | } | \_- ... within this type | - ::: testdata/strict_visibility.proto:18:45 + ::: testdata/strict_visibility.proto:4:45 | -18 | option features.default_symbol_visibility = STRICT; + 4 | option features.default_symbol_visibility = STRICT; | ------ `STRICT` specified here | = help: in strict mode, nesting an exported type within another type requires @@ -129,19 +129,19 @@ warning: message type `buf.test.Incomplete1` does not reserve all field numbers that there is exactly one reserved range warning: message type `buf.test.Incomplete2` does not reserve all field numbers - --> testdata/strict_visibility.proto:45:5 + --> testdata/strict_visibility.proto:31:5 | -44 | / export message Incomplete2 { -45 | | export message M {} +30 | / export message Incomplete2 { +31 | | export message M {} | | ^^^^^^ nested type exported here -46 | | export enum E { Z = 0; } -47 | | reserved 6 to max; -48 | | } +32 | | export enum E { Z = 0; } +33 | | reserved 6 to max; +34 | | } | \_- ... within this type | - ::: testdata/strict_visibility.proto:18:45 + ::: testdata/strict_visibility.proto:4:45 | -18 | option features.default_symbol_visibility = STRICT; + 4 | option features.default_symbol_visibility = STRICT; | ------ `STRICT` specified here | = help: in strict mode, nesting an exported type within another type requires @@ -151,19 +151,19 @@ warning: message type `buf.test.Incomplete2` does not reserve all field numbers that there is exactly one reserved range warning: message type `buf.test.Incomplete2` does not reserve all field numbers - --> testdata/strict_visibility.proto:46:5 + --> testdata/strict_visibility.proto:32:5 | -44 | / export message Incomplete2 { -45 | | export message M {} -46 | | export enum E { Z = 0; } +30 | / export message Incomplete2 { +31 | | export message M {} +32 | | export enum E { Z = 0; } | | ^^^^^^ nested type exported here -47 | | reserved 6 to max; -48 | | } +33 | | reserved 6 to max; +34 | | } | \_- ... within this type | - ::: testdata/strict_visibility.proto:18:45 + ::: testdata/strict_visibility.proto:4:45 | -18 | option features.default_symbol_visibility = STRICT; + 4 | option features.default_symbol_visibility = STRICT; | ------ `STRICT` specified here | = help: in strict mode, nesting an exported type within another type requires @@ -173,19 +173,19 @@ warning: message type `buf.test.Incomplete2` does not reserve all field numbers that there is exactly one reserved range error: message type `buf.test.Incomplete3` does not reserve all field numbers - --> testdata/strict_visibility.proto:51:5 + --> testdata/strict_visibility.proto:37:5 | -50 | / export message Incomplete3 { -51 | | export message M {} +36 | / export message Incomplete3 { +37 | | export message M {} | | ^^^^^^ nested type exported here -52 | | export enum E { Z = 0; } -53 | | reserved 1 to 5, 6 to 10; -54 | | } +38 | | export enum E { Z = 0; } +39 | | reserved 1 to 5, 6 to 10; +40 | | } | \_- ... within this type | - ::: testdata/strict_visibility.proto:18:45 + ::: testdata/strict_visibility.proto:4:45 | -18 | option features.default_symbol_visibility = STRICT; + 4 | option features.default_symbol_visibility = STRICT; | ------ `STRICT` specified here | = help: in strict mode, nesting an exported type within another type requires @@ -193,19 +193,19 @@ error: message type `buf.test.Incomplete3` does not reserve all field numbers exception"), but this type does not reserve the field number 11 error: message type `buf.test.Incomplete3` does not reserve all field numbers - --> testdata/strict_visibility.proto:52:5 + --> testdata/strict_visibility.proto:38:5 | -50 | / export message Incomplete3 { -51 | | export message M {} -52 | | export enum E { Z = 0; } +36 | / export message Incomplete3 { +37 | | export message M {} +38 | | export enum E { Z = 0; } | | ^^^^^^ nested type exported here -53 | | reserved 1 to 5, 6 to 10; -54 | | } +39 | | reserved 1 to 5, 6 to 10; +40 | | } | \_- ... within this type | - ::: testdata/strict_visibility.proto:18:45 + ::: testdata/strict_visibility.proto:4:45 | -18 | option features.default_symbol_visibility = STRICT; + 4 | option features.default_symbol_visibility = STRICT; | ------ `STRICT` specified here | = help: in strict mode, nesting an exported type within another type requires diff --git a/experimental/ir/testdata/symtab/diamond.proto.yaml b/experimental/ir/testdata/symtab/diamond.proto.yaml index e3e0a8985..2d6558a48 100644 --- a/experimental/ir/testdata/symtab/diamond.proto.yaml +++ b/experimental/ir/testdata/symtab/diamond.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - symtab: true exclude: "unused import" files: diff --git a/experimental/ir/testdata/symtab/double_def.proto.yaml b/experimental/ir/testdata/symtab/double_def.proto.yaml index e55e0397c..ff6d7daa7 100644 --- a/experimental/ir/testdata/symtab/double_def.proto.yaml +++ b/experimental/ir/testdata/symtab/double_def.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - symtab: true exclude: "unused import" files: diff --git a/experimental/ir/testdata/symtab/public.proto.yaml b/experimental/ir/testdata/symtab/public.proto.yaml index 60ff74001..59a0b2c5d 100644 --- a/experimental/ir/testdata/symtab/public.proto.yaml +++ b/experimental/ir/testdata/symtab/public.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - symtab: true exclude: "unused import" files: diff --git a/experimental/ir/testdata/syntax/1999.proto b/experimental/ir/testdata/syntax/1999.proto index fab63bb38..0762348e6 100644 --- a/experimental/ir/testdata/syntax/1999.proto +++ b/experimental/ir/testdata/syntax/1999.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true edition = "1999"; diff --git a/experimental/ir/testdata/syntax/1999.proto.stderr.txt b/experimental/ir/testdata/syntax/1999.proto.stderr.txt index 65bea0d2a..00eb4f8ad 100644 --- a/experimental/ir/testdata/syntax/1999.proto.stderr.txt +++ b/experimental/ir/testdata/syntax/1999.proto.stderr.txt @@ -1,7 +1,7 @@ error: unrecognized `edition` declaration value - --> testdata/syntax/1999.proto:16:11 + --> testdata/syntax/1999.proto:2:11 | -16 | edition = "1999"; + 2 | edition = "1999"; | ^^^^^^ = note: treating the file as Edition 2023 instead = help: permitted values: "2023", "2024" diff --git a/experimental/ir/testdata/syntax/2023.proto b/experimental/ir/testdata/syntax/2023.proto index 2740c914a..79a54b01e 100644 --- a/experimental/ir/testdata/syntax/2023.proto +++ b/experimental/ir/testdata/syntax/2023.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true edition = "2023"; diff --git a/experimental/ir/testdata/syntax/2023_syntax.proto b/experimental/ir/testdata/syntax/2023_syntax.proto index 4ea0a8a1e..a940719c5 100644 --- a/experimental/ir/testdata/syntax/2023_syntax.proto +++ b/experimental/ir/testdata/syntax/2023_syntax.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = 2023; diff --git a/experimental/ir/testdata/syntax/2023_syntax.proto.stderr.txt b/experimental/ir/testdata/syntax/2023_syntax.proto.stderr.txt index f6d2499d0..c98e4406f 100644 --- a/experimental/ir/testdata/syntax/2023_syntax.proto.stderr.txt +++ b/experimental/ir/testdata/syntax/2023_syntax.proto.stderr.txt @@ -1,21 +1,21 @@ error: editions must use the `edition` keyword - --> testdata/syntax/2023_syntax.proto:16:1 + --> testdata/syntax/2023_syntax.proto:2:1 | -16 | syntax = 2023; + 2 | syntax = 2023; | ^^^^^^ help: replace with `edition` | -16 | - syntax = 2023; -16 | + edition = 2023; + 2 | - syntax = 2023; + 2 | + edition = 2023; error: the value of a `syntax` declaration must be a string literal - --> testdata/syntax/2023_syntax.proto:16:10 + --> testdata/syntax/2023_syntax.proto:2:10 | -16 | syntax = 2023; + 2 | syntax = 2023; | ^^^^ help: add quotes to make this a string literal | -16 | syntax = "2023"; + 2 | syntax = "2023"; | + + encountered 2 errors diff --git a/experimental/ir/testdata/syntax/2023_unquoted.proto b/experimental/ir/testdata/syntax/2023_unquoted.proto index fc39edc3c..c1de0624f 100644 --- a/experimental/ir/testdata/syntax/2023_unquoted.proto +++ b/experimental/ir/testdata/syntax/2023_unquoted.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true edition = 2023; diff --git a/experimental/ir/testdata/syntax/2023_unquoted.proto.stderr.txt b/experimental/ir/testdata/syntax/2023_unquoted.proto.stderr.txt index 2ccab60c6..b740702f2 100644 --- a/experimental/ir/testdata/syntax/2023_unquoted.proto.stderr.txt +++ b/experimental/ir/testdata/syntax/2023_unquoted.proto.stderr.txt @@ -1,11 +1,11 @@ error: the value of a `edition` declaration must be a string literal - --> testdata/syntax/2023_unquoted.proto:16:11 + --> testdata/syntax/2023_unquoted.proto:2:11 | -16 | edition = 2023; + 2 | edition = 2023; | ^^^^ help: add quotes to make this a string literal | -16 | edition = "2023"; + 2 | edition = "2023"; | + + encountered 1 error diff --git a/experimental/ir/testdata/syntax/2024.proto b/experimental/ir/testdata/syntax/2024.proto index a7600e2c0..b54c25c04 100644 --- a/experimental/ir/testdata/syntax/2024.proto +++ b/experimental/ir/testdata/syntax/2024.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true edition = "2024"; diff --git a/experimental/ir/testdata/syntax/missing.proto b/experimental/ir/testdata/syntax/missing.proto index 4c166bda6..46185f0ab 100644 --- a/experimental/ir/testdata/syntax/missing.proto +++ b/experimental/ir/testdata/syntax/missing.proto @@ -1,16 +1,2 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true package buf.test; \ No newline at end of file diff --git a/experimental/ir/testdata/syntax/proto2.proto b/experimental/ir/testdata/syntax/proto2.proto index 00d66f087..77eb497fe 100644 --- a/experimental/ir/testdata/syntax/proto2.proto +++ b/experimental/ir/testdata/syntax/proto2.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/syntax/proto2_edition.proto b/experimental/ir/testdata/syntax/proto2_edition.proto index 584120009..edfa8d314 100644 --- a/experimental/ir/testdata/syntax/proto2_edition.proto +++ b/experimental/ir/testdata/syntax/proto2_edition.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true edition = proto2; diff --git a/experimental/ir/testdata/syntax/proto2_edition.proto.stderr.txt b/experimental/ir/testdata/syntax/proto2_edition.proto.stderr.txt index d7c0bfcd6..b35c64ea9 100644 --- a/experimental/ir/testdata/syntax/proto2_edition.proto.stderr.txt +++ b/experimental/ir/testdata/syntax/proto2_edition.proto.stderr.txt @@ -1,23 +1,23 @@ error: proto2 use the `syntax` keyword - --> testdata/syntax/proto2_edition.proto:16:1 + --> testdata/syntax/proto2_edition.proto:2:1 | -16 | edition = proto2; + 2 | edition = proto2; | ^^^^^^^ help: replace with `syntax` | -16 | - edition = proto2; -16 | + syntax = proto2; + 2 | - edition = proto2; + 2 | + syntax = proto2; | = help: proto2 is technically an edition, but cannot use `edition` error: the value of a `edition` declaration must be a string literal - --> testdata/syntax/proto2_edition.proto:16:11 + --> testdata/syntax/proto2_edition.proto:2:11 | -16 | edition = proto2; + 2 | edition = proto2; | ^^^^^^ help: add quotes to make this a string literal | -16 | edition = "proto2"; + 2 | edition = "proto2"; | + + encountered 2 errors diff --git a/experimental/ir/testdata/syntax/proto2_unquoted.proto b/experimental/ir/testdata/syntax/proto2_unquoted.proto index 6dfe6659c..27958103d 100644 --- a/experimental/ir/testdata/syntax/proto2_unquoted.proto +++ b/experimental/ir/testdata/syntax/proto2_unquoted.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = proto2; diff --git a/experimental/ir/testdata/syntax/proto2_unquoted.proto.stderr.txt b/experimental/ir/testdata/syntax/proto2_unquoted.proto.stderr.txt index 22f4ea8ad..7e151c6a5 100644 --- a/experimental/ir/testdata/syntax/proto2_unquoted.proto.stderr.txt +++ b/experimental/ir/testdata/syntax/proto2_unquoted.proto.stderr.txt @@ -1,11 +1,11 @@ error: the value of a `syntax` declaration must be a string literal - --> testdata/syntax/proto2_unquoted.proto:16:10 + --> testdata/syntax/proto2_unquoted.proto:2:10 | -16 | syntax = proto2; + 2 | syntax = proto2; | ^^^^^^ help: add quotes to make this a string literal | -16 | syntax = "proto2"; + 2 | syntax = "proto2"; | + + encountered 1 error diff --git a/experimental/ir/testdata/syntax/proto3.proto b/experimental/ir/testdata/syntax/proto3.proto index 0fd462174..815fd2048 100644 --- a/experimental/ir/testdata/syntax/proto3.proto +++ b/experimental/ir/testdata/syntax/proto3.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto3"; diff --git a/experimental/ir/testdata/syntax/proto4.proto b/experimental/ir/testdata/syntax/proto4.proto index 825c89814..2891b288d 100644 --- a/experimental/ir/testdata/syntax/proto4.proto +++ b/experimental/ir/testdata/syntax/proto4.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto4"; diff --git a/experimental/ir/testdata/syntax/proto4.proto.stderr.txt b/experimental/ir/testdata/syntax/proto4.proto.stderr.txt index 154a6e94c..afe081253 100644 --- a/experimental/ir/testdata/syntax/proto4.proto.stderr.txt +++ b/experimental/ir/testdata/syntax/proto4.proto.stderr.txt @@ -1,7 +1,7 @@ error: unrecognized `syntax` declaration value - --> testdata/syntax/proto4.proto:16:10 + --> testdata/syntax/proto4.proto:2:10 | -16 | syntax = "proto4"; + 2 | syntax = "proto4"; | ^^^^^^^^ = note: treating the file as "proto2" instead = help: permitted values: "proto2", "proto3" diff --git a/experimental/ir/testdata/tags/allow_alias.proto b/experimental/ir/testdata/tags/allow_alias.proto index 88020e4fe..83e93c473 100644 --- a/experimental/ir/testdata/tags/allow_alias.proto +++ b/experimental/ir/testdata/tags/allow_alias.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package buf.test; diff --git a/experimental/ir/testdata/tags/allow_alias.proto.stderr.txt b/experimental/ir/testdata/tags/allow_alias.proto.stderr.txt index 59f3e8197..326d484f2 100644 --- a/experimental/ir/testdata/tags/allow_alias.proto.stderr.txt +++ b/experimental/ir/testdata/tags/allow_alias.proto.stderr.txt @@ -1,15 +1,15 @@ error: enum value `0` used more than once - --> testdata/tags/allow_alias.proto:21:10 + --> testdata/tags/allow_alias.proto:7:10 | -20 | A1 = 0; + 6 | A1 = 0; | - previously used here -21 | B1 = 0; + 7 | B1 = 0; | ^ used here error: `allow_alias` requires at least one aliasing enum value - --> testdata/tags/allow_alias.proto:31:12 + --> testdata/tags/allow_alias.proto:17:12 | -31 | option allow_alias = true; +17 | option allow_alias = true; | ^^^^^^^^^^^^^^^^^^ encountered 2 errors diff --git a/experimental/ir/testdata/tags/enum.proto b/experimental/ir/testdata/tags/enum.proto index c8fa7650f..af1ffb3b8 100644 --- a/experimental/ir/testdata/tags/enum.proto +++ b/experimental/ir/testdata/tags/enum.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package buf.test; diff --git a/experimental/ir/testdata/tags/enum.proto.stderr.txt b/experimental/ir/testdata/tags/enum.proto.stderr.txt index cf833354b..614292126 100644 --- a/experimental/ir/testdata/tags/enum.proto.stderr.txt +++ b/experimental/ir/testdata/tags/enum.proto.stderr.txt @@ -1,29 +1,29 @@ error: enum type must define at least one value - --> testdata/tags/enum.proto:19:1 + --> testdata/tags/enum.proto:5:1 | -19 | enum Empty {} + 5 | enum Empty {} | ^^^^^^^^^^^^^ error: first value of open enum must be zero - --> testdata/tags/enum.proto:31:10 + --> testdata/tags/enum.proto:17:10 | -31 | Z3 = 1; +17 | Z3 = 1; | ^ - ::: testdata/tags/enum.proto:15:11 + ::: testdata/tags/enum.proto:1:11 | -15 | edition = "2023"; + 1 | edition = "2023"; | ------ this makes `buf.test.Open1` an open enum | = help: open enums must define a zero value, and it must be the first one error: first value of open enum must be zero - --> testdata/tags/enum.proto:36:10 + --> testdata/tags/enum.proto:22:10 | -36 | Z4 = 1; +22 | Z4 = 1; | ^ - ::: testdata/tags/enum.proto:35:33 + ::: testdata/tags/enum.proto:21:33 | -35 | option features.enum_type = OPEN; +21 | option features.enum_type = OPEN; | ---- | | | this makes `buf.test.Open2` an open enum diff --git a/experimental/ir/testdata/tags/enum_proto2.proto b/experimental/ir/testdata/tags/enum_proto2.proto index 5489b2b87..e80007d11 100644 --- a/experimental/ir/testdata/tags/enum_proto2.proto +++ b/experimental/ir/testdata/tags/enum_proto2.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true syntax = "proto2"; diff --git a/experimental/ir/testdata/tags/enum_two_char_mixed.proto b/experimental/ir/testdata/tags/enum_two_char_mixed.proto index b43851d79..256340f7a 100644 --- a/experimental/ir/testdata/tags/enum_two_char_mixed.proto +++ b/experimental/ir/testdata/tags/enum_two_char_mixed.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //% descriptor: true // Regression test: 2-char [A-Z][a-z] enum values should not produce a false // JSON name collision (bufbuild/buf#4474). diff --git a/experimental/ir/testdata/tags/fields.proto b/experimental/ir/testdata/tags/fields.proto index e1cc435c8..0340e804b 100644 --- a/experimental/ir/testdata/tags/fields.proto +++ b/experimental/ir/testdata/tags/fields.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/ir/testdata/tags/fields.proto.stderr.txt b/experimental/ir/testdata/tags/fields.proto.stderr.txt index 0b796c7c7..760bfdf99 100644 --- a/experimental/ir/testdata/tags/fields.proto.stderr.txt +++ b/experimental/ir/testdata/tags/fields.proto.stderr.txt @@ -1,146 +1,146 @@ error: unexpected range expression in message field tag - --> testdata/tags/fields.proto:60:25 + --> testdata/tags/fields.proto:46:25 | -60 | optional int32 m3 = 1 to 2; +46 | optional int32 m3 = 1 to 2; | ^^^^^^ error: unexpected `:` after definition - --> testdata/tags/fields.proto:61:26 + --> testdata/tags/fields.proto:47:26 | -61 | optional int32 m4 = a: 2; +47 | optional int32 m4 = a: 2; | ^ expected `;` | help: consider inserting a `;` | -61 | optional int32 m4 = a;: 2; +47 | optional int32 m4 = a;: 2; | + error: unexpected tokens in message definition - --> testdata/tags/fields.proto:61:26 + --> testdata/tags/fields.proto:47:26 | -61 | optional int32 m4 = a: 2; +47 | optional int32 m4 = a: 2; | ^^^ | | | expected identifier, `;`, `.`, `(...)`, or `{...}` error: encountered more than one message field tag - --> testdata/tags/fields.proto:62:27 + --> testdata/tags/fields.proto:48:27 | -62 | optional int32 m5 = a = 2; +48 | optional int32 m5 = a = 2; | --- ^^^ help: consider removing this | | | first one is here error: field number `2` used more than once - --> testdata/tags/fields.proto:22:25 + --> testdata/tags/fields.proto:8:25 | -21 | optional int32 y = 2; + 7 | optional int32 y = 2; | - previously used here -22 | optional int32 y2 = 2; + 8 | optional int32 y2 = 2; | ^ used here error: field number out of range - --> testdata/tags/fields.proto:24:25 + --> testdata/tags/fields.proto:10:25 | -24 | optional int32 z1 = 0; +10 | optional int32 z1 = 0; | ^ = note: the range for field numbers is `1 to 536870911`, minus `19000 to 19999`, which is reserved for internal use error: field number out of range - --> testdata/tags/fields.proto:25:26 + --> testdata/tags/fields.proto:11:26 | -25 | optional int32 z12 = 0; +11 | optional int32 z12 = 0; | ^ = note: the range for field numbers is `1 to 536870911`, minus `19000 to 19999`, which is reserved for internal use error: field number out of range - --> testdata/tags/fields.proto:27:25 + --> testdata/tags/fields.proto:13:25 | -27 | optional int32 z3 = 0x20000000; +13 | optional int32 z3 = 0x20000000; | ^^^^^^^^^^ = note: the range for field numbers is `0x1 to 0x1fffffff`, minus `0x4a38 to 0x4e1f`, which is reserved for internal use error: field number out of range - --> testdata/tags/fields.proto:28:25 + --> testdata/tags/fields.proto:14:25 | -28 | optional int32 z4 = 0Xffffffff; +14 | optional int32 z4 = 0Xffffffff; | ^^^^^^^^^^ = note: the range for field numbers is `0X1 to 0X1fffffff`, minus `0X4a38 to 0X4e1f`, which is reserved for internal use error: field number out of range - --> testdata/tags/fields.proto:29:25 + --> testdata/tags/fields.proto:15:25 | -29 | optional int32 z5 = 04777777777; +15 | optional int32 z5 = 04777777777; | ^^^^^^^^^^^ = note: the range for field numbers is `01 to 03777777777`, minus `045070 to 047037`, which is reserved for internal use error: `z6` declared multiple times - --> testdata/tags/fields.proto:31:20 + --> testdata/tags/fields.proto:17:20 | -31 | optional int32 z6 = 0xffffffffffffffffffffffffffffffff; +17 | optional int32 z6 = 0xffffffffffffffffffffffffffffffff; | ^^ first here, as a message field -32 | -33 | optional int32 z6 = -1; +18 | +19 | optional int32 z6 = -1; | -- ...also declared here error: field number out of range - --> testdata/tags/fields.proto:31:25 + --> testdata/tags/fields.proto:17:25 | -31 | optional int32 z6 = 0xffffffffffffffffffffffffffffffff; +17 | optional int32 z6 = 0xffffffffffffffffffffffffffffffff; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: the range for field numbers is `0x1 to 0x1fffffff`, minus `0x4a38 to 0x4e1f`, which is reserved for internal use warning: message fields have the same JSON name - --> testdata/tags/fields.proto:33:20 + --> testdata/tags/fields.proto:19:20 | -31 | optional int32 z6 = 0xffffffffffffffffffffffffffffffff; +17 | optional int32 z6 = 0xffffffffffffffffffffffffffffffff; | -- this implies JSON name `z6` -32 | -33 | optional int32 z6 = -1; +18 | +19 | optional int32 z6 = -1; | ^^ this also implies that name error: field number out of range - --> testdata/tags/fields.proto:33:25 + --> testdata/tags/fields.proto:19:25 | -33 | optional int32 z6 = -1; +19 | optional int32 z6 = -1; | ^^ = note: the range for field numbers is `1 to 536870911`, minus `19000 to 19999`, which is reserved for internal use error: field number out of range - --> testdata/tags/fields.proto:35:25 + --> testdata/tags/fields.proto:21:25 | -35 | optional int32 r1 = 19000; +21 | optional int32 r1 = 19000; | ^^^^^ = note: the range for field numbers is `1 to 536870911`, minus `19000 to 19999`, which is reserved for internal use error: field number out of range - --> testdata/tags/fields.proto:36:25 + --> testdata/tags/fields.proto:22:25 | -36 | optional int32 r2 = 19001; +22 | optional int32 r2 = 19001; | ^^^^^ = note: the range for field numbers is `1 to 536870911`, minus `19000 to 19999`, which is reserved for internal use error: field number out of range - --> testdata/tags/fields.proto:37:25 + --> testdata/tags/fields.proto:23:25 | -37 | optional int32 r3 = 19999; +23 | optional int32 r3 = 19999; | ^^^^^ = note: the range for field numbers is `1 to 536870911`, minus `19000 to 19999`, which is reserved for internal use error: mismatched types - --> testdata/tags/fields.proto:42:25 + --> testdata/tags/fields.proto:28:25 | -42 | optional float f1 = 1.0; +28 | optional float f1 = 1.0; | ^^^ | | | expected field number, found floating-point literal @@ -149,9 +149,9 @@ error: mismatched types found: floating-point literal error: mismatched types - --> testdata/tags/fields.proto:43:25 + --> testdata/tags/fields.proto:29:25 | -43 | optional float f2 = -1.0; +29 | optional float f2 = -1.0; | ^^^^ | | | expected field number, found floating-point literal @@ -160,9 +160,9 @@ error: mismatched types found: floating-point literal error: mismatched types - --> testdata/tags/fields.proto:44:25 + --> testdata/tags/fields.proto:30:25 | -44 | optional float f3 = inf; +30 | optional float f3 = inf; | ^^^ | | | expected field number, found floating-point literal @@ -171,9 +171,9 @@ error: mismatched types found: floating-point literal error: mismatched types - --> testdata/tags/fields.proto:45:25 + --> testdata/tags/fields.proto:31:25 | -45 | optional float f4 = -inf; +31 | optional float f4 = -inf; | ^^^^ | | | expected field number, found floating-point literal @@ -182,9 +182,9 @@ error: mismatched types found: floating-point literal error: mismatched types - --> testdata/tags/fields.proto:46:25 + --> testdata/tags/fields.proto:32:25 | -46 | optional float f5 = nan; +32 | optional float f5 = nan; | ^^^ | | | expected field number, found floating-point literal @@ -193,9 +193,9 @@ error: mismatched types found: floating-point literal error: mismatched types - --> testdata/tags/fields.proto:47:25 + --> testdata/tags/fields.proto:33:25 | -47 | optional float f6 = -nan; +33 | optional float f6 = -nan; | ^^^^ | | | expected field number, found floating-point literal @@ -204,61 +204,61 @@ error: mismatched types found: floating-point literal error: mismatched types - --> testdata/tags/fields.proto:49:24 + --> testdata/tags/fields.proto:35:24 | -49 | optional bool b1 = false; +35 | optional bool b1 = false; | ^^^^^ expected field number, found `bool` | = note: expected: field number found: scalar type `bool` error: mismatched types - --> testdata/tags/fields.proto:50:24 + --> testdata/tags/fields.proto:36:24 | -50 | optional bool b2 = true; +36 | optional bool b2 = true; | ^^^^ expected field number, found `bool` | = note: expected: field number found: scalar type `bool` error: `max` outside of range end - --> testdata/tags/fields.proto:51:24 + --> testdata/tags/fields.proto:37:24 | -51 | optional bool b3 = max; +37 | optional bool b3 = max; | ^^^ = note: the special `max` expression can only be used at the end of a range error: mismatched types - --> testdata/tags/fields.proto:53:26 + --> testdata/tags/fields.proto:39:26 | -53 | optional string s1 = ""; +39 | optional string s1 = ""; | ^^ expected field number, found `string` | = note: expected: field number found: scalar type `string` error: mismatched types - --> testdata/tags/fields.proto:54:26 + --> testdata/tags/fields.proto:40:26 | -54 | optional string s2 = ''; +40 | optional string s2 = ''; | ^^ expected field number, found `string` | = note: expected: field number found: scalar type `string` error: mismatched types - --> testdata/tags/fields.proto:55:26 + --> testdata/tags/fields.proto:41:26 | -55 | optional string s3 = "abc"; +41 | optional string s3 = "abc"; | ^^^^^ expected field number, found `string` | = note: expected: field number found: scalar type `string` error: mismatched types - --> testdata/tags/fields.proto:56:26 + --> testdata/tags/fields.proto:42:26 | -56 | optional string s4 = '\xff\xff\xff'; +42 | optional string s4 = '\xff\xff\xff'; | ^^^^^^^^^^^^^^ | | | expected field number, found `string` @@ -267,27 +267,27 @@ error: mismatched types found: scalar type `string` error: mismatched types - --> testdata/tags/fields.proto:58:25 + --> testdata/tags/fields.proto:44:25 | -58 | optional int32 m1 = {}; +44 | optional int32 m1 = {}; | ^^ expected field number, found message expression | = note: expected: field number found: message expression error: mismatched types - --> testdata/tags/fields.proto:59:25 + --> testdata/tags/fields.proto:45:25 | -59 | optional int32 m2 = []; +45 | optional int32 m2 = []; | ^^ expected field number, found array expression | = note: expected: field number found: array expression error: mismatched types - --> testdata/tags/fields.proto:60:25 + --> testdata/tags/fields.proto:46:25 | -60 | optional int32 m3 = 1 to 2; +46 | optional int32 m3 = 1 to 2; | ^^^^^^ | | | expected field number, found range expression @@ -296,17 +296,17 @@ error: mismatched types found: range expression error: cannot find `a` in this scope - --> testdata/tags/fields.proto:61:25 + --> testdata/tags/fields.proto:47:25 | -61 | optional int32 m4 = a: 2; +47 | optional int32 m4 = a: 2; | ^ not found in this scope | = help: the full name of this scope is `test.M` error: cannot find `a` in this scope - --> testdata/tags/fields.proto:62:25 + --> testdata/tags/fields.proto:48:25 | -62 | optional int32 m5 = a = 2; +48 | optional int32 m5 = a = 2; | ^ not found in this scope | = help: the full name of this scope is `test.M` diff --git a/experimental/ir/testdata/tags/overlap.proto b/experimental/ir/testdata/tags/overlap.proto index d12fc3698..a7d130307 100644 --- a/experimental/ir/testdata/tags/overlap.proto +++ b/experimental/ir/testdata/tags/overlap.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/ir/testdata/tags/overlap.proto.stderr.txt b/experimental/ir/testdata/tags/overlap.proto.stderr.txt index 0bfcdd44e..c28775d34 100644 --- a/experimental/ir/testdata/tags/overlap.proto.stderr.txt +++ b/experimental/ir/testdata/tags/overlap.proto.stderr.txt @@ -1,33 +1,33 @@ error: field number `2` used more than once - --> testdata/tags/overlap.proto:22:25 + --> testdata/tags/overlap.proto:8:25 | -21 | optional int32 y1 = 2; + 7 | optional int32 y1 = 2; | - previously used here -22 | optional int32 y2 = 2; + 8 | optional int32 y2 = 2; | ^ used here error: field number out of range - --> testdata/tags/overlap.proto:25:25 + --> testdata/tags/overlap.proto:11:25 | -25 | optional int32 z1 = -1; +11 | optional int32 z1 = -1; | ^^ = note: the range for field numbers is `1 to 536870911`, minus `19000 to 19999`, which is reserved for internal use error: field number out of range - --> testdata/tags/overlap.proto:26:25 + --> testdata/tags/overlap.proto:12:25 | -26 | optional int32 z2 = -1; +12 | optional int32 z2 = -1; | ^^ = note: the range for field numbers is `1 to 536870911`, minus `19000 to 19999`, which is reserved for internal use error: enum value `2` used more than once - --> testdata/tags/overlap.proto:32:10 + --> testdata/tags/overlap.proto:18:10 | -31 | Y1 = 2; +17 | Y1 = 2; | - previously used here -32 | Y2 = 2; +18 | Y2 = 2; | ^ used here encountered 4 errors diff --git a/experimental/ir/testdata/tags/reserved.proto b/experimental/ir/testdata/tags/reserved.proto index 77d265c13..f167fb410 100644 --- a/experimental/ir/testdata/tags/reserved.proto +++ b/experimental/ir/testdata/tags/reserved.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/ir/testdata/tags/reserved.proto.stderr.txt b/experimental/ir/testdata/tags/reserved.proto.stderr.txt index 6c1b5e3c4..ad5a734a6 100644 --- a/experimental/ir/testdata/tags/reserved.proto.stderr.txt +++ b/experimental/ir/testdata/tags/reserved.proto.stderr.txt @@ -1,177 +1,177 @@ error: use of reserved field number `2` - --> testdata/tags/reserved.proto:21:25 + --> testdata/tags/reserved.proto:7:25 | -21 | optional int32 y1 = 2; + 7 | optional int32 y1 = 2; | ^ used here -22 | optional int32 y2 = 3; + 8 | optional int32 y2 = 3; ... -26 | reserved 2, 3 to 3, 5 to 10; +12 | reserved 2, 3 to 3, 5 to 10; | - field number reserved here error: use of reserved field number `3` - --> testdata/tags/reserved.proto:22:25 + --> testdata/tags/reserved.proto:8:25 | -22 | optional int32 y2 = 3; + 8 | optional int32 y2 = 3; | ^ used here -23 | optional int32 y3 = 4; + 9 | optional int32 y3 = 4; ... -26 | reserved 2, 3 to 3, 5 to 10; +12 | reserved 2, 3 to 3, 5 to 10; | ------ field number reserved here error: use of reserved field number `5` - --> testdata/tags/reserved.proto:24:25 + --> testdata/tags/reserved.proto:10:25 | -24 | optional int32 y4 = 5; +10 | optional int32 y4 = 5; | ^ used here -25 | -26 | reserved 2, 3 to 3, 5 to 10; +11 | +12 | reserved 2, 3 to 3, 5 to 10; | ------- field number reserved here warning: singleton range can be simplified - --> testdata/tags/reserved.proto:26:17 + --> testdata/tags/reserved.proto:12:17 | -26 | reserved 2, 3 to 3, 5 to 10; +12 | reserved 2, 3 to 3, 5 to 10; | ^^^^^^ help: replace with a single number | -26 | - reserved 2, 3 to 3, 5 to 10; -26 | + reserved 2, 3, 5 to 10; +12 | - reserved 2, 3 to 3, 5 to 10; +12 | + reserved 2, 3, 5 to 10; error: overlapping field number ranges - --> testdata/tags/reserved.proto:27:14 + --> testdata/tags/reserved.proto:13:14 | -26 | reserved 2, 3 to 3, 5 to 10; +12 | reserved 2, 3 to 3, 5 to 10; | ------- overlaps with this one -27 | reserved 7, 8 to max; // Overlapping reserved regions. +13 | reserved 7, 8 to max; // Overlapping reserved regions. | ^ this range | = help: they overlap at `7` error: overlapping field number ranges - --> testdata/tags/reserved.proto:27:17 + --> testdata/tags/reserved.proto:13:17 | -26 | reserved 2, 3 to 3, 5 to 10; +12 | reserved 2, 3 to 3, 5 to 10; | ------- overlaps with this one -27 | reserved 7, 8 to max; // Overlapping reserved regions. +13 | reserved 7, 8 to max; // Overlapping reserved regions. | ^^^^^^^^ this range | = help: they overlap in the range `8 to 10` error: `max` outside of range end - --> testdata/tags/reserved.proto:28:14 + --> testdata/tags/reserved.proto:14:14 | -28 | reserved max to max; // Only first can be max. +14 | reserved max to max; // Only first can be max. | ^^^ = note: the special `max` expression can only be used at the end of a range error: use of reserved message field name - --> testdata/tags/reserved.proto:30:20 + --> testdata/tags/reserved.proto:16:20 | -30 | optional int32 reserved = 100; +16 | optional int32 reserved = 100; | ^^^^^^^^ -31 | reserved "reserved", "unused"; +17 | reserved "reserved", "unused"; | ---------- `reserved` reserved here error: use of reserved field number `100` - --> testdata/tags/reserved.proto:30:31 + --> testdata/tags/reserved.proto:16:31 | -27 | reserved 7, 8 to max; // Overlapping reserved regions. +13 | reserved 7, 8 to max; // Overlapping reserved regions. | -------- field number reserved here -28 | reserved max to max; // Only first can be max. -29 | -30 | optional int32 reserved = 100; +14 | reserved max to max; // Only first can be max. +15 | +16 | optional int32 reserved = 100; | ^^^ used here error: use of reserved enum value `2` - --> testdata/tags/reserved.proto:36:10 + --> testdata/tags/reserved.proto:22:10 | -36 | Y1 = 2; +22 | Y1 = 2; | ^ used here -37 | Y2 = 3; +23 | Y2 = 3; ... -41 | reserved 2, 3 to 3, 5 to 10; +27 | reserved 2, 3 to 3, 5 to 10; | - enum value reserved here error: use of reserved enum value `3` - --> testdata/tags/reserved.proto:37:10 + --> testdata/tags/reserved.proto:23:10 | -37 | Y2 = 3; +23 | Y2 = 3; | ^ used here -38 | Y3 = 4; +24 | Y3 = 4; ... -41 | reserved 2, 3 to 3, 5 to 10; +27 | reserved 2, 3 to 3, 5 to 10; | ------ enum value reserved here error: use of reserved enum value `5` - --> testdata/tags/reserved.proto:39:10 + --> testdata/tags/reserved.proto:25:10 | -39 | Y4 = 5; +25 | Y4 = 5; | ^ used here -40 | -41 | reserved 2, 3 to 3, 5 to 10; +26 | +27 | reserved 2, 3 to 3, 5 to 10; | ------- enum value reserved here warning: singleton range can be simplified - --> testdata/tags/reserved.proto:41:17 + --> testdata/tags/reserved.proto:27:17 | -41 | reserved 2, 3 to 3, 5 to 10; +27 | reserved 2, 3 to 3, 5 to 10; | ^^^^^^ help: replace with a single number | -41 | - reserved 2, 3 to 3, 5 to 10; -41 | + reserved 2, 3, 5 to 10; +27 | - reserved 2, 3 to 3, 5 to 10; +27 | + reserved 2, 3, 5 to 10; error: overlapping enum value ranges - --> testdata/tags/reserved.proto:42:14 + --> testdata/tags/reserved.proto:28:14 | -41 | reserved 2, 3 to 3, 5 to 10; +27 | reserved 2, 3 to 3, 5 to 10; | ------- overlaps with this one -42 | reserved 7, 8 to max; +28 | reserved 7, 8 to max; | ^ this range | = help: they overlap at `7` error: overlapping enum value ranges - --> testdata/tags/reserved.proto:42:17 + --> testdata/tags/reserved.proto:28:17 | -41 | reserved 2, 3 to 3, 5 to 10; +27 | reserved 2, 3 to 3, 5 to 10; | ------- overlaps with this one -42 | reserved 7, 8 to max; +28 | reserved 7, 8 to max; | ^^^^^^^^ this range | = help: they overlap in the range `8 to 10` error: `max` outside of range end - --> testdata/tags/reserved.proto:43:14 + --> testdata/tags/reserved.proto:29:14 | -43 | reserved max to max; +29 | reserved max to max; | ^^^ = note: the special `max` expression can only be used at the end of a range error: use of reserved enum value name - --> testdata/tags/reserved.proto:45:5 + --> testdata/tags/reserved.proto:31:5 | -45 | reserved = 100; +31 | reserved = 100; | ^^^^^^^^ -46 | reserved "reserved", "unused"; +32 | reserved "reserved", "unused"; | ---------- `reserved` reserved here error: use of reserved enum value `100` - --> testdata/tags/reserved.proto:45:16 + --> testdata/tags/reserved.proto:31:16 | -42 | reserved 7, 8 to max; +28 | reserved 7, 8 to max; | -------- enum value reserved here -43 | reserved max to max; -44 | -45 | reserved = 100; +29 | reserved max to max; +30 | +31 | reserved = 100; | ^^^ used here error: use of reserved enum value `0` - --> testdata/tags/reserved.proto:50:9 + --> testdata/tags/reserved.proto:36:9 | -50 | K = 0; +36 | K = 0; | ^ used here -51 | reserved 0; +37 | reserved 0; | - enum value reserved here encountered 17 errors and 2 warnings diff --git a/experimental/ir/testdata/tags/values.proto b/experimental/ir/testdata/tags/values.proto index d26fb829e..086c38a75 100644 --- a/experimental/ir/testdata/tags/values.proto +++ b/experimental/ir/testdata/tags/values.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/ir/testdata/tags/values.proto.stderr.txt b/experimental/ir/testdata/tags/values.proto.stderr.txt index be35bbf9b..ecd79e0f9 100644 --- a/experimental/ir/testdata/tags/values.proto.stderr.txt +++ b/experimental/ir/testdata/tags/values.proto.stderr.txt @@ -1,234 +1,234 @@ error: unexpected range expression in enum value - --> testdata/tags/values.proto:50:10 + --> testdata/tags/values.proto:36:10 | -50 | M3 = 1 to 2; +36 | M3 = 1 to 2; | ^^^^^^ error: unexpected `:` after definition - --> testdata/tags/values.proto:51:11 + --> testdata/tags/values.proto:37:11 | -51 | M4 = a: 2; +37 | M4 = a: 2; | ^ expected `;` | help: consider inserting a `;` | -51 | M4 = a;: 2; +37 | M4 = a;: 2; | + error: unexpected tokens in enum definition - --> testdata/tags/values.proto:51:11 + --> testdata/tags/values.proto:37:11 | -51 | M4 = a: 2; +37 | M4 = a: 2; | ^^^ expected identifier, `;`, `.`, `(...)`, or `{...}` error: encountered more than one message field tag - --> testdata/tags/values.proto:52:12 + --> testdata/tags/values.proto:38:12 | -52 | M5 = a = 2; +38 | M5 = a = 2; | --- ^^^ help: consider removing this | | | first one is here error: enum value `2` used more than once - --> testdata/tags/values.proto:23:10 + --> testdata/tags/values.proto:9:10 | -22 | Y = 2; + 8 | Y = 2; | - previously used here -23 | Y2 = 2; + 9 | Y2 = 2; | ^ used here error: literal out of range for `int32` - --> testdata/tags/values.proto:28:10 + --> testdata/tags/values.proto:14:10 | -28 | Z4 = 0x80000000; +14 | Z4 = 0x80000000; | ^^^^^^^^^^ = note: the range for `int32` is `-0x80000000 to 0x7fffffff` error: literal out of range for `int32` - --> testdata/tags/values.proto:29:10 + --> testdata/tags/values.proto:15:10 | -29 | Z5 = -0x80000001; +15 | Z5 = -0x80000001; | ^^^^^^^^^^^ = note: the range for `int32` is `-0x80000000 to 0x7fffffff` error: literal out of range for `int32` - --> testdata/tags/values.proto:30:10 + --> testdata/tags/values.proto:16:10 | -30 | Z6 = 0xffffffffffffffffffffffffffffffff; +16 | Z6 = 0xffffffffffffffffffffffffffffffff; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: the range for `int32` is `-0x80000000 to 0x7fffffff` error: mismatched types - --> testdata/tags/values.proto:32:10 + --> testdata/tags/values.proto:18:10 | -32 | F1 = 1.0; +18 | F1 = 1.0; | ^^^ expected `int32`, found floating-point literal | = note: expected: scalar type `int32` found: floating-point literal error: mismatched types - --> testdata/tags/values.proto:33:10 + --> testdata/tags/values.proto:19:10 | -33 | F2 = -1.0; +19 | F2 = -1.0; | ^^^^ expected `int32`, found floating-point literal | = note: expected: scalar type `int32` found: floating-point literal error: mismatched types - --> testdata/tags/values.proto:34:10 + --> testdata/tags/values.proto:20:10 | -34 | F3 = inf; +20 | F3 = inf; | ^^^ expected `int32`, found floating-point literal | = note: expected: scalar type `int32` found: floating-point literal error: mismatched types - --> testdata/tags/values.proto:35:10 + --> testdata/tags/values.proto:21:10 | -35 | F4 = -inf; +21 | F4 = -inf; | ^^^^ expected `int32`, found floating-point literal | = note: expected: scalar type `int32` found: floating-point literal error: mismatched types - --> testdata/tags/values.proto:36:10 + --> testdata/tags/values.proto:22:10 | -36 | F5 = nan; +22 | F5 = nan; | ^^^ expected `int32`, found floating-point literal | = note: expected: scalar type `int32` found: floating-point literal error: mismatched types - --> testdata/tags/values.proto:37:10 + --> testdata/tags/values.proto:23:10 | -37 | F6 = -nan; +23 | F6 = -nan; | ^^^^ expected `int32`, found floating-point literal | = note: expected: scalar type `int32` found: floating-point literal error: mismatched types - --> testdata/tags/values.proto:39:10 + --> testdata/tags/values.proto:25:10 | -39 | B1 = false; +25 | B1 = false; | ^^^^^ expected `int32`, found `bool` | = note: expected: scalar type `int32` found: scalar type `bool` error: mismatched types - --> testdata/tags/values.proto:40:10 + --> testdata/tags/values.proto:26:10 | -40 | B2 = true; +26 | B2 = true; | ^^^^ expected `int32`, found `bool` | = note: expected: scalar type `int32` found: scalar type `bool` error: `max` outside of range end - --> testdata/tags/values.proto:41:10 + --> testdata/tags/values.proto:27:10 | -41 | B3 = max; +27 | B3 = max; | ^^^ = note: the special `max` expression can only be used at the end of a range error: mismatched types - --> testdata/tags/values.proto:43:10 + --> testdata/tags/values.proto:29:10 | -43 | S1 = ""; +29 | S1 = ""; | ^^ expected `int32`, found `string` | = note: expected: scalar type `int32` found: scalar type `string` error: mismatched types - --> testdata/tags/values.proto:44:10 + --> testdata/tags/values.proto:30:10 | -44 | S2 = ''; +30 | S2 = ''; | ^^ expected `int32`, found `string` | = note: expected: scalar type `int32` found: scalar type `string` error: mismatched types - --> testdata/tags/values.proto:45:10 + --> testdata/tags/values.proto:31:10 | -45 | S3 = "abc"; +31 | S3 = "abc"; | ^^^^^ expected `int32`, found `string` | = note: expected: scalar type `int32` found: scalar type `string` error: mismatched types - --> testdata/tags/values.proto:46:10 + --> testdata/tags/values.proto:32:10 | -46 | S4 = '\xff\xff\xff'; +32 | S4 = '\xff\xff\xff'; | ^^^^^^^^^^^^^^ expected `int32`, found `string` | = note: expected: scalar type `int32` found: scalar type `string` error: mismatched types - --> testdata/tags/values.proto:48:10 + --> testdata/tags/values.proto:34:10 | -48 | M1 = {}; +34 | M1 = {}; | ^^ expected `int32`, found message expression | = note: expected: scalar type `int32` found: message expression error: mismatched types - --> testdata/tags/values.proto:49:10 + --> testdata/tags/values.proto:35:10 | -49 | M2 = []; +35 | M2 = []; | ^^ expected `int32`, found array expression | = note: expected: scalar type `int32` found: array expression error: mismatched types - --> testdata/tags/values.proto:50:10 + --> testdata/tags/values.proto:36:10 | -50 | M3 = 1 to 2; +36 | M3 = 1 to 2; | ^^^^^^ expected `int32`, found range expression | = note: expected: scalar type `int32` found: range expression error: cannot find `a` in this scope - --> testdata/tags/values.proto:51:10 + --> testdata/tags/values.proto:37:10 | -51 | M4 = a: 2; +37 | M4 = a: 2; | ^ not found in this scope | = help: the full name of this scope is `test.E` error: cannot find `a` in this scope - --> testdata/tags/values.proto:52:10 + --> testdata/tags/values.proto:38:10 | -52 | M5 = a = 2; +38 | M5 = a = 2; | ^ not found in this scope | = help: the full name of this scope is `test.E` error: mismatched types - --> testdata/tags/values.proto:54:10 + --> testdata/tags/values.proto:40:10 | -54 | E1 = X; +40 | E1 = X; | ^ expected `int32`, found `test.E` | = note: expected: scalar type `int32` found: enum type `test.E` error: mismatched types - --> testdata/tags/values.proto:55:10 + --> testdata/tags/values.proto:41:10 | -55 | E2 = -Y; +41 | E2 = -Y; | ^^ expected `int32`, found `test.E` | = note: expected: scalar type `int32` diff --git a/experimental/ir/testdata/visibility.proto.yaml b/experimental/ir/testdata/visibility.proto.yaml index 6a94c5b93..9a09483cf 100644 --- a/experimental/ir/testdata/visibility.proto.yaml +++ b/experimental/ir/testdata/visibility.proto.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - exclude: ["missing `package`", "missing `syntax`"] descriptor: true source_code_info: true diff --git a/experimental/ir/zero_test.go b/experimental/ir/zero_test.go index ec4509be1..bf02e96b0 100644 --- a/experimental/ir/zero_test.go +++ b/experimental/ir/zero_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/diagnostics_internal.go b/experimental/parser/diagnostics_internal.go index 1c46b7203..622008322 100644 --- a/experimental/parser/diagnostics_internal.go +++ b/experimental/parser/diagnostics_internal.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/legalize_decl.go b/experimental/parser/legalize_decl.go index 636304d15..affe11b20 100644 --- a/experimental/parser/legalize_decl.go +++ b/experimental/parser/legalize_decl.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/legalize_def.go b/experimental/parser/legalize_def.go index 0dd752df9..39fb5cdc8 100644 --- a/experimental/parser/legalize_def.go +++ b/experimental/parser/legalize_def.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/legalize_file.go b/experimental/parser/legalize_file.go index ee810157e..9f11c81a9 100644 --- a/experimental/parser/legalize_file.go +++ b/experimental/parser/legalize_file.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/legalize_option.go b/experimental/parser/legalize_option.go index 5f961e57e..970e4f88c 100644 --- a/experimental/parser/legalize_option.go +++ b/experimental/parser/legalize_option.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/legalize_path.go b/experimental/parser/legalize_path.go index 3634d6724..bf761e88e 100644 --- a/experimental/parser/legalize_path.go +++ b/experimental/parser/legalize_path.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/legalize_type.go b/experimental/parser/legalize_type.go index e86daf580..fc9d4d276 100644 --- a/experimental/parser/legalize_type.go +++ b/experimental/parser/legalize_type.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/parse.go b/experimental/parser/parse.go index c965fa39a..012e1ee46 100644 --- a/experimental/parser/parse.go +++ b/experimental/parser/parse.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/parse_decl.go b/experimental/parser/parse_decl.go index 73bffb5b7..27a0780e2 100644 --- a/experimental/parser/parse_decl.go +++ b/experimental/parser/parse_decl.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/parse_def.go b/experimental/parser/parse_def.go index dbd42cf25..3d3da3a6d 100644 --- a/experimental/parser/parse_def.go +++ b/experimental/parser/parse_def.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/parse_delimited.go b/experimental/parser/parse_delimited.go index d80983318..dbf6b20b5 100644 --- a/experimental/parser/parse_delimited.go +++ b/experimental/parser/parse_delimited.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/parse_expr.go b/experimental/parser/parse_expr.go index c1a90e1fd..0da8a33db 100644 --- a/experimental/parser/parse_expr.go +++ b/experimental/parser/parse_expr.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/parse_path.go b/experimental/parser/parse_path.go index b95801e2b..0214c5d32 100644 --- a/experimental/parser/parse_path.go +++ b/experimental/parser/parse_path.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/parse_starts.go b/experimental/parser/parse_starts.go index b3283b13d..8eb11094d 100644 --- a/experimental/parser/parse_starts.go +++ b/experimental/parser/parse_starts.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/parse_state.go b/experimental/parser/parse_state.go index 944501b7c..7f21ed9a9 100644 --- a/experimental/parser/parse_state.go +++ b/experimental/parser/parse_state.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/parse_test.go b/experimental/parser/parse_test.go index 5c2f90f77..8d973df96 100644 --- a/experimental/parser/parse_test.go +++ b/experimental/parser/parse_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/parse_type.go b/experimental/parser/parse_type.go index bf4dd9348..b53d41b65 100644 --- a/experimental/parser/parse_type.go +++ b/experimental/parser/parse_type.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/parser/testdata/parser/def/2024.proto b/experimental/parser/testdata/parser/def/2024.proto index 5e1b962d0..8f70c2705 100644 --- a/experimental/parser/testdata/parser/def/2024.proto +++ b/experimental/parser/testdata/parser/def/2024.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2024"; package test; diff --git a/experimental/parser/testdata/parser/def/2024.proto.stderr.txt b/experimental/parser/testdata/parser/def/2024.proto.stderr.txt index 8b677a6f2..74a9d1e1a 100644 --- a/experimental/parser/testdata/parser/def/2024.proto.stderr.txt +++ b/experimental/parser/testdata/parser/def/2024.proto.stderr.txt @@ -1,48 +1,48 @@ error: unexpected `export` modifier on message field - --> testdata/parser/def/2024.proto:22:5 + --> testdata/parser/def/2024.proto:8:5 | -22 | export int32 x = 1; + 8 | export int32 x = 1; | ^^^^^^ help: delete it | -22 | - export int32 x = 1; -22 | + int32 x = 1; + 8 | - export int32 x = 1; + 8 | + int32 x = 1; | = help: `export` only applies to a type definition error: unexpected `local` modifier on message field - --> testdata/parser/def/2024.proto:23:5 + --> testdata/parser/def/2024.proto:9:5 | -23 | local int32 y = 1; + 9 | local int32 y = 1; | ^^^^^ help: delete it | -23 | - local int32 y = 1; -23 | + int32 y = 1; + 9 | - local int32 y = 1; + 9 | + int32 y = 1; | = help: `local` only applies to a type definition error: unexpected `export` modifier on service definition - --> testdata/parser/def/2024.proto:30:1 + --> testdata/parser/def/2024.proto:16:1 | -30 | export service S1 {} +16 | export service S1 {} | ^^^^^^ help: delete it | -30 | - export service S1 {} -30 | + service S1 {} +16 | - export service S1 {} +16 | + service S1 {} | = help: `export` only applies to a type definition error: unexpected `local` modifier on service definition - --> testdata/parser/def/2024.proto:31:1 + --> testdata/parser/def/2024.proto:17:1 | -31 | local service S2 {} +17 | local service S2 {} | ^^^^^ help: delete it | -31 | - local service S2 {} -31 | + service S2 {} +17 | - local service S2 {} +17 | + service S2 {} | = help: `local` only applies to a type definition diff --git a/experimental/parser/testdata/parser/def/bad_path.proto b/experimental/parser/testdata/parser/def/bad_path.proto index 048acbbba..01e08e2c1 100644 --- a/experimental/parser/testdata/parser/def/bad_path.proto +++ b/experimental/parser/testdata/parser/def/bad_path.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/def/bad_path.proto.stderr.txt b/experimental/parser/testdata/parser/def/bad_path.proto.stderr.txt index b07624659..62be56cf2 100644 --- a/experimental/parser/testdata/parser/def/bad_path.proto.stderr.txt +++ b/experimental/parser/testdata/parser/def/bad_path.proto.stderr.txt @@ -1,69 +1,69 @@ error: unexpected `.` in identifier - --> testdata/parser/def/bad_path.proto:19:12 + --> testdata/parser/def/bad_path.proto:5:12 | -19 | message foo.Bar { + 5 | message foo.Bar { | ^ unexpected `.` in identifier | = note: the name of a message definition must be a single identifier error: unexpected `.` in identifier - --> testdata/parser/def/bad_path.proto:20:14 + --> testdata/parser/def/bad_path.proto:6:14 | -20 | oneof foo.Bar {} + 6 | oneof foo.Bar {} | ^ unexpected `.` in identifier | = note: the name of a oneof definition must be a single identifier error: unexpected `.` in identifier - --> testdata/parser/def/bad_path.proto:21:14 + --> testdata/parser/def/bad_path.proto:7:14 | -21 | oneof foo.(bar.baz).Bar {} + 7 | oneof foo.(bar.baz).Bar {} | ^ unexpected `.` in identifier | = note: the name of a oneof definition must be a single identifier error: unexpected `.` in identifier - --> testdata/parser/def/bad_path.proto:23:12 + --> testdata/parser/def/bad_path.proto:9:12 | -23 | message foo.(bar.baz).Bar {} + 9 | message foo.(bar.baz).Bar {} | ^ unexpected `.` in identifier | = note: the name of a message definition must be a single identifier error: unexpected `.` in identifier - --> testdata/parser/def/bad_path.proto:25:9 + --> testdata/parser/def/bad_path.proto:11:9 | -25 | enum foo.Bar {} +11 | enum foo.Bar {} | ^ unexpected `.` in identifier | = note: the name of a enum definition must be a single identifier error: unexpected `.` in identifier - --> testdata/parser/def/bad_path.proto:26:9 + --> testdata/parser/def/bad_path.proto:12:9 | -26 | enum foo.(bar.baz).Bar {} +12 | enum foo.(bar.baz).Bar {} | ^ unexpected `.` in identifier | = note: the name of a enum definition must be a single identifier error: unexpected nested extension path in message extension block - --> testdata/parser/def/bad_path.proto:29:12 + --> testdata/parser/def/bad_path.proto:15:12 | -29 | extend foo.(bar.baz).Bar {} +15 | extend foo.(bar.baz).Bar {} | ^^^^^^^^^ error: unexpected `.` in identifier - --> testdata/parser/def/bad_path.proto:31:12 + --> testdata/parser/def/bad_path.proto:17:12 | -31 | service foo.Bar {} +17 | service foo.Bar {} | ^ unexpected `.` in identifier | = note: the name of a service definition must be a single identifier error: unexpected `.` in identifier - --> testdata/parser/def/bad_path.proto:32:12 + --> testdata/parser/def/bad_path.proto:18:12 | -32 | service foo.(bar.baz).Bar {} +18 | service foo.(bar.baz).Bar {} | ^ unexpected `.` in identifier | = note: the name of a service definition must be a single identifier diff --git a/experimental/parser/testdata/parser/def/bare_bodies.proto b/experimental/parser/testdata/parser/def/bare_bodies.proto index f9fbbef05..d083d3f86 100644 --- a/experimental/parser/testdata/parser/def/bare_bodies.proto +++ b/experimental/parser/testdata/parser/def/bare_bodies.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/def/bare_bodies.proto.stderr.txt b/experimental/parser/testdata/parser/def/bare_bodies.proto.stderr.txt index a5a0529ba..69ac4e7a2 100644 --- a/experimental/parser/testdata/parser/def/bare_bodies.proto.stderr.txt +++ b/experimental/parser/testdata/parser/def/bare_bodies.proto.stderr.txt @@ -1,31 +1,31 @@ error: unexpected definition body in message definition - --> testdata/parser/def/bare_bodies.proto:21:5 + --> testdata/parser/def/bare_bodies.proto:7:5 | -21 | / { -22 | | int32 y = 2; -23 | | } + 7 | / { + 8 | | int32 y = 2; + 9 | | } | \_____^ help: remove these braces | -21 | - { -22 | int32 y = 2; -23 | - } + 7 | - { + 8 | int32 y = 2; + 9 | - } | error: unexpected definition body in file scope - --> testdata/parser/def/bare_bodies.proto:26:1 + --> testdata/parser/def/bare_bodies.proto:12:1 | -26 | / { +12 | / { ... | -30 | | } +16 | | } | \_^ help: remove these braces | -26 | - { -27 | message N { -28 | int32 y = 2; -29 | } -30 | - } +12 | - { +13 | message N { +14 | int32 y = 2; +15 | } +16 | - } | encountered 2 errors diff --git a/experimental/parser/testdata/parser/def/mixed.proto b/experimental/parser/testdata/parser/def/mixed.proto index 350aab5fa..0e650b209 100644 --- a/experimental/parser/testdata/parser/def/mixed.proto +++ b/experimental/parser/testdata/parser/def/mixed.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/def/mixed.proto.stderr.txt b/experimental/parser/testdata/parser/def/mixed.proto.stderr.txt index e1563c067..57586f3af 100644 --- a/experimental/parser/testdata/parser/def/mixed.proto.stderr.txt +++ b/experimental/parser/testdata/parser/def/mixed.proto.stderr.txt @@ -1,97 +1,97 @@ error: message definition cannot specify compact options - --> testdata/parser/def/mixed.proto:19:13 + --> testdata/parser/def/mixed.proto:5:13 | -19 | message Foo [foo=bar] { + 5 | message Foo [foo=bar] { | ^^^^^^^^^ help: remove this error: enum definition cannot specify compact options - --> testdata/parser/def/mixed.proto:20:14 + --> testdata/parser/def/mixed.proto:6:14 | -20 | enum Foo [foo=bar] {} + 6 | enum Foo [foo=bar] {} | ^^^^^^^^^ help: remove this error: oneof definition cannot specify compact options - --> testdata/parser/def/mixed.proto:21:15 + --> testdata/parser/def/mixed.proto:7:15 | -21 | oneof Foo [foo=bar] {} + 7 | oneof Foo [foo=bar] {} | ^^^^^^^^^ help: remove this error: message extension block cannot specify compact options - --> testdata/parser/def/mixed.proto:23:16 + --> testdata/parser/def/mixed.proto:9:16 | -23 | extend bar.Foo [foo=bar] {} + 9 | extend bar.Foo [foo=bar] {} | ^^^^^^^^^ help: remove this error: service definition cannot specify compact options - --> testdata/parser/def/mixed.proto:25:20 + --> testdata/parser/def/mixed.proto:11:20 | -25 | service FooService [foo=bar] {} +11 | service FooService [foo=bar] {} | ^^^^^^^^^ help: remove this error: unexpected integer literal in message definition - --> testdata/parser/def/mixed.proto:27:13 + --> testdata/parser/def/mixed.proto:13:13 | -27 | message Foo = 1 { +13 | message Foo = 1 { | ^^^ error: unexpected integer literal in enum definition - --> testdata/parser/def/mixed.proto:28:14 + --> testdata/parser/def/mixed.proto:14:14 | -28 | enum Foo = 1 {} +14 | enum Foo = 1 {} | ^^^ error: unexpected integer literal in oneof definition - --> testdata/parser/def/mixed.proto:29:15 + --> testdata/parser/def/mixed.proto:15:15 | -29 | oneof Foo = 1 {} +15 | oneof Foo = 1 {} | ^^^ error: unexpected integer literal in message extension block - --> testdata/parser/def/mixed.proto:31:16 + --> testdata/parser/def/mixed.proto:17:16 | -31 | extend bar.Foo = 1 {} +17 | extend bar.Foo = 1 {} | ^^^ error: unexpected integer literal in service definition - --> testdata/parser/def/mixed.proto:33:20 + --> testdata/parser/def/mixed.proto:19:20 | -33 | service FooService = 1 {} +19 | service FooService = 1 {} | ^^^ error: message definition appears to have method signature - --> testdata/parser/def/mixed.proto:35:12 + --> testdata/parser/def/mixed.proto:21:12 | -35 | message Foo(X) returns (X) { +21 | message Foo(X) returns (X) { | ^^^^^^^^^^^^^^^ help: remove this error: enum definition appears to have method signature - --> testdata/parser/def/mixed.proto:36:13 + --> testdata/parser/def/mixed.proto:22:13 | -36 | enum Foo(X) returns (X) {} +22 | enum Foo(X) returns (X) {} | ^^^^^^^^^^^^^^^ help: remove this error: oneof definition appears to have method signature - --> testdata/parser/def/mixed.proto:37:14 + --> testdata/parser/def/mixed.proto:23:14 | -37 | oneof Foo(X) returns (X) {} +23 | oneof Foo(X) returns (X) {} | ^^^^^^^^^^^^^^^ help: remove this error: message extension block appears to have method signature - --> testdata/parser/def/mixed.proto:39:15 + --> testdata/parser/def/mixed.proto:25:15 | -39 | extend bar.Foo(X) returns (X) {} +25 | extend bar.Foo(X) returns (X) {} | ^^^^^^^^^^^^^^^ help: remove this error: service definition appears to have method signature - --> testdata/parser/def/mixed.proto:41:19 + --> testdata/parser/def/mixed.proto:27:19 | -41 | service FooService(X) returns (X) {} +27 | service FooService(X) returns (X) {} | ^^^^^^^^^^^^^^^ help: remove this error: unexpected string literal in message definition - --> testdata/parser/def/mixed.proto:43:13 + --> testdata/parser/def/mixed.proto:29:13 | -43 | message Foo = "bar" {} +29 | message Foo = "bar" {} | ^^^^^^^ encountered 16 errors diff --git a/experimental/parser/testdata/parser/def/nesting.proto b/experimental/parser/testdata/parser/def/nesting.proto index 30b9e8834..8bc57850b 100644 --- a/experimental/parser/testdata/parser/def/nesting.proto +++ b/experimental/parser/testdata/parser/def/nesting.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/def/nesting.proto.stderr.txt b/experimental/parser/testdata/parser/def/nesting.proto.stderr.txt index 869f1360f..de5232c14 100644 --- a/experimental/parser/testdata/parser/def/nesting.proto.stderr.txt +++ b/experimental/parser/testdata/parser/def/nesting.proto.stderr.txt @@ -1,316 +1,316 @@ error: unexpected service definition within message definition - --> testdata/parser/def/nesting.proto:22:5 + --> testdata/parser/def/nesting.proto:8:5 | -19 | / message M { -20 | | message M {} -21 | | enum E {} -22 | | service S {} + 5 | / message M { + 6 | | message M {} + 7 | | enum E {} + 8 | | service S {} | | ^^^^^^^^^^^^ this service definition... -23 | | extend E {} -24 | | oneof O {} -25 | | } + 9 | | extend E {} +10 | | oneof O {} +11 | | } | \_- ...cannot be declared within this message definition | = help: this service definition can only appear at file scope error: unexpected message definition within enum definition - --> testdata/parser/def/nesting.proto:28:5 + --> testdata/parser/def/nesting.proto:14:5 | -27 | / enum E { -28 | | message M {} +13 | / enum E { +14 | | message M {} | | ^^^^^^^^^^^^ this message definition... -29 | | enum E {} +15 | | enum E {} ... | -33 | | } +19 | | } | \_- ...cannot be declared within this enum definition | = help: this message definition can only appear within one of file scope, message definition, or group definition error: unexpected enum definition within enum definition - --> testdata/parser/def/nesting.proto:29:5 + --> testdata/parser/def/nesting.proto:15:5 | -27 | / enum E { -28 | | message M {} -29 | | enum E {} +13 | / enum E { +14 | | message M {} +15 | | enum E {} | | ^^^^^^^^^ this enum definition... -30 | | service S {} +16 | | service S {} ... | -33 | | } +19 | | } | \_- ...cannot be declared within this enum definition | = help: this enum definition can only appear within one of file scope, message definition, or group definition error: unexpected service definition within enum definition - --> testdata/parser/def/nesting.proto:30:5 + --> testdata/parser/def/nesting.proto:16:5 | -27 | / enum E { -28 | | message M {} -29 | | enum E {} -30 | | service S {} +13 | / enum E { +14 | | message M {} +15 | | enum E {} +16 | | service S {} | | ^^^^^^^^^^^^ this service definition... -31 | | extend E {} -32 | | oneof O {} -33 | | } +17 | | extend E {} +18 | | oneof O {} +19 | | } | \_- ...cannot be declared within this enum definition | = help: this service definition can only appear at file scope error: unexpected message extension block within enum definition - --> testdata/parser/def/nesting.proto:31:5 + --> testdata/parser/def/nesting.proto:17:5 | -27 | / enum E { +13 | / enum E { ... | -30 | | service S {} -31 | | extend E {} +16 | | service S {} +17 | | extend E {} | | ^^^^^^^^^^^ this message extension block... -32 | | oneof O {} -33 | | } +18 | | oneof O {} +19 | | } | \_- ...cannot be declared within this enum definition | = help: this message extension block can only appear within one of file scope, message definition, or group definition error: unexpected oneof definition within enum definition - --> testdata/parser/def/nesting.proto:32:5 + --> testdata/parser/def/nesting.proto:18:5 | -27 | / enum E { +13 | / enum E { ... | -31 | | extend E {} -32 | | oneof O {} +17 | | extend E {} +18 | | oneof O {} | | ^^^^^^^^^^ this oneof definition... -33 | | } +19 | | } | \_- ...cannot be declared within this enum definition | = help: this oneof definition can only appear within one of message definition or group definition error: unexpected message definition within service definition - --> testdata/parser/def/nesting.proto:36:5 + --> testdata/parser/def/nesting.proto:22:5 | -35 | / service S { -36 | | message M {} +21 | / service S { +22 | | message M {} | | ^^^^^^^^^^^^ this message definition... -37 | | enum E {} +23 | | enum E {} ... | -41 | | } +27 | | } | \_- ...cannot be declared within this service definition | = help: this message definition can only appear within one of file scope, message definition, or group definition error: unexpected enum definition within service definition - --> testdata/parser/def/nesting.proto:37:5 + --> testdata/parser/def/nesting.proto:23:5 | -35 | / service S { -36 | | message M {} -37 | | enum E {} +21 | / service S { +22 | | message M {} +23 | | enum E {} | | ^^^^^^^^^ this enum definition... -38 | | service S {} +24 | | service S {} ... | -41 | | } +27 | | } | \_- ...cannot be declared within this service definition | = help: this enum definition can only appear within one of file scope, message definition, or group definition error: unexpected service definition within service definition - --> testdata/parser/def/nesting.proto:38:5 + --> testdata/parser/def/nesting.proto:24:5 | -35 | / service S { -36 | | message M {} -37 | | enum E {} -38 | | service S {} +21 | / service S { +22 | | message M {} +23 | | enum E {} +24 | | service S {} | | ^^^^^^^^^^^^ this service definition... -39 | | extend E {} -40 | | oneof O {} -41 | | } +25 | | extend E {} +26 | | oneof O {} +27 | | } | \_- ...cannot be declared within this service definition | = help: this service definition can only appear at file scope error: unexpected message extension block within service definition - --> testdata/parser/def/nesting.proto:39:5 + --> testdata/parser/def/nesting.proto:25:5 | -35 | / service S { +21 | / service S { ... | -38 | | service S {} -39 | | extend E {} +24 | | service S {} +25 | | extend E {} | | ^^^^^^^^^^^ this message extension block... -40 | | oneof O {} -41 | | } +26 | | oneof O {} +27 | | } | \_- ...cannot be declared within this service definition | = help: this message extension block can only appear within one of file scope, message definition, or group definition error: unexpected oneof definition within service definition - --> testdata/parser/def/nesting.proto:40:5 + --> testdata/parser/def/nesting.proto:26:5 | -35 | / service S { +21 | / service S { ... | -39 | | extend E {} -40 | | oneof O {} +25 | | extend E {} +26 | | oneof O {} | | ^^^^^^^^^^ this oneof definition... -41 | | } +27 | | } | \_- ...cannot be declared within this service definition | = help: this oneof definition can only appear within one of message definition or group definition error: unexpected message definition within message extension block - --> testdata/parser/def/nesting.proto:44:5 + --> testdata/parser/def/nesting.proto:30:5 | -43 | / extend E { -44 | | message M {} +29 | / extend E { +30 | | message M {} | | ^^^^^^^^^^^^ this message definition... -45 | | enum E {} +31 | | enum E {} ... | -49 | | } +35 | | } | \_- ...cannot be declared within this message extension block | = help: this message definition can only appear within one of file scope, message definition, or group definition error: unexpected enum definition within message extension block - --> testdata/parser/def/nesting.proto:45:5 + --> testdata/parser/def/nesting.proto:31:5 | -43 | / extend E { -44 | | message M {} -45 | | enum E {} +29 | / extend E { +30 | | message M {} +31 | | enum E {} | | ^^^^^^^^^ this enum definition... -46 | | service S {} +32 | | service S {} ... | -49 | | } +35 | | } | \_- ...cannot be declared within this message extension block | = help: this enum definition can only appear within one of file scope, message definition, or group definition error: unexpected service definition within message extension block - --> testdata/parser/def/nesting.proto:46:5 + --> testdata/parser/def/nesting.proto:32:5 | -43 | / extend E { -44 | | message M {} -45 | | enum E {} -46 | | service S {} +29 | / extend E { +30 | | message M {} +31 | | enum E {} +32 | | service S {} | | ^^^^^^^^^^^^ this service definition... -47 | | extend E {} -48 | | oneof O {} -49 | | } +33 | | extend E {} +34 | | oneof O {} +35 | | } | \_- ...cannot be declared within this message extension block | = help: this service definition can only appear at file scope error: unexpected message extension block within message extension block - --> testdata/parser/def/nesting.proto:47:5 + --> testdata/parser/def/nesting.proto:33:5 | -43 | / extend E { +29 | / extend E { ... | -46 | | service S {} -47 | | extend E {} +32 | | service S {} +33 | | extend E {} | | ^^^^^^^^^^^ this message extension block... -48 | | oneof O {} -49 | | } +34 | | oneof O {} +35 | | } | \_- ...cannot be declared within this message extension block | = help: this message extension block can only appear within one of file scope, message definition, or group definition error: unexpected oneof definition within message extension block - --> testdata/parser/def/nesting.proto:48:5 + --> testdata/parser/def/nesting.proto:34:5 | -43 | / extend E { +29 | / extend E { ... | -47 | | extend E {} -48 | | oneof O {} +33 | | extend E {} +34 | | oneof O {} | | ^^^^^^^^^^ this oneof definition... -49 | | } +35 | | } | \_- ...cannot be declared within this message extension block | = help: this oneof definition can only appear within one of message definition or group definition error: unexpected oneof definition at file scope - --> testdata/parser/def/nesting.proto:51:1 + --> testdata/parser/def/nesting.proto:37:1 | -51 | / oneof O { +37 | / oneof O { ... | -57 | | } +43 | | } | \_^ this oneof definition cannot be declared here | = help: this oneof definition can only appear within one of message definition or group definition error: unexpected message definition within oneof definition - --> testdata/parser/def/nesting.proto:52:5 + --> testdata/parser/def/nesting.proto:38:5 | -51 | / oneof O { -52 | | message M {} +37 | / oneof O { +38 | | message M {} | | ^^^^^^^^^^^^ this message definition... -53 | | enum E {} +39 | | enum E {} ... | -57 | | } +43 | | } | \_- ...cannot be declared within this oneof definition | = help: this message definition can only appear within one of file scope, message definition, or group definition error: unexpected enum definition within oneof definition - --> testdata/parser/def/nesting.proto:53:5 + --> testdata/parser/def/nesting.proto:39:5 | -51 | / oneof O { -52 | | message M {} -53 | | enum E {} +37 | / oneof O { +38 | | message M {} +39 | | enum E {} | | ^^^^^^^^^ this enum definition... -54 | | service S {} +40 | | service S {} ... | -57 | | } +43 | | } | \_- ...cannot be declared within this oneof definition | = help: this enum definition can only appear within one of file scope, message definition, or group definition error: unexpected service definition within oneof definition - --> testdata/parser/def/nesting.proto:54:5 + --> testdata/parser/def/nesting.proto:40:5 | -51 | / oneof O { -52 | | message M {} -53 | | enum E {} -54 | | service S {} +37 | / oneof O { +38 | | message M {} +39 | | enum E {} +40 | | service S {} | | ^^^^^^^^^^^^ this service definition... -55 | | extend E {} -56 | | oneof O {} -57 | | } +41 | | extend E {} +42 | | oneof O {} +43 | | } | \_- ...cannot be declared within this oneof definition | = help: this service definition can only appear at file scope error: unexpected message extension block within oneof definition - --> testdata/parser/def/nesting.proto:55:5 + --> testdata/parser/def/nesting.proto:41:5 | -51 | / oneof O { +37 | / oneof O { ... | -54 | | service S {} -55 | | extend E {} +40 | | service S {} +41 | | extend E {} | | ^^^^^^^^^^^ this message extension block... -56 | | oneof O {} -57 | | } +42 | | oneof O {} +43 | | } | \_- ...cannot be declared within this oneof definition | = help: this message extension block can only appear within one of file scope, message definition, or group definition error: unexpected oneof definition within oneof definition - --> testdata/parser/def/nesting.proto:56:5 + --> testdata/parser/def/nesting.proto:42:5 | -51 | / oneof O { +37 | / oneof O { ... | -55 | | extend E {} -56 | | oneof O {} +41 | | extend E {} +42 | | oneof O {} | | ^^^^^^^^^^ this oneof definition... -57 | | } +43 | | } | \_- ...cannot be declared within this oneof definition | = help: this oneof definition can only appear within one of message diff --git a/experimental/parser/testdata/parser/def/ordering.proto b/experimental/parser/testdata/parser/def/ordering.proto index 649d8ec1e..7999daaec 100644 --- a/experimental/parser/testdata/parser/def/ordering.proto +++ b/experimental/parser/testdata/parser/def/ordering.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/def/ordering.proto.stderr.txt b/experimental/parser/testdata/parser/def/ordering.proto.stderr.txt index 3ef6a9fb2..337ad5872 100644 --- a/experimental/parser/testdata/parser/def/ordering.proto.stderr.txt +++ b/experimental/parser/testdata/parser/def/ordering.proto.stderr.txt @@ -1,631 +1,631 @@ error: unexpected type name - --> testdata/parser/def/ordering.proto:20:5 + --> testdata/parser/def/ordering.proto:6:5 | -20 | M x (T) (T); + 6 | M x (T) (T); | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -20 | optional M x (T) (T); + 6 | optional M x (T) (T); | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:20:5 + --> testdata/parser/def/ordering.proto:6:5 | -20 | M x (T) (T); + 6 | M x (T) (T); | ^^^^^^^^^^^^ error: message field appears to have method signature - --> testdata/parser/def/ordering.proto:20:9 + --> testdata/parser/def/ordering.proto:6:9 | -20 | M x (T) (T); + 6 | M x (T) (T); | ^^^ help: remove this error: encountered more than one method parameter list - --> testdata/parser/def/ordering.proto:20:13 + --> testdata/parser/def/ordering.proto:6:13 | -20 | M x (T) (T); + 6 | M x (T) (T); | --- ^^^ help: consider removing this | | | first one is here error: unexpected type name - --> testdata/parser/def/ordering.proto:21:5 + --> testdata/parser/def/ordering.proto:7:5 | -21 | M x returns (T) (T); + 7 | M x returns (T) (T); | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -21 | optional M x returns (T) (T); + 7 | optional M x returns (T) (T); | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:21:5 + --> testdata/parser/def/ordering.proto:7:5 | -21 | M x returns (T) (T); + 7 | M x returns (T) (T); | ^^^^^^^^^^^^^^^^^^^^ error: message field appears to have method signature - --> testdata/parser/def/ordering.proto:21:9 + --> testdata/parser/def/ordering.proto:7:9 | -21 | M x returns (T) (T); + 7 | M x returns (T) (T); | ^^^^^^^^^^^^^^^ help: remove this error: unexpected method parameter list after method return type - --> testdata/parser/def/ordering.proto:21:21 + --> testdata/parser/def/ordering.proto:7:21 | -21 | M x returns (T) (T); + 7 | M x returns (T) (T); | ----------- ^^^ | | | previous method return type is here error: unexpected type name - --> testdata/parser/def/ordering.proto:22:5 + --> testdata/parser/def/ordering.proto:8:5 | -22 | M x returns T (T); + 8 | M x returns T (T); | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -22 | optional M x returns T (T); + 8 | optional M x returns T (T); | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:22:5 + --> testdata/parser/def/ordering.proto:8:5 | -22 | M x returns T (T); + 8 | M x returns T (T); | ^^^^^^^^^^^^^^^^^^ error: message field appears to have method signature - --> testdata/parser/def/ordering.proto:22:9 + --> testdata/parser/def/ordering.proto:8:9 | -22 | M x returns T (T); + 8 | M x returns T (T); | ^^^^^^^^^^^^^ help: remove this error: missing `(...)` around method return type - --> testdata/parser/def/ordering.proto:22:17 + --> testdata/parser/def/ordering.proto:8:17 | -22 | M x returns T (T); + 8 | M x returns T (T); | ^ help: insert (...) around the return type | -22 | M x returns (T) (T); + 8 | M x returns (T) (T); | + + error: unexpected method parameter list after method return type - --> testdata/parser/def/ordering.proto:22:19 + --> testdata/parser/def/ordering.proto:8:19 | -22 | M x returns T (T); + 8 | M x returns T (T); | --------- ^^^ | | | previous method return type is here error: unexpected type name - --> testdata/parser/def/ordering.proto:23:5 + --> testdata/parser/def/ordering.proto:9:5 | -23 | M x [foo = bar] (T); + 9 | M x [foo = bar] (T); | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -23 | optional M x [foo = bar] (T); + 9 | optional M x [foo = bar] (T); | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:23:5 + --> testdata/parser/def/ordering.proto:9:5 | -23 | M x [foo = bar] (T); + 9 | M x [foo = bar] (T); | ^^^^^^^^^^^^^^^^^^^^ error: message field appears to have method signature - --> testdata/parser/def/ordering.proto:23:21 + --> testdata/parser/def/ordering.proto:9:21 | -23 | M x [foo = bar] (T); + 9 | M x [foo = bar] (T); | ^^^ help: remove this error: unexpected method parameter list after compact options - --> testdata/parser/def/ordering.proto:23:21 + --> testdata/parser/def/ordering.proto:9:21 | -23 | M x [foo = bar] (T); + 9 | M x [foo = bar] (T); | ----------- ^^^ | | | previous compact options is here error: unexpected type name - --> testdata/parser/def/ordering.proto:24:5 + --> testdata/parser/def/ordering.proto:10:5 | -24 | M x { /* ... */ } (T); +10 | M x { /* ... */ } (T); | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -24 | optional M x { /* ... */ } (T); +10 | optional M x { /* ... */ } (T); | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:24:5 + --> testdata/parser/def/ordering.proto:10:5 | -24 | M x { /* ... */ } (T); +10 | M x { /* ... */ } (T); | ^^^^^^^^^^^^^^^^^ error: unexpected definition body in message field - --> testdata/parser/def/ordering.proto:24:9 + --> testdata/parser/def/ordering.proto:10:9 | -24 | M x { /* ... */ } (T); +10 | M x { /* ... */ } (T); | ^^^^^^^^^^^^^ error: unexpected nested extension path in message field - --> testdata/parser/def/ordering.proto:24:23 + --> testdata/parser/def/ordering.proto:10:23 | -24 | M x { /* ... */ } (T); +10 | M x { /* ... */ } (T); | ^^^ error: unexpected type name - --> testdata/parser/def/ordering.proto:24:23 + --> testdata/parser/def/ordering.proto:10:23 | -24 | M x { /* ... */ } (T); +10 | M x { /* ... */ } (T); | ^^^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -24 | M x { /* ... */ } optional (T); +10 | M x { /* ... */ } optional (T); | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:24:23 + --> testdata/parser/def/ordering.proto:10:23 | -24 | M x { /* ... */ } (T); +10 | M x { /* ... */ } (T); | ^^^^ error: missing name in message field - --> testdata/parser/def/ordering.proto:24:23 + --> testdata/parser/def/ordering.proto:10:23 | -24 | M x { /* ... */ } (T); +10 | M x { /* ... */ } (T); | ^^^^ error: unexpected type name - --> testdata/parser/def/ordering.proto:26:5 + --> testdata/parser/def/ordering.proto:12:5 | -26 | M x returns (T) returns (T); +12 | M x returns (T) returns (T); | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -26 | optional M x returns (T) returns (T); +12 | optional M x returns (T) returns (T); | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:26:5 + --> testdata/parser/def/ordering.proto:12:5 | -26 | M x returns (T) returns (T); +12 | M x returns (T) returns (T); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: message field appears to have method signature - --> testdata/parser/def/ordering.proto:26:9 + --> testdata/parser/def/ordering.proto:12:9 | -26 | M x returns (T) returns (T); +12 | M x returns (T) returns (T); | ^^^^^^^^^^^ help: remove this error: encountered more than one method return type - --> testdata/parser/def/ordering.proto:26:21 + --> testdata/parser/def/ordering.proto:12:21 | -26 | M x returns (T) returns (T); +12 | M x returns (T) returns (T); | ----------- ^^^^^^^^^^^ help: consider removing this | | | first one is here error: unexpected type name - --> testdata/parser/def/ordering.proto:27:5 + --> testdata/parser/def/ordering.proto:13:5 | -27 | M x [foo = bar] returns (T); +13 | M x [foo = bar] returns (T); | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -27 | optional M x [foo = bar] returns (T); +13 | optional M x [foo = bar] returns (T); | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:27:5 + --> testdata/parser/def/ordering.proto:13:5 | -27 | M x [foo = bar] returns (T); +13 | M x [foo = bar] returns (T); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: message field appears to have method signature - --> testdata/parser/def/ordering.proto:27:21 + --> testdata/parser/def/ordering.proto:13:21 | -27 | M x [foo = bar] returns (T); +13 | M x [foo = bar] returns (T); | ^^^^^^^^^^^ help: remove this error: unexpected method return type after compact options - --> testdata/parser/def/ordering.proto:27:21 + --> testdata/parser/def/ordering.proto:13:21 | -27 | M x [foo = bar] returns (T); +13 | M x [foo = bar] returns (T); | ----------- ^^^^^^^^^^^ | | | previous compact options is here error: unexpected type name - --> testdata/parser/def/ordering.proto:28:5 + --> testdata/parser/def/ordering.proto:14:5 | -28 | M x { /* ... */ } returns (T); +14 | M x { /* ... */ } returns (T); | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -28 | optional M x { /* ... */ } returns (T); +14 | optional M x { /* ... */ } returns (T); | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:28:5 + --> testdata/parser/def/ordering.proto:14:5 | -28 | M x { /* ... */ } returns (T); +14 | M x { /* ... */ } returns (T); | ^^^^^^^^^^^^^^^^^ error: unexpected definition body in message field - --> testdata/parser/def/ordering.proto:28:9 + --> testdata/parser/def/ordering.proto:14:9 | -28 | M x { /* ... */ } returns (T); +14 | M x { /* ... */ } returns (T); | ^^^^^^^^^^^^^ error: unexpected type name - --> testdata/parser/def/ordering.proto:28:23 + --> testdata/parser/def/ordering.proto:14:23 | -28 | M x { /* ... */ } returns (T); +14 | M x { /* ... */ } returns (T); | ^^^^^^^ | | | expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -28 | M x { /* ... */ } optional returns (T); +14 | M x { /* ... */ } optional returns (T); | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:28:23 + --> testdata/parser/def/ordering.proto:14:23 | -28 | M x { /* ... */ } returns (T); +14 | M x { /* ... */ } returns (T); | ^^^^^^^^^^^^ error: unexpected extension name in message field - --> testdata/parser/def/ordering.proto:28:31 + --> testdata/parser/def/ordering.proto:14:31 | -28 | M x { /* ... */ } returns (T); +14 | M x { /* ... */ } returns (T); | ^^^ expected identifier error: unexpected type name - --> testdata/parser/def/ordering.proto:30:5 + --> testdata/parser/def/ordering.proto:16:5 | -30 | M x returns T returns T; +16 | M x returns T returns T; | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -30 | optional M x returns T returns T; +16 | optional M x returns T returns T; | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:30:5 + --> testdata/parser/def/ordering.proto:16:5 | -30 | M x returns T returns T; +16 | M x returns T returns T; | ^^^^^^^^^^^^^^^^^^^^^^^^ error: message field appears to have method signature - --> testdata/parser/def/ordering.proto:30:9 + --> testdata/parser/def/ordering.proto:16:9 | -30 | M x returns T returns T; +16 | M x returns T returns T; | ^^^^^^^^^ help: remove this error: missing `(...)` around method return type - --> testdata/parser/def/ordering.proto:30:17 + --> testdata/parser/def/ordering.proto:16:17 | -30 | M x returns T returns T; +16 | M x returns T returns T; | ^ help: insert (...) around the return type | -30 | M x returns (T) returns T; +16 | M x returns (T) returns T; | + + error: encountered more than one method return type - --> testdata/parser/def/ordering.proto:30:19 + --> testdata/parser/def/ordering.proto:16:19 | -30 | M x returns T returns T; +16 | M x returns T returns T; | --------- ^^^^^^^^^ help: consider removing this | | | first one is here error: unexpected type name - --> testdata/parser/def/ordering.proto:31:5 + --> testdata/parser/def/ordering.proto:17:5 | -31 | M x returns T [] returns T; +17 | M x returns T [] returns T; | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -31 | optional M x returns T [] returns T; +17 | optional M x returns T [] returns T; | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:31:5 + --> testdata/parser/def/ordering.proto:17:5 | -31 | M x returns T [] returns T; +17 | M x returns T [] returns T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: message field appears to have method signature - --> testdata/parser/def/ordering.proto:31:9 + --> testdata/parser/def/ordering.proto:17:9 | -31 | M x returns T [] returns T; +17 | M x returns T [] returns T; | ^^^^^^^^^ help: remove this error: missing `(...)` around method return type - --> testdata/parser/def/ordering.proto:31:17 + --> testdata/parser/def/ordering.proto:17:17 | -31 | M x returns T [] returns T; +17 | M x returns T [] returns T; | ^ help: insert (...) around the return type | -31 | M x returns (T) [] returns T; +17 | M x returns (T) [] returns T; | + + error: compact options cannot be empty - --> testdata/parser/def/ordering.proto:31:19 + --> testdata/parser/def/ordering.proto:17:19 | -31 | M x returns T [] returns T; +17 | M x returns T [] returns T; | ^^ help: remove this error: unexpected method return type after compact options - --> testdata/parser/def/ordering.proto:31:22 + --> testdata/parser/def/ordering.proto:17:22 | -31 | M x returns T [] returns T; +17 | M x returns T [] returns T; | -- ^^^^^^^^^ | | | previous compact options is here error: unexpected type name - --> testdata/parser/def/ordering.proto:32:5 + --> testdata/parser/def/ordering.proto:18:5 | -32 | M x [foo = bar] returns T; +18 | M x [foo = bar] returns T; | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -32 | optional M x [foo = bar] returns T; +18 | optional M x [foo = bar] returns T; | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:32:5 + --> testdata/parser/def/ordering.proto:18:5 | -32 | M x [foo = bar] returns T; +18 | M x [foo = bar] returns T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: message field appears to have method signature - --> testdata/parser/def/ordering.proto:32:21 + --> testdata/parser/def/ordering.proto:18:21 | -32 | M x [foo = bar] returns T; +18 | M x [foo = bar] returns T; | ^^^^^^^^^ help: remove this error: unexpected method return type after compact options - --> testdata/parser/def/ordering.proto:32:21 + --> testdata/parser/def/ordering.proto:18:21 | -32 | M x [foo = bar] returns T; +18 | M x [foo = bar] returns T; | ----------- ^^^^^^^^^ | | | previous compact options is here error: missing `(...)` around method return type - --> testdata/parser/def/ordering.proto:32:29 + --> testdata/parser/def/ordering.proto:18:29 | -32 | M x [foo = bar] returns T; +18 | M x [foo = bar] returns T; | ^ help: insert (...) around the return type | -32 | M x [foo = bar] returns (T); +18 | M x [foo = bar] returns (T); | + + error: unexpected type name - --> testdata/parser/def/ordering.proto:33:5 + --> testdata/parser/def/ordering.proto:19:5 | -33 | M x { /* ... */ } returns T; +19 | M x { /* ... */ } returns T; | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -33 | optional M x { /* ... */ } returns T; +19 | optional M x { /* ... */ } returns T; | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:33:5 + --> testdata/parser/def/ordering.proto:19:5 | -33 | M x { /* ... */ } returns T; +19 | M x { /* ... */ } returns T; | ^^^^^^^^^^^^^^^^^ error: unexpected definition body in message field - --> testdata/parser/def/ordering.proto:33:9 + --> testdata/parser/def/ordering.proto:19:9 | -33 | M x { /* ... */ } returns T; +19 | M x { /* ... */ } returns T; | ^^^^^^^^^^^^^ error: unexpected type name - --> testdata/parser/def/ordering.proto:33:23 + --> testdata/parser/def/ordering.proto:19:23 | -33 | M x { /* ... */ } returns T; +19 | M x { /* ... */ } returns T; | ^^^^^^^ | | | expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -33 | M x { /* ... */ } optional returns T; +19 | M x { /* ... */ } optional returns T; | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:33:23 + --> testdata/parser/def/ordering.proto:19:23 | -33 | M x { /* ... */ } returns T; +19 | M x { /* ... */ } returns T; | ^^^^^^^^^^ error: unexpected type name - --> testdata/parser/def/ordering.proto:35:5 + --> testdata/parser/def/ordering.proto:21:5 | -35 | M x = 1 = 1; +21 | M x = 1 = 1; | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -35 | optional M x = 1 = 1; +21 | optional M x = 1 = 1; | +++++++++ | = note: modifiers are required in proto2 error: encountered more than one message field tag - --> testdata/parser/def/ordering.proto:35:13 + --> testdata/parser/def/ordering.proto:21:13 | -35 | M x = 1 = 1; +21 | M x = 1 = 1; | --- ^^^ help: consider removing this | | | first one is here error: unexpected type name - --> testdata/parser/def/ordering.proto:36:5 + --> testdata/parser/def/ordering.proto:22:5 | -36 | M x [foo = bar] = 1; +22 | M x [foo = bar] = 1; | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -36 | optional M x [foo = bar] = 1; +22 | optional M x [foo = bar] = 1; | +++++++++ | = note: modifiers are required in proto2 error: unexpected message field tag after compact options - --> testdata/parser/def/ordering.proto:36:21 + --> testdata/parser/def/ordering.proto:22:21 | -36 | M x [foo = bar] = 1; +22 | M x [foo = bar] = 1; | ----------- ^^^ | | | previous compact options is here error: unexpected type name - --> testdata/parser/def/ordering.proto:37:5 + --> testdata/parser/def/ordering.proto:23:5 | -37 | M x { /* ... */ } = 1; +23 | M x { /* ... */ } = 1; | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -37 | optional M x { /* ... */ } = 1; +23 | optional M x { /* ... */ } = 1; | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:37:5 + --> testdata/parser/def/ordering.proto:23:5 | -37 | M x { /* ... */ } = 1; +23 | M x { /* ... */ } = 1; | ^^^^^^^^^^^^^^^^^ error: unexpected definition body in message field - --> testdata/parser/def/ordering.proto:37:9 + --> testdata/parser/def/ordering.proto:23:9 | -37 | M x { /* ... */ } = 1; +23 | M x { /* ... */ } = 1; | ^^^^^^^^^^^^^ error: unexpected tokens in message definition - --> testdata/parser/def/ordering.proto:37:23 + --> testdata/parser/def/ordering.proto:23:23 | -37 | M x { /* ... */ } = 1; +23 | M x { /* ... */ } = 1; | ^^^ | | | expected identifier, `;`, `.`, `(...)`, or `{...}` error: unexpected type name - --> testdata/parser/def/ordering.proto:39:5 + --> testdata/parser/def/ordering.proto:25:5 | -39 | M x [foo = bar] [foo = bar]; +25 | M x [foo = bar] [foo = bar]; | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -39 | optional M x [foo = bar] [foo = bar]; +25 | optional M x [foo = bar] [foo = bar]; | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:39:5 + --> testdata/parser/def/ordering.proto:25:5 | -39 | M x [foo = bar] [foo = bar]; +25 | M x [foo = bar] [foo = bar]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: encountered more than one compact options - --> testdata/parser/def/ordering.proto:39:21 + --> testdata/parser/def/ordering.proto:25:21 | -39 | M x [foo = bar] [foo = bar]; +25 | M x [foo = bar] [foo = bar]; | ----------- ^^^^^^^^^^^ help: consider removing this | | | first one is here error: unexpected type name - --> testdata/parser/def/ordering.proto:40:5 + --> testdata/parser/def/ordering.proto:26:5 | -40 | M x { /* ... */ } [foo = bar]; +26 | M x { /* ... */ } [foo = bar]; | ^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -40 | optional M x { /* ... */ } [foo = bar]; +26 | optional M x { /* ... */ } [foo = bar]; | +++++++++ | = note: modifiers are required in proto2 error: missing message field tag in declaration - --> testdata/parser/def/ordering.proto:40:5 + --> testdata/parser/def/ordering.proto:26:5 | -40 | M x { /* ... */ } [foo = bar]; +26 | M x { /* ... */ } [foo = bar]; | ^^^^^^^^^^^^^^^^^ error: unexpected definition body in message field - --> testdata/parser/def/ordering.proto:40:9 + --> testdata/parser/def/ordering.proto:26:9 | -40 | M x { /* ... */ } [foo = bar]; +26 | M x { /* ... */ } [foo = bar]; | ^^^^^^^^^^^^^ error: unexpected `[...]` in message definition - --> testdata/parser/def/ordering.proto:40:23 + --> testdata/parser/def/ordering.proto:26:23 | -40 | M x { /* ... */ } [foo = bar]; +26 | M x { /* ... */ } [foo = bar]; | ^^^^^^^^^^^ | | | expected identifier, `;`, `.`, `(...)`, or `{...}` diff --git a/experimental/parser/testdata/parser/def/prefixes.proto b/experimental/parser/testdata/parser/def/prefixes.proto index fd25baab3..68c9fe953 100644 --- a/experimental/parser/testdata/parser/def/prefixes.proto +++ b/experimental/parser/testdata/parser/def/prefixes.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/def/prefixes.proto.stderr.txt b/experimental/parser/testdata/parser/def/prefixes.proto.stderr.txt index 1424b4139..e4c9be568 100644 --- a/experimental/parser/testdata/parser/def/prefixes.proto.stderr.txt +++ b/experimental/parser/testdata/parser/def/prefixes.proto.stderr.txt @@ -1,172 +1,172 @@ error: unexpected `optional` modifier on message definition - --> testdata/parser/def/prefixes.proto:19:1 + --> testdata/parser/def/prefixes.proto:5:1 | -19 | optional message Foo { + 5 | optional message Foo { | ^^^^^^^^ help: delete it | -19 | - optional message Foo { -19 | + message Foo { + 5 | - optional message Foo { + 5 | + message Foo { | = help: `optional` only applies to a message field error: unexpected `option` modifier on message field - --> testdata/parser/def/prefixes.proto:21:5 + --> testdata/parser/def/prefixes.proto:7:5 | -21 | option option y = 2; + 7 | option option y = 2; | ^^^^^^ help: replace with `optional` | -21 | - option option y = 2; -21 | + optional option y = 2; + 7 | - option option y = 2; + 7 | + optional option y = 2; | = help: `option` only applies to an import warning: group syntax is deprecated - --> testdata/parser/def/prefixes.proto:22:14 + --> testdata/parser/def/prefixes.proto:8:14 | -22 | optional group foo = 10 {} + 8 | optional group foo = 10 {} | ^^^^^ = note: group syntax is not available in proto3 or editions error: group names must start with an uppercase letter - --> testdata/parser/def/prefixes.proto:22:20 + --> testdata/parser/def/prefixes.proto:8:20 | -22 | optional group foo = 10 {} + 8 | optional group foo = 10 {} | ^^^ error: unexpected `stream` modifier on group definition - --> testdata/parser/def/prefixes.proto:23:5 + --> testdata/parser/def/prefixes.proto:9:5 | -23 | stream group foo = 10 {} + 9 | stream group foo = 10 {} | ^^^^^^ help: delete it | -23 | - stream group foo = 10 {} -23 | + group foo = 10 {} + 9 | - stream group foo = 10 {} + 9 | + group foo = 10 {} | = help: `stream` only applies to an input or output of a service method warning: group syntax is deprecated - --> testdata/parser/def/prefixes.proto:23:12 + --> testdata/parser/def/prefixes.proto:9:12 | -23 | stream group foo = 10 {} + 9 | stream group foo = 10 {} | ^^^^^ = note: group syntax is not available in proto3 or editions error: group names must start with an uppercase letter - --> testdata/parser/def/prefixes.proto:23:18 + --> testdata/parser/def/prefixes.proto:9:18 | -23 | stream group foo = 10 {} + 9 | stream group foo = 10 {} | ^^^ error: unexpected `export` modifier on message field - --> testdata/parser/def/prefixes.proto:25:5 + --> testdata/parser/def/prefixes.proto:11:5 | -25 | export repeated int32 x = 1; +11 | export repeated int32 x = 1; | ^^^^^^ help: delete it | -25 | - export repeated int32 x = 1; -25 | + repeated int32 x = 1; +11 | - export repeated int32 x = 1; +11 | + repeated int32 x = 1; | = help: `export` only applies to a type definition error: multiple modifiers on message field type - --> testdata/parser/def/prefixes.proto:25:12 + --> testdata/parser/def/prefixes.proto:11:12 | -25 | export repeated int32 x = 1; +11 | export repeated int32 x = 1; | ------ ^^^^^^^^ | | | previous one is here | help: delete it | -25 | - export repeated int32 x = 1; -25 | + export int32 x = 1; +11 | - export repeated int32 x = 1; +11 | + export int32 x = 1; | error: unexpected `repeated` modifier on oneof definition - --> testdata/parser/def/prefixes.proto:27:5 + --> testdata/parser/def/prefixes.proto:13:5 | -27 | repeated oneof y { +13 | repeated oneof y { | ^^^^^^^^ help: delete it | -27 | - repeated oneof y { -27 | + oneof y { +13 | - repeated oneof y { +13 | + oneof y { | = help: `repeated` only applies to a message field error: unexpected `public` modifier on enum definition - --> testdata/parser/def/prefixes.proto:31:1 + --> testdata/parser/def/prefixes.proto:17:1 | -31 | public enum Bar {} +17 | public enum Bar {} | ^^^^^^ help: replace with `export` | -31 | - public enum Bar {} -31 | + export Bar {} +17 | - public enum Bar {} +17 | + export Bar {} | = help: `public` only applies to an import error: unexpected `stream` modifier on message extension block - --> testdata/parser/def/prefixes.proto:33:1 + --> testdata/parser/def/prefixes.proto:19:1 | -33 | stream extend Foo { +19 | stream extend Foo { | ^^^^^^ help: delete it | -33 | - stream extend Foo { -33 | + extend Foo { +19 | - stream extend Foo { +19 | + extend Foo { | = help: `stream` only applies to an input or output of a service method error: unexpected `weak` modifier on message field - --> testdata/parser/def/prefixes.proto:34:5 + --> testdata/parser/def/prefixes.proto:20:5 | -34 | weak int32 z = 5; +20 | weak int32 z = 5; | ^^^^ help: delete it | -34 | - weak int32 z = 5; -34 | + int32 z = 5; +20 | - weak int32 z = 5; +20 | + int32 z = 5; | = help: `weak` only applies to an import error: unexpected `required` modifier on service definition - --> testdata/parser/def/prefixes.proto:37:1 + --> testdata/parser/def/prefixes.proto:23:1 | -37 | required weak service Baz { +23 | required weak service Baz { | ^^^^^^^^ help: delete it | -37 | - required weak service Baz { -37 | + weak service Baz { +23 | - required weak service Baz { +23 | + weak service Baz { | = help: `required` only applies to a message field error: unexpected `weak` modifier on service definition - --> testdata/parser/def/prefixes.proto:37:10 + --> testdata/parser/def/prefixes.proto:23:10 | -37 | required weak service Baz { +23 | required weak service Baz { | ^^^^ help: delete it | -37 | - required weak service Baz { -37 | + required service Baz { +23 | - required weak service Baz { +23 | + required service Baz { | = help: `weak` only applies to an import error: unexpected `stream` modifier on service method - --> testdata/parser/def/prefixes.proto:38:5 + --> testdata/parser/def/prefixes.proto:24:5 | -38 | stream rpc X(Foo) returns (stream Bar); +24 | stream rpc X(Foo) returns (stream Bar); | ^^^^^^ help: delete it | -38 | - stream rpc X(Foo) returns (stream Bar); -38 | + rpc X(Foo) returns (stream Bar); +24 | - stream rpc X(Foo) returns (stream Bar); +24 | + rpc X(Foo) returns (stream Bar); | = help: `stream` only applies to an input or output of a service method diff --git a/experimental/parser/testdata/parser/def/types.proto b/experimental/parser/testdata/parser/def/types.proto index d0ee1d4bd..07ab89a4f 100644 --- a/experimental/parser/testdata/parser/def/types.proto +++ b/experimental/parser/testdata/parser/def/types.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/enum/bad-path.proto b/experimental/parser/testdata/parser/enum/bad-path.proto index bd6804dce..12366dbbc 100644 --- a/experimental/parser/testdata/parser/enum/bad-path.proto +++ b/experimental/parser/testdata/parser/enum/bad-path.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/enum/bad-path.proto.stderr.txt b/experimental/parser/testdata/parser/enum/bad-path.proto.stderr.txt index 8ceda0bd7..f9668116f 100644 --- a/experimental/parser/testdata/parser/enum/bad-path.proto.stderr.txt +++ b/experimental/parser/testdata/parser/enum/bad-path.proto.stderr.txt @@ -1,19 +1,19 @@ error: unexpected qualified name in enum value - --> testdata/parser/enum/bad-path.proto:20:5 + --> testdata/parser/enum/bad-path.proto:6:5 | -20 | foo.bar = 1; + 6 | foo.bar = 1; | ^^^^^^^ expected identifier error: unexpected extension name in enum value - --> testdata/parser/enum/bad-path.proto:21:5 + --> testdata/parser/enum/bad-path.proto:7:5 | -21 | (foo) = 2; + 7 | (foo) = 2; | ^^^^^ expected identifier error: unexpected qualified name in enum value - --> testdata/parser/enum/bad-path.proto:22:5 + --> testdata/parser/enum/bad-path.proto:8:5 | -22 | foo/bar = 3; + 8 | foo/bar = 3; | ^^^^^^^ expected identifier encountered 3 errors diff --git a/experimental/parser/testdata/parser/enum/incomplete.proto b/experimental/parser/testdata/parser/enum/incomplete.proto index 1e7ac4823..6f4ce7865 100644 --- a/experimental/parser/testdata/parser/enum/incomplete.proto +++ b/experimental/parser/testdata/parser/enum/incomplete.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/enum/incomplete.proto.stderr.txt b/experimental/parser/testdata/parser/enum/incomplete.proto.stderr.txt index c34468bb5..c699538a4 100644 --- a/experimental/parser/testdata/parser/enum/incomplete.proto.stderr.txt +++ b/experimental/parser/testdata/parser/enum/incomplete.proto.stderr.txt @@ -1,24 +1,24 @@ error: missing enum value in declaration - --> testdata/parser/enum/incomplete.proto:20:5 + --> testdata/parser/enum/incomplete.proto:6:5 | -20 | NO_TAG; + 6 | NO_TAG; | ^^^^^^^ error: missing enum value in declaration - --> testdata/parser/enum/incomplete.proto:21:5 + --> testdata/parser/enum/incomplete.proto:7:5 | -21 | NO_TAG2 + 7 | NO_TAG2 | ^^^^^^^ error: unexpected `}` after definition - --> testdata/parser/enum/incomplete.proto:22:1 + --> testdata/parser/enum/incomplete.proto:8:1 | -22 | } + 8 | } | ^ expected `;` | help: consider inserting a `;` | -21 | NO_TAG2; + 7 | NO_TAG2; | + encountered 3 errors diff --git a/experimental/parser/testdata/parser/enum/keywords.proto b/experimental/parser/testdata/parser/enum/keywords.proto index 402cf6988..4ddc9175b 100644 --- a/experimental/parser/testdata/parser/enum/keywords.proto +++ b/experimental/parser/testdata/parser/enum/keywords.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/expr.proto b/experimental/parser/testdata/parser/expr.proto index eb4739043..1bb3c66dd 100644 --- a/experimental/parser/testdata/parser/expr.proto +++ b/experimental/parser/testdata/parser/expr.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/expr.proto.stderr.txt b/experimental/parser/testdata/parser/expr.proto.stderr.txt index d4f280d1e..64c49ddad 100644 --- a/experimental/parser/testdata/parser/expr.proto.stderr.txt +++ b/experimental/parser/testdata/parser/expr.proto.stderr.txt @@ -1,57 +1,57 @@ error: unexpected range expression in option setting value - --> testdata/parser/expr.proto:21:21 + --> testdata/parser/expr.proto:7:21 | -21 | option (test.any) = 1 to 100; + 7 | option (test.any) = 1 to 100; | ^^^^^^^^ error: unexpected array expression in option setting value - --> testdata/parser/expr.proto:22:21 + --> testdata/parser/expr.proto:8:21 | -22 | option (test.any) = [1, 2, 3]; + 8 | option (test.any) = [1, 2, 3]; | ^^^^^^^^^ = note: array expressions can only appear inside of message expressions error: unexpected array expression in option setting value - --> testdata/parser/expr.proto:44:21 + --> testdata/parser/expr.proto:30:21 | -44 | option (test.bad) = [1: 2]; +30 | option (test.bad) = [1: 2]; | ^^^^^^ = note: array expressions can only appear inside of message expressions error: unexpected integer literal in message expression - --> testdata/parser/expr.proto:45:22 + --> testdata/parser/expr.proto:31:22 | -45 | option (test.bad) = {1, 2, 3}; +31 | option (test.bad) = {1, 2, 3}; | ^ expected message field value error: unexpected integer literal in message expression - --> testdata/parser/expr.proto:45:25 + --> testdata/parser/expr.proto:31:25 | -45 | option (test.bad) = {1, 2, 3}; +31 | option (test.bad) = {1, 2, 3}; | ^ expected message field value error: unexpected integer literal in message expression - --> testdata/parser/expr.proto:45:28 + --> testdata/parser/expr.proto:31:28 | -45 | option (test.bad) = {1, 2, 3}; +31 | option (test.bad) = {1, 2, 3}; | ^ expected message field value error: unexpected `;` after `-` - --> testdata/parser/expr.proto:46:22 + --> testdata/parser/expr.proto:32:22 | -46 | option (test.bad) = -; +32 | option (test.bad) = -; | ^ expected expression error: unexpected range expression in option setting value - --> testdata/parser/expr.proto:47:21 + --> testdata/parser/expr.proto:33:21 | -47 | option (test.bad) = 1 to; +33 | option (test.bad) = 1 to; | ^^^^ error: unexpected `;` after `to` - --> testdata/parser/expr.proto:47:25 + --> testdata/parser/expr.proto:33:25 | -47 | option (test.bad) = 1 to; +33 | option (test.bad) = 1 to; | ^ expected expression encountered 9 errors diff --git a/experimental/parser/testdata/parser/field/any-tag.proto b/experimental/parser/testdata/parser/field/any-tag.proto index 88b5180d9..5847a0e6b 100644 --- a/experimental/parser/testdata/parser/field/any-tag.proto +++ b/experimental/parser/testdata/parser/field/any-tag.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/field/any-tag.proto.stderr.txt b/experimental/parser/testdata/parser/field/any-tag.proto.stderr.txt index 2dc772d72..3de1174c2 100644 --- a/experimental/parser/testdata/parser/field/any-tag.proto.stderr.txt +++ b/experimental/parser/testdata/parser/field/any-tag.proto.stderr.txt @@ -1,7 +1,7 @@ error: unexpected range expression in message field tag - --> testdata/parser/field/any-tag.proto:24:15 + --> testdata/parser/field/any-tag.proto:10:15 | -24 | int32 x = 10 to max; +10 | int32 x = 10 to max; | ^^^^^^^^^ encountered 1 error diff --git a/experimental/parser/testdata/parser/field/bad-path.proto b/experimental/parser/testdata/parser/field/bad-path.proto index d1c65324c..47dd1c64f 100644 --- a/experimental/parser/testdata/parser/field/bad-path.proto +++ b/experimental/parser/testdata/parser/field/bad-path.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/field/bad-path.proto.stderr.txt b/experimental/parser/testdata/parser/field/bad-path.proto.stderr.txt index ea3fb0e22..41a2c2d15 100644 --- a/experimental/parser/testdata/parser/field/bad-path.proto.stderr.txt +++ b/experimental/parser/testdata/parser/field/bad-path.proto.stderr.txt @@ -1,262 +1,262 @@ error: unexpected qualified name in message field - --> testdata/parser/field/bad-path.proto:20:19 + --> testdata/parser/field/bad-path.proto:6:19 | -20 | optional Type path.name = 1; + 6 | optional Type path.name = 1; | ^^^^^^^^^ expected identifier error: unexpected qualified name in message field - --> testdata/parser/field/bad-path.proto:21:19 + --> testdata/parser/field/bad-path.proto:7:19 | -21 | repeated Type path.name = 1; + 7 | repeated Type path.name = 1; | ^^^^^^^^^ expected identifier warning: required fields are deprecated - --> testdata/parser/field/bad-path.proto:22:5 + --> testdata/parser/field/bad-path.proto:8:5 | -22 | required Type path.name = 1; + 8 | required Type path.name = 1; | ^^^^^^^^ = help: do not attempt to change this to `optional` if the field is already in-use; doing so is a wire protocol break error: unexpected qualified name in message field - --> testdata/parser/field/bad-path.proto:22:19 + --> testdata/parser/field/bad-path.proto:8:19 | -22 | required Type path.name = 1; + 8 | required Type path.name = 1; | ^^^^^^^^^ expected identifier error: unexpected type name - --> testdata/parser/field/bad-path.proto:23:5 + --> testdata/parser/field/bad-path.proto:9:5 | -23 | Type path.name = 1; + 9 | Type path.name = 1; | ^^^^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -23 | optional Type path.name = 1; + 9 | optional Type path.name = 1; | +++++++++ | = note: modifiers are required in proto2 error: unexpected qualified name in message field - --> testdata/parser/field/bad-path.proto:23:10 + --> testdata/parser/field/bad-path.proto:9:10 | -23 | Type path.name = 1; + 9 | Type path.name = 1; | ^^^^^^^^^ expected identifier error: unexpected type name - --> testdata/parser/field/bad-path.proto:24:5 + --> testdata/parser/field/bad-path.proto:10:5 | -24 | Type path/name = 1; +10 | Type path/name = 1; | ^^^^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -24 | optional Type path/name = 1; +10 | optional Type path/name = 1; | +++++++++ | = note: modifiers are required in proto2 error: unexpected qualified name in message field - --> testdata/parser/field/bad-path.proto:24:10 + --> testdata/parser/field/bad-path.proto:10:10 | -24 | Type path/name = 1; +10 | Type path/name = 1; | ^^^^^^^^^ expected identifier error: unexpected qualified name in message field - --> testdata/parser/field/bad-path.proto:26:27 + --> testdata/parser/field/bad-path.proto:12:27 | -26 | optional package.Type path.name = 1; +12 | optional package.Type path.name = 1; | ^^^^^^^^^ expected identifier error: unexpected qualified name in message field - --> testdata/parser/field/bad-path.proto:27:27 + --> testdata/parser/field/bad-path.proto:13:27 | -27 | repeated package.Type path.name = 1; +13 | repeated package.Type path.name = 1; | ^^^^^^^^^ expected identifier warning: required fields are deprecated - --> testdata/parser/field/bad-path.proto:28:5 + --> testdata/parser/field/bad-path.proto:14:5 | -28 | required package.Type path.name = 1; +14 | required package.Type path.name = 1; | ^^^^^^^^ = help: do not attempt to change this to `optional` if the field is already in-use; doing so is a wire protocol break error: unexpected qualified name in message field - --> testdata/parser/field/bad-path.proto:28:27 + --> testdata/parser/field/bad-path.proto:14:27 | -28 | required package.Type path.name = 1; +14 | required package.Type path.name = 1; | ^^^^^^^^^ expected identifier error: unexpected type name - --> testdata/parser/field/bad-path.proto:29:5 + --> testdata/parser/field/bad-path.proto:15:5 | -29 | package.Type name = 1; +15 | package.Type name = 1; | ^^^^^^^^^^^^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -29 | optional package.Type name = 1; +15 | optional package.Type name = 1; | +++++++++ | = note: modifiers are required in proto2 error: unexpected type name - --> testdata/parser/field/bad-path.proto:30:5 + --> testdata/parser/field/bad-path.proto:16:5 | -30 | package/Type name = 1; +16 | package/Type name = 1; | ^^^^^^^^^^^^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -30 | optional package/Type name = 1; +16 | optional package/Type name = 1; | +++++++++ | = note: modifiers are required in proto2 error: unexpected `/` in path in message field - --> testdata/parser/field/bad-path.proto:30:12 + --> testdata/parser/field/bad-path.proto:16:12 | -30 | package/Type name = 1; +16 | package/Type name = 1; | ^ help: replace this with a `.` error: unexpected `/` in path in message field - --> testdata/parser/field/bad-path.proto:31:21 + --> testdata/parser/field/bad-path.proto:17:21 | -31 | optional package/Type path.name = 1; +17 | optional package/Type path.name = 1; | ^ help: replace this with a `.` error: unexpected qualified name in message field - --> testdata/parser/field/bad-path.proto:31:27 + --> testdata/parser/field/bad-path.proto:17:27 | -31 | optional package/Type path.name = 1; +17 | optional package/Type path.name = 1; | ^^^^^^^^^ expected identifier error: unexpected nested extension path in message field - --> testdata/parser/field/bad-path.proto:33:14 + --> testdata/parser/field/bad-path.proto:19:14 | -33 | optional (foo.bar).Type name = 1; +19 | optional (foo.bar).Type name = 1; | ^^^^^^^^^ error: unexpected nested extension path in message field - --> testdata/parser/field/bad-path.proto:34:14 + --> testdata/parser/field/bad-path.proto:20:14 | -34 | repeated (foo.bar).Type name = 1; +20 | repeated (foo.bar).Type name = 1; | ^^^^^^^^^ warning: required fields are deprecated - --> testdata/parser/field/bad-path.proto:35:5 + --> testdata/parser/field/bad-path.proto:21:5 | -35 | required (foo.bar).Type name = 1; +21 | required (foo.bar).Type name = 1; | ^^^^^^^^ = help: do not attempt to change this to `optional` if the field is already in-use; doing so is a wire protocol break error: unexpected nested extension path in message field - --> testdata/parser/field/bad-path.proto:35:14 + --> testdata/parser/field/bad-path.proto:21:14 | -35 | required (foo.bar).Type name = 1; +21 | required (foo.bar).Type name = 1; | ^^^^^^^^^ error: unexpected nested extension path in message field - --> testdata/parser/field/bad-path.proto:36:5 + --> testdata/parser/field/bad-path.proto:22:5 | -36 | (foo.bar).Type name = 1; +22 | (foo.bar).Type name = 1; | ^^^^^^^^^ error: unexpected type name - --> testdata/parser/field/bad-path.proto:36:5 + --> testdata/parser/field/bad-path.proto:22:5 | -36 | (foo.bar).Type name = 1; +22 | (foo.bar).Type name = 1; | ^^^^^^^^^^^^^^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -36 | optional (foo.bar).Type name = 1; +22 | optional (foo.bar).Type name = 1; | +++++++++ | = note: modifiers are required in proto2 error: unexpected qualified name in message field - --> testdata/parser/field/bad-path.proto:38:27 + --> testdata/parser/field/bad-path.proto:24:27 | -38 | optional package.Type (foo.bar).name = 1; +24 | optional package.Type (foo.bar).name = 1; | ^^^^^^^^^^^^^^ expected identifier error: unexpected qualified name in message field - --> testdata/parser/field/bad-path.proto:39:27 + --> testdata/parser/field/bad-path.proto:25:27 | -39 | repeated package.Type (foo.bar).name = 1; +25 | repeated package.Type (foo.bar).name = 1; | ^^^^^^^^^^^^^^ expected identifier warning: required fields are deprecated - --> testdata/parser/field/bad-path.proto:40:5 + --> testdata/parser/field/bad-path.proto:26:5 | -40 | required package.Type (foo.bar).name = 1; +26 | required package.Type (foo.bar).name = 1; | ^^^^^^^^ = help: do not attempt to change this to `optional` if the field is already in-use; doing so is a wire protocol break error: unexpected qualified name in message field - --> testdata/parser/field/bad-path.proto:40:27 + --> testdata/parser/field/bad-path.proto:26:27 | -40 | required package.Type (foo.bar).name = 1; +26 | required package.Type (foo.bar).name = 1; | ^^^^^^^^^^^^^^ expected identifier error: unexpected type name - --> testdata/parser/field/bad-path.proto:41:5 + --> testdata/parser/field/bad-path.proto:27:5 | -41 | package.Type (foo.bar).name = 1; +27 | package.Type (foo.bar).name = 1; | ^^^^^^^^^^^^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -41 | optional package.Type (foo.bar).name = 1; +27 | optional package.Type (foo.bar).name = 1; | +++++++++ | = note: modifiers are required in proto2 error: unexpected qualified name in message field - --> testdata/parser/field/bad-path.proto:41:18 + --> testdata/parser/field/bad-path.proto:27:18 | -41 | package.Type (foo.bar).name = 1; +27 | package.Type (foo.bar).name = 1; | ^^^^^^^^^^^^^^ expected identifier error: unexpected nested extension path in message field - --> testdata/parser/field/bad-path.proto:43:5 + --> testdata/parser/field/bad-path.proto:29:5 | -43 | (foo) (bar) = 1; +29 | (foo) (bar) = 1; | ^^^^^ error: unexpected type name - --> testdata/parser/field/bad-path.proto:43:5 + --> testdata/parser/field/bad-path.proto:29:5 | -43 | (foo) (bar) = 1; +29 | (foo) (bar) = 1; | ^^^^^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -43 | optional (foo) (bar) = 1; +29 | optional (foo) (bar) = 1; | +++++++++ | = note: modifiers are required in proto2 error: unexpected extension name in message field - --> testdata/parser/field/bad-path.proto:43:11 + --> testdata/parser/field/bad-path.proto:29:11 | -43 | (foo) (bar) = 1; +29 | (foo) (bar) = 1; | ^^^^^ expected identifier error: unexpected nested extension path in message field - --> testdata/parser/field/bad-path.proto:45:21 + --> testdata/parser/field/bad-path.proto:31:21 | -45 | map foo = 1; +31 | map foo = 1; | ^^^^^ error: unexpected `/` in path in message field - --> testdata/parser/field/bad-path.proto:46:20 + --> testdata/parser/field/bad-path.proto:32:20 | -46 | map foo = 1; +32 | map foo = 1; | ^ help: replace this with a `.` encountered 30 errors and 4 warnings diff --git a/experimental/parser/testdata/parser/field/group.proto b/experimental/parser/testdata/parser/field/group.proto index 98d72bf74..635a15d4d 100644 --- a/experimental/parser/testdata/parser/field/group.proto +++ b/experimental/parser/testdata/parser/field/group.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/field/group.proto.stderr.txt b/experimental/parser/testdata/parser/field/group.proto.stderr.txt index bff1b4793..8f6b4c5af 100644 --- a/experimental/parser/testdata/parser/field/group.proto.stderr.txt +++ b/experimental/parser/testdata/parser/field/group.proto.stderr.txt @@ -1,49 +1,49 @@ warning: group syntax is deprecated - --> testdata/parser/field/group.proto:20:14 + --> testdata/parser/field/group.proto:6:14 | -20 | optional group Foo = 1 { + 6 | optional group Foo = 1 { | ^^^^^ = note: group syntax is not available in proto3 or editions warning: group syntax is deprecated - --> testdata/parser/field/group.proto:25:14 + --> testdata/parser/field/group.proto:11:14 | -25 | optional group Bar = 2 { +11 | optional group Bar = 2 { | ^^^^^ = note: group syntax is not available in proto3 or editions warning: group syntax is deprecated - --> testdata/parser/field/group.proto:29:14 + --> testdata/parser/field/group.proto:15:14 | -29 | repeated group X = 3 [bar = 1] { +15 | repeated group X = 3 [bar = 1] { | ^^^^^ = note: group syntax is not available in proto3 or editions warning: required fields are deprecated - --> testdata/parser/field/group.proto:33:5 + --> testdata/parser/field/group.proto:19:5 | -33 | required group lowercase = 4 {} +19 | required group lowercase = 4 {} | ^^^^^^^^ = help: do not attempt to change this to `optional` if the field is already in-use; doing so is a wire protocol break warning: group syntax is deprecated - --> testdata/parser/field/group.proto:33:14 + --> testdata/parser/field/group.proto:19:14 | -33 | required group lowercase = 4 {} +19 | required group lowercase = 4 {} | ^^^^^ = note: group syntax is not available in proto3 or editions error: group names must start with an uppercase letter - --> testdata/parser/field/group.proto:33:20 + --> testdata/parser/field/group.proto:19:20 | -33 | required group lowercase = 4 {} +19 | required group lowercase = 4 {} | ^^^^^^^^^ warning: group syntax is deprecated - --> testdata/parser/field/group.proto:36:9 + --> testdata/parser/field/group.proto:22:9 | -36 | group Baz = 5 {} +22 | group Baz = 5 {} | ^^^^^ = note: group syntax is not available in proto3 or editions diff --git a/experimental/parser/testdata/parser/field/group_proto3.proto b/experimental/parser/testdata/parser/field/group_proto3.proto index 11413d731..14b72e5ea 100644 --- a/experimental/parser/testdata/parser/field/group_proto3.proto +++ b/experimental/parser/testdata/parser/field/group_proto3.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/field/group_proto3.proto.stderr.txt b/experimental/parser/testdata/parser/field/group_proto3.proto.stderr.txt index b116e30ce..0c81cc989 100644 --- a/experimental/parser/testdata/parser/field/group_proto3.proto.stderr.txt +++ b/experimental/parser/testdata/parser/field/group_proto3.proto.stderr.txt @@ -1,7 +1,7 @@ error: group syntax is not supported - --> testdata/parser/field/group_proto3.proto:20:5 + --> testdata/parser/field/group_proto3.proto:6:5 | -20 | group G = 1 {} + 6 | group G = 1 {} | ^^^^^ = note: group syntax is only available in proto2 diff --git a/experimental/parser/testdata/parser/field/incomplete.proto b/experimental/parser/testdata/parser/field/incomplete.proto index 2d2a45f3e..95cbeb786 100644 --- a/experimental/parser/testdata/parser/field/incomplete.proto +++ b/experimental/parser/testdata/parser/field/incomplete.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/field/incomplete.proto.stderr.txt b/experimental/parser/testdata/parser/field/incomplete.proto.stderr.txt index 962c057fa..0701ba576 100644 --- a/experimental/parser/testdata/parser/field/incomplete.proto.stderr.txt +++ b/experimental/parser/testdata/parser/field/incomplete.proto.stderr.txt @@ -1,82 +1,82 @@ error: missing name in message field - --> testdata/parser/field/incomplete.proto:20:5 + --> testdata/parser/field/incomplete.proto:6:5 | -20 | name = 1; + 6 | name = 1; | ^^^^^^^^^ error: missing name in message field - --> testdata/parser/field/incomplete.proto:21:5 + --> testdata/parser/field/incomplete.proto:7:5 | -21 | foo.Bar = 1; + 7 | foo.Bar = 1; | ^^^^^^^^^^^^ error: unexpected identifier after definition - --> testdata/parser/field/incomplete.proto:24:5 + --> testdata/parser/field/incomplete.proto:10:5 | -24 | foo.Bar name; +10 | foo.Bar name; | ^^^ expected `;` | help: consider inserting a `;` | -23 | foo.bar name = 1; + 9 | foo.bar name = 1; | + error: missing message field tag in declaration - --> testdata/parser/field/incomplete.proto:24:5 + --> testdata/parser/field/incomplete.proto:10:5 | -24 | foo.Bar name; +10 | foo.Bar name; | ^^^^^^^^^^^^^ error: unexpected integer literal in definition - --> testdata/parser/field/incomplete.proto:25:18 + --> testdata/parser/field/incomplete.proto:11:18 | -25 | foo.Bar name 1; +11 | foo.Bar name 1; | ^ expected `=` | help: consider inserting a `=` | -25 | foo.Bar name = 1; +11 | foo.Bar name = 1; | ++ error: unexpected identifier after definition - --> testdata/parser/field/incomplete.proto:28:5 + --> testdata/parser/field/incomplete.proto:14:5 | -28 | foo..bar name = 1; +14 | foo..bar name = 1; | ^^^ expected `;` | help: consider inserting a `;` | -26 | foo.bar name = 1; // Comment +12 | foo.bar name = 1; // Comment | + error: unexpected tokens after `.` - --> testdata/parser/field/incomplete.proto:28:9 + --> testdata/parser/field/incomplete.proto:14:9 | -28 | foo..bar name = 1; +14 | foo..bar name = 1; | ^ expected identifier or `(...)` error: unexpected tokens after `.` - --> testdata/parser/field/incomplete.proto:29:9 + --> testdata/parser/field/incomplete.proto:15:9 | -29 | foo...bar name = 1; +15 | foo...bar name = 1; | ^^ expected identifier or `(...)` error: unexpected qualified name in message field - --> testdata/parser/field/incomplete.proto:30:13 + --> testdata/parser/field/incomplete.proto:16:13 | -30 | foo.bar name. = 1; +16 | foo.bar name. = 1; | ^^^^^ expected identifier error: unexpected `=` after qualified name - --> testdata/parser/field/incomplete.proto:30:19 + --> testdata/parser/field/incomplete.proto:16:19 | -30 | foo.bar name. = 1; +16 | foo.bar name. = 1; | ^ expected identifier or `(...)` | help: delete the extra `.` | -30 | - foo.bar name. = 1; -30 | + foo.bar name = 1; +16 | - foo.bar name. = 1; +16 | + foo.bar name = 1; | encountered 10 errors diff --git a/experimental/parser/testdata/parser/field/keywords.proto b/experimental/parser/testdata/parser/field/keywords.proto index 40f82b92f..18c68cea9 100644 --- a/experimental/parser/testdata/parser/field/keywords.proto +++ b/experimental/parser/testdata/parser/field/keywords.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/field/modifiers/2023.proto b/experimental/parser/testdata/parser/field/modifiers/2023.proto index 327d075a6..eb4cdb114 100644 --- a/experimental/parser/testdata/parser/field/modifiers/2023.proto +++ b/experimental/parser/testdata/parser/field/modifiers/2023.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package test; diff --git a/experimental/parser/testdata/parser/field/modifiers/2023.proto.stderr.txt b/experimental/parser/testdata/parser/field/modifiers/2023.proto.stderr.txt index 083c93f07..5a7a8cbdd 100644 --- a/experimental/parser/testdata/parser/field/modifiers/2023.proto.stderr.txt +++ b/experimental/parser/testdata/parser/field/modifiers/2023.proto.stderr.txt @@ -1,28 +1,28 @@ error: unexpected `required` - --> testdata/parser/field/modifiers/2023.proto:20:5 + --> testdata/parser/field/modifiers/2023.proto:6:5 | -20 | required int32 a = 1; + 6 | required int32 a = 1; | ^^^^^^^^ expected type name or `repeated` | help: delete it | -20 | - required int32 a = 1; -20 | + int32 a = 1; + 6 | - required int32 a = 1; + 6 | + int32 a = 1; | | = help: required fields are only permitted in proto2; even then, their use is strongly discouraged error: unexpected `optional` - --> testdata/parser/field/modifiers/2023.proto:21:5 + --> testdata/parser/field/modifiers/2023.proto:7:5 | -21 | optional int32 a = 1; + 7 | optional int32 a = 1; | ^^^^^^^^ expected type name or `repeated` | help: delete it | -21 | - optional int32 a = 1; -21 | + int32 a = 1; + 7 | - optional int32 a = 1; + 7 | + int32 a = 1; | | = help: in editions mode, the presence behavior of a singular field is @@ -31,63 +31,63 @@ error: unexpected `optional` = help: see error: unexpected `required` - --> testdata/parser/field/modifiers/2023.proto:27:9 + --> testdata/parser/field/modifiers/2023.proto:13:9 | -26 | / oneof bar { -27 | | required int32 a = 1; +12 | / oneof bar { +13 | | required int32 a = 1; | | ^^^^^^^^ expected type name -28 | | optional int32 a = 1; +14 | | optional int32 a = 1; ... | -32 | | } +18 | | } | \_____- within this oneof definition | help: delete it | -27 | - required int32 a = 1; -27 | + int32 a = 1; +13 | - required int32 a = 1; +13 | + int32 a = 1; | | = note: fields defined as part of a oneof definition may not have modifiers applied to them error: unexpected `optional` - --> testdata/parser/field/modifiers/2023.proto:28:9 + --> testdata/parser/field/modifiers/2023.proto:14:9 | -26 | / oneof bar { -27 | | required int32 a = 1; -28 | | optional int32 a = 1; +12 | / oneof bar { +13 | | required int32 a = 1; +14 | | optional int32 a = 1; | | ^^^^^^^^ expected type name -29 | | repeated int32 a = 1; +15 | | repeated int32 a = 1; ... | -32 | | } +18 | | } | \_____- within this oneof definition | help: delete it | -28 | - optional int32 a = 1; -28 | + int32 a = 1; +14 | - optional int32 a = 1; +14 | + int32 a = 1; | | = note: fields defined as part of a oneof definition may not have modifiers applied to them error: unexpected `repeated` - --> testdata/parser/field/modifiers/2023.proto:29:9 + --> testdata/parser/field/modifiers/2023.proto:15:9 | -26 | / oneof bar { -27 | | required int32 a = 1; -28 | | optional int32 a = 1; -29 | | repeated int32 a = 1; +12 | / oneof bar { +13 | | required int32 a = 1; +14 | | optional int32 a = 1; +15 | | repeated int32 a = 1; | | ^^^^^^^^ expected type name -30 | | int32 a = 1; -31 | | map a = 1; -32 | | } +16 | | int32 a = 1; +17 | | map a = 1; +18 | | } | \_____- within this oneof definition | help: delete it | -29 | - repeated int32 a = 1; -29 | + int32 a = 1; +15 | - repeated int32 a = 1; +15 | + int32 a = 1; | | = note: fields defined as part of a oneof definition may not have modifiers @@ -96,9 +96,9 @@ error: unexpected `repeated` message type with a single repeated field error: map fields are not allowed inside of a oneof definition - --> testdata/parser/field/modifiers/2023.proto:31:9 + --> testdata/parser/field/modifiers/2023.proto:17:9 | -31 | map a = 1; +17 | map a = 1; | ^^^^^^^^^^^^^^^^^ = help: to emulate a map field in a oneof definition, fine a local message type with a single map field diff --git a/experimental/parser/testdata/parser/field/modifiers/proto2.proto b/experimental/parser/testdata/parser/field/modifiers/proto2.proto index 21d99db17..81d627a08 100644 --- a/experimental/parser/testdata/parser/field/modifiers/proto2.proto +++ b/experimental/parser/testdata/parser/field/modifiers/proto2.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/field/modifiers/proto2.proto.stderr.txt b/experimental/parser/testdata/parser/field/modifiers/proto2.proto.stderr.txt index 97e431ce8..143aa5d05 100644 --- a/experimental/parser/testdata/parser/field/modifiers/proto2.proto.stderr.txt +++ b/experimental/parser/testdata/parser/field/modifiers/proto2.proto.stderr.txt @@ -1,82 +1,82 @@ warning: required fields are deprecated - --> testdata/parser/field/modifiers/proto2.proto:20:5 + --> testdata/parser/field/modifiers/proto2.proto:6:5 | -20 | required int32 a = 1; + 6 | required int32 a = 1; | ^^^^^^^^ = help: do not attempt to change this to `optional` if the field is already in-use; doing so is a wire protocol break error: unexpected type name - --> testdata/parser/field/modifiers/proto2.proto:23:5 + --> testdata/parser/field/modifiers/proto2.proto:9:5 | -23 | int32 a = 1; + 9 | int32 a = 1; | ^^^^^ expected `optional`, `repeated`, or `required` | help: use the `optional` modifier | -23 | optional int32 a = 1; + 9 | optional int32 a = 1; | +++++++++ | = note: modifiers are required in proto2 error: unexpected `required` - --> testdata/parser/field/modifiers/proto2.proto:27:9 + --> testdata/parser/field/modifiers/proto2.proto:13:9 | -26 | / oneof bar { -27 | | required int32 a = 1; +12 | / oneof bar { +13 | | required int32 a = 1; | | ^^^^^^^^ expected type name -28 | | optional int32 a = 1; +14 | | optional int32 a = 1; ... | -32 | | } +18 | | } | \_____- within this oneof definition | help: delete it | -27 | - required int32 a = 1; -27 | + int32 a = 1; +13 | - required int32 a = 1; +13 | + int32 a = 1; | | = note: fields defined as part of a oneof definition may not have modifiers applied to them error: unexpected `optional` - --> testdata/parser/field/modifiers/proto2.proto:28:9 + --> testdata/parser/field/modifiers/proto2.proto:14:9 | -26 | / oneof bar { -27 | | required int32 a = 1; -28 | | optional int32 a = 1; +12 | / oneof bar { +13 | | required int32 a = 1; +14 | | optional int32 a = 1; | | ^^^^^^^^ expected type name -29 | | repeated int32 a = 1; +15 | | repeated int32 a = 1; ... | -32 | | } +18 | | } | \_____- within this oneof definition | help: delete it | -28 | - optional int32 a = 1; -28 | + int32 a = 1; +14 | - optional int32 a = 1; +14 | + int32 a = 1; | | = note: fields defined as part of a oneof definition may not have modifiers applied to them error: unexpected `repeated` - --> testdata/parser/field/modifiers/proto2.proto:29:9 + --> testdata/parser/field/modifiers/proto2.proto:15:9 | -26 | / oneof bar { -27 | | required int32 a = 1; -28 | | optional int32 a = 1; -29 | | repeated int32 a = 1; +12 | / oneof bar { +13 | | required int32 a = 1; +14 | | optional int32 a = 1; +15 | | repeated int32 a = 1; | | ^^^^^^^^ expected type name -30 | | int32 a = 1; -31 | | map a = 1; -32 | | } +16 | | int32 a = 1; +17 | | map a = 1; +18 | | } | \_____- within this oneof definition | help: delete it | -29 | - repeated int32 a = 1; -29 | + int32 a = 1; +15 | - repeated int32 a = 1; +15 | + int32 a = 1; | | = note: fields defined as part of a oneof definition may not have modifiers @@ -85,9 +85,9 @@ error: unexpected `repeated` message type with a single repeated field error: map fields are not allowed inside of a oneof definition - --> testdata/parser/field/modifiers/proto2.proto:31:9 + --> testdata/parser/field/modifiers/proto2.proto:17:9 | -31 | map a = 1; +17 | map a = 1; | ^^^^^^^^^^^^^^^^^ = help: to emulate a map field in a oneof definition, fine a local message type with a single map field diff --git a/experimental/parser/testdata/parser/field/modifiers/proto3.proto b/experimental/parser/testdata/parser/field/modifiers/proto3.proto index a99374f4d..8d0ee1b22 100644 --- a/experimental/parser/testdata/parser/field/modifiers/proto3.proto +++ b/experimental/parser/testdata/parser/field/modifiers/proto3.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/field/modifiers/proto3.proto.stderr.txt b/experimental/parser/testdata/parser/field/modifiers/proto3.proto.stderr.txt index b8140343b..7a2c9bb66 100644 --- a/experimental/parser/testdata/parser/field/modifiers/proto3.proto.stderr.txt +++ b/experimental/parser/testdata/parser/field/modifiers/proto3.proto.stderr.txt @@ -1,76 +1,76 @@ error: unexpected `required` - --> testdata/parser/field/modifiers/proto3.proto:20:5 + --> testdata/parser/field/modifiers/proto3.proto:6:5 | -20 | required int32 a = 1; + 6 | required int32 a = 1; | ^^^^^^^^ expected type name, `optional`, or `repeated` | help: delete it | -20 | - required int32 a = 1; -20 | + int32 a = 1; + 6 | - required int32 a = 1; + 6 | + int32 a = 1; | | = help: required fields are only permitted in proto2; even then, their use is strongly discouraged error: unexpected `required` - --> testdata/parser/field/modifiers/proto3.proto:27:9 + --> testdata/parser/field/modifiers/proto3.proto:13:9 | -26 | / oneof bar { -27 | | required int32 a = 1; +12 | / oneof bar { +13 | | required int32 a = 1; | | ^^^^^^^^ expected type name -28 | | optional int32 a = 1; +14 | | optional int32 a = 1; ... | -32 | | } +18 | | } | \_____- within this oneof definition | help: delete it | -27 | - required int32 a = 1; -27 | + int32 a = 1; +13 | - required int32 a = 1; +13 | + int32 a = 1; | | = note: fields defined as part of a oneof definition may not have modifiers applied to them error: unexpected `optional` - --> testdata/parser/field/modifiers/proto3.proto:28:9 + --> testdata/parser/field/modifiers/proto3.proto:14:9 | -26 | / oneof bar { -27 | | required int32 a = 1; -28 | | optional int32 a = 1; +12 | / oneof bar { +13 | | required int32 a = 1; +14 | | optional int32 a = 1; | | ^^^^^^^^ expected type name -29 | | repeated int32 a = 1; +15 | | repeated int32 a = 1; ... | -32 | | } +18 | | } | \_____- within this oneof definition | help: delete it | -28 | - optional int32 a = 1; -28 | + int32 a = 1; +14 | - optional int32 a = 1; +14 | + int32 a = 1; | | = note: fields defined as part of a oneof definition may not have modifiers applied to them error: unexpected `repeated` - --> testdata/parser/field/modifiers/proto3.proto:29:9 + --> testdata/parser/field/modifiers/proto3.proto:15:9 | -26 | / oneof bar { -27 | | required int32 a = 1; -28 | | optional int32 a = 1; -29 | | repeated int32 a = 1; +12 | / oneof bar { +13 | | required int32 a = 1; +14 | | optional int32 a = 1; +15 | | repeated int32 a = 1; | | ^^^^^^^^ expected type name -30 | | int32 a = 1; -31 | | map a = 1; -32 | | } +16 | | int32 a = 1; +17 | | map a = 1; +18 | | } | \_____- within this oneof definition | help: delete it | -29 | - repeated int32 a = 1; -29 | + int32 a = 1; +15 | - repeated int32 a = 1; +15 | + int32 a = 1; | | = note: fields defined as part of a oneof definition may not have modifiers @@ -79,9 +79,9 @@ error: unexpected `repeated` message type with a single repeated field error: map fields are not allowed inside of a oneof definition - --> testdata/parser/field/modifiers/proto3.proto:31:9 + --> testdata/parser/field/modifiers/proto3.proto:17:9 | -31 | map a = 1; +17 | map a = 1; | ^^^^^^^^^^^^^^^^^ = help: to emulate a map field in a oneof definition, fine a local message type with a single map field diff --git a/experimental/parser/testdata/parser/field/ok.proto b/experimental/parser/testdata/parser/field/ok.proto index c09baa4d5..626ce4cc1 100644 --- a/experimental/parser/testdata/parser/field/ok.proto +++ b/experimental/parser/testdata/parser/field/ok.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/field/ok.proto.stderr.txt b/experimental/parser/testdata/parser/field/ok.proto.stderr.txt index 1083cbcc4..088e936b9 100644 --- a/experimental/parser/testdata/parser/field/ok.proto.stderr.txt +++ b/experimental/parser/testdata/parser/field/ok.proto.stderr.txt @@ -1,84 +1,84 @@ error: unexpected `required` - --> testdata/parser/field/ok.proto:22:5 + --> testdata/parser/field/ok.proto:8:5 | -22 | required Type name = 1; + 8 | required Type name = 1; | ^^^^^^^^ expected type name, `optional`, or `repeated` | help: delete it | -22 | - required Type name = 1; -22 | + Type name = 1; + 8 | - required Type name = 1; + 8 | + Type name = 1; | | = help: required fields are only permitted in proto2; even then, their use is strongly discouraged error: unexpected `required` - --> testdata/parser/field/ok.proto:27:5 + --> testdata/parser/field/ok.proto:13:5 | -27 | required .Type name = 1; +13 | required .Type name = 1; | ^^^^^^^^ expected type name, `optional`, or `repeated` | help: delete it | -27 | - required .Type name = 1; -27 | + .Type name = 1; +13 | - required .Type name = 1; +13 | + .Type name = 1; | | = help: required fields are only permitted in proto2; even then, their use is strongly discouraged error: unexpected `required` - --> testdata/parser/field/ok.proto:32:5 + --> testdata/parser/field/ok.proto:18:5 | -32 | required package.Type name = 1; +18 | required package.Type name = 1; | ^^^^^^^^ expected type name, `optional`, or `repeated` | help: delete it | -32 | - required package.Type name = 1; -32 | + package.Type name = 1; +18 | - required package.Type name = 1; +18 | + package.Type name = 1; | | = help: required fields are only permitted in proto2; even then, their use is strongly discouraged error: unexpected `required` - --> testdata/parser/field/ok.proto:37:5 + --> testdata/parser/field/ok.proto:23:5 | -37 | required .package.Type name = 1; +23 | required .package.Type name = 1; | ^^^^^^^^ expected type name, `optional`, or `repeated` | help: delete it | -37 | - required .package.Type name = 1; -37 | + .package.Type name = 1; +23 | - required .package.Type name = 1; +23 | + .package.Type name = 1; | | = help: required fields are only permitted in proto2; even then, their use is strongly discouraged error: unexpected `export` modifier on message field - --> testdata/parser/field/ok.proto:43:5 + --> testdata/parser/field/ok.proto:29:5 | -43 | export Type name = 1; +29 | export Type name = 1; | ^^^^^^ help: delete it | -43 | - export Type name = 1; -43 | + Type name = 1; +29 | - export Type name = 1; +29 | + Type name = 1; | = help: `export` only applies to a type definition error: unexpected `local` modifier on message field - --> testdata/parser/field/ok.proto:44:5 + --> testdata/parser/field/ok.proto:30:5 | -44 | local Type name = 1; +30 | local Type name = 1; | ^^^^^ help: delete it | -44 | - local Type name = 1; -44 | + Type name = 1; +30 | - local Type name = 1; +30 | + Type name = 1; | = help: `local` only applies to a type definition diff --git a/experimental/parser/testdata/parser/field/options.proto b/experimental/parser/testdata/parser/field/options.proto index 01fd521bc..5bd50a307 100644 --- a/experimental/parser/testdata/parser/field/options.proto +++ b/experimental/parser/testdata/parser/field/options.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/field/options.proto.stderr.txt b/experimental/parser/testdata/parser/field/options.proto.stderr.txt index c9cb83781..de1c20c41 100644 --- a/experimental/parser/testdata/parser/field/options.proto.stderr.txt +++ b/experimental/parser/testdata/parser/field/options.proto.stderr.txt @@ -1,30 +1,30 @@ error: compact options cannot be empty - --> testdata/parser/field/options.proto:21:15 + --> testdata/parser/field/options.proto:7:15 | -21 | M bar = 2 []; + 7 | M bar = 2 []; | ^^ help: remove this error: unexpected `:` in compact option - --> testdata/parser/field/options.proto:27:19 + --> testdata/parser/field/options.proto:13:19 | -27 | M bad = 4 [foo: {bar: baz}]; +13 | M bad = 4 [foo: {bar: baz}]; | ^ help: replace this with an `=` | -27 | - M bad = 4 [foo: {bar: baz}]; -27 | + M bad = 4 [foo = {bar: baz}]; +13 | - M bad = 4 [foo: {bar: baz}]; +13 | + M bad = 4 [foo = {bar: baz}]; | = note: top-level `option` assignment uses `=`, not `:` error: unexpected `=` in expression - --> testdata/parser/field/options.proto:28:28 + --> testdata/parser/field/options.proto:14:28 | -28 | M bad2 = 5 [foo = {bar = baz}]; +14 | M bad2 = 5 [foo = {bar = baz}]; | ^ help: replace this with an `:` | -28 | - M bad2 = 5 [foo = {bar = baz}]; -28 | + M bad2 = 5 [foo = {bar: baz}]; +14 | - M bad2 = 5 [foo = {bar = baz}]; +14 | + M bad2 = 5 [foo = {bar: baz}]; | = note: a message expression use `=`, not `:`, for setting fields diff --git a/experimental/parser/testdata/parser/import/42.proto b/experimental/parser/testdata/parser/import/42.proto index fe8c6198b..6aa56fc52 100644 --- a/experimental/parser/testdata/parser/import/42.proto +++ b/experimental/parser/testdata/parser/import/42.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/import/42.proto.stderr.txt b/experimental/parser/testdata/parser/import/42.proto.stderr.txt index 7c2e92a2d..90ee5e62c 100644 --- a/experimental/parser/testdata/parser/import/42.proto.stderr.txt +++ b/experimental/parser/testdata/parser/import/42.proto.stderr.txt @@ -1,7 +1,7 @@ error: unexpected integer literal in import - --> testdata/parser/import/42.proto:19:8 + --> testdata/parser/import/42.proto:5:8 | -19 | import 42; + 5 | import 42; | ^^ expected string literal encountered 1 error diff --git a/experimental/parser/testdata/parser/import/eof_after_kw.proto b/experimental/parser/testdata/parser/import/eof_after_kw.proto index 1720382f4..f3029e4e9 100644 --- a/experimental/parser/testdata/parser/import/eof_after_kw.proto +++ b/experimental/parser/testdata/parser/import/eof_after_kw.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/import/eof_after_kw.proto.stderr.txt b/experimental/parser/testdata/parser/import/eof_after_kw.proto.stderr.txt index 58fecf7ef..1e8c51088 100644 --- a/experimental/parser/testdata/parser/import/eof_after_kw.proto.stderr.txt +++ b/experimental/parser/testdata/parser/import/eof_after_kw.proto.stderr.txt @@ -1,7 +1,7 @@ error: unexpected end-of-file in import - --> testdata/parser/import/eof_after_kw.proto:20:7 + --> testdata/parser/import/eof_after_kw.proto:6:7 | -20 | import + 6 | import | ^ encountered 1 error diff --git a/experimental/parser/testdata/parser/import/escapes.proto b/experimental/parser/testdata/parser/import/escapes.proto index f95c53eb2..461056c48 100644 --- a/experimental/parser/testdata/parser/import/escapes.proto +++ b/experimental/parser/testdata/parser/import/escapes.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/import/escapes.proto.stderr.txt b/experimental/parser/testdata/parser/import/escapes.proto.stderr.txt index d53e2b0a9..f6a172ad4 100644 --- a/experimental/parser/testdata/parser/import/escapes.proto.stderr.txt +++ b/experimental/parser/testdata/parser/import/escapes.proto.stderr.txt @@ -1,23 +1,23 @@ warning: non-canonical string literal in import - --> testdata/parser/import/escapes.proto:19:8 + --> testdata/parser/import/escapes.proto:5:8 | -19 | import "foo\x2eproto"; + 5 | import "foo\x2eproto"; | ^^^^^^^^^^^^^^ help: replace it with a canonical string | -19 | - import "foo\x2eproto"; -19 | + import "foo.proto"; + 5 | - import "foo\x2eproto"; + 5 | + import "foo.proto"; | warning: non-canonical string literal in import - --> testdata/parser/import/escapes.proto:20:8 + --> testdata/parser/import/escapes.proto:6:8 | -20 | import "bar" ".proto"; + 6 | import "bar" ".proto"; | ^^^^^^^^^^^^^^ help: replace it with a canonical string | -20 | - import "bar" ".proto"; -20 | + import "bar.proto"; + 6 | - import "bar" ".proto"; + 6 | + import "bar.proto"; | = note: Protobuf implicitly concatenates adjacent string literals, like C or Python; this can lead to surprising behavior diff --git a/experimental/parser/testdata/parser/import/in_message.proto b/experimental/parser/testdata/parser/import/in_message.proto index c8c2d0c2d..100508938 100644 --- a/experimental/parser/testdata/parser/import/in_message.proto +++ b/experimental/parser/testdata/parser/import/in_message.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/import/in_message.proto.stderr.txt b/experimental/parser/testdata/parser/import/in_message.proto.stderr.txt index 4120e2e8d..894133587 100644 --- a/experimental/parser/testdata/parser/import/in_message.proto.stderr.txt +++ b/experimental/parser/testdata/parser/import/in_message.proto.stderr.txt @@ -1,52 +1,52 @@ error: unexpected import within message definition - --> testdata/parser/import/in_message.proto:20:5 + --> testdata/parser/import/in_message.proto:6:5 | -19 | / message M { -20 | | import "foo.proto"; + 5 | / message M { + 6 | | import "foo.proto"; | | ^^^^^^^^^^^^^^^^^^^ this import... -21 | | import public "foo.proto"; + 7 | | import public "foo.proto"; ... | -25 | | } +11 | | } | \_- ...cannot be declared within this message definition | = help: this import can only appear at file scope error: unexpected import within message definition - --> testdata/parser/import/in_message.proto:21:5 + --> testdata/parser/import/in_message.proto:7:5 | -19 | / message M { -20 | | import "foo.proto"; -21 | | import public "foo.proto"; + 5 | / message M { + 6 | | import "foo.proto"; + 7 | | import public "foo.proto"; | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ this import... -22 | | import weak "foo.proto"; + 8 | | import weak "foo.proto"; ... | -25 | | } +11 | | } | \_- ...cannot be declared within this message definition | = help: this import can only appear at file scope error: unexpected import within message definition - --> testdata/parser/import/in_message.proto:22:5 + --> testdata/parser/import/in_message.proto:8:5 | -19 | / message M { -20 | | import "foo.proto"; -21 | | import public "foo.proto"; -22 | | import weak "foo.proto"; + 5 | / message M { + 6 | | import "foo.proto"; + 7 | | import public "foo.proto"; + 8 | | import weak "foo.proto"; | | ^^^^^^^^^^^^^^^^^^^^^^^^ this import... ... | -25 | | } +11 | | } | \_- ...cannot be declared within this message definition | = help: this import can only appear at file scope error: unexpected import within message definition - --> testdata/parser/import/in_message.proto:24:5 + --> testdata/parser/import/in_message.proto:10:5 | -19 | / message M { + 5 | / message M { ... | -24 | | import foo.proto; +10 | | import foo.proto; | | ^^^^^^^^^^^^^^^^^ this import... -25 | | } +11 | | } | \_- ...cannot be declared within this message definition | = help: this import can only appear at file scope diff --git a/experimental/parser/testdata/parser/import/modifiers.proto b/experimental/parser/testdata/parser/import/modifiers.proto index 04c6b428f..00731ec75 100644 --- a/experimental/parser/testdata/parser/import/modifiers.proto +++ b/experimental/parser/testdata/parser/import/modifiers.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/import/modifiers.proto.stderr.txt b/experimental/parser/testdata/parser/import/modifiers.proto.stderr.txt index d6c13fa91..dd985d6aa 100644 --- a/experimental/parser/testdata/parser/import/modifiers.proto.stderr.txt +++ b/experimental/parser/testdata/parser/import/modifiers.proto.stderr.txt @@ -1,116 +1,116 @@ error: unexpected `weak` modifier in import - --> testdata/parser/import/modifiers.proto:19:15 + --> testdata/parser/import/modifiers.proto:5:15 | -19 | import public weak "foo.proto"; + 5 | import public weak "foo.proto"; | ------------- ^^^^ | | | already modified here error: unexpected `option` modifier in import - --> testdata/parser/import/modifiers.proto:20:15 + --> testdata/parser/import/modifiers.proto:6:15 | -20 | import public option "foo.proto"; + 6 | import public option "foo.proto"; | ------------- ^^^^^^ | | | already modified here warning: `import weak` is deprecated in "proto2" - --> testdata/parser/import/modifiers.proto:21:8 + --> testdata/parser/import/modifiers.proto:7:8 | -15 | syntax = "proto2"; + 1 | syntax = "proto2"; | -------- syntax specified here ... -20 | import public option "foo.proto"; -21 | import weak option "foo.proto"; + 6 | import public option "foo.proto"; + 7 | import weak option "foo.proto"; | ^^^^ = help: deprecated since "proto2", to be removed in Edition 2024 = help: `import weak` is not implemented correctly in most Protobuf implementations error: unexpected `option` modifier in import - --> testdata/parser/import/modifiers.proto:21:13 + --> testdata/parser/import/modifiers.proto:7:13 | -21 | import weak option "foo.proto"; + 7 | import weak option "foo.proto"; | ----------- ^^^^^^ | | | already modified here error: `import option` is not supported in "proto2" - --> testdata/parser/import/modifiers.proto:22:8 + --> testdata/parser/import/modifiers.proto:8:8 | -15 | syntax = "proto2"; + 1 | syntax = "proto2"; | -------- syntax specified here ... -21 | import weak option "foo.proto"; -22 | import option weak public "foo.proto"; + 7 | import weak option "foo.proto"; + 8 | import option weak public "foo.proto"; | ^^^^^^ = help: `import option` requires at least Edition 2024 error: unexpected `weak` modifier in import - --> testdata/parser/import/modifiers.proto:22:15 + --> testdata/parser/import/modifiers.proto:8:15 | -22 | import option weak public "foo.proto"; + 8 | import option weak public "foo.proto"; | ------------- ^^^^ | | | already modified here error: unexpected `public` modifier in import - --> testdata/parser/import/modifiers.proto:22:20 + --> testdata/parser/import/modifiers.proto:8:20 | -22 | import option weak public "foo.proto"; + 8 | import option weak public "foo.proto"; | ------------- ^^^^^^ | | | already modified here error: import after `import option` - --> testdata/parser/import/modifiers.proto:23:1 + --> testdata/parser/import/modifiers.proto:9:1 | -22 | import option weak public "foo.proto"; + 8 | import option weak public "foo.proto"; | -------------------------------------- previous `import option` here -23 | import weak weak "foo.proto"; + 9 | import weak weak "foo.proto"; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `import option`s must be the last imports in a file warning: `import weak` is deprecated in "proto2" - --> testdata/parser/import/modifiers.proto:23:8 + --> testdata/parser/import/modifiers.proto:9:8 | -15 | syntax = "proto2"; + 1 | syntax = "proto2"; | -------- syntax specified here ... -22 | import option weak public "foo.proto"; -23 | import weak weak "foo.proto"; + 8 | import option weak public "foo.proto"; + 9 | import weak weak "foo.proto"; | ^^^^ = help: deprecated since "proto2", to be removed in Edition 2024 = help: `import weak` is not implemented correctly in most Protobuf implementations error: unexpected `weak` modifier in import - --> testdata/parser/import/modifiers.proto:23:13 + --> testdata/parser/import/modifiers.proto:9:13 | -23 | import weak weak "foo.proto"; + 9 | import weak weak "foo.proto"; | ----------- ^^^^ | | | already modified here error: import after `import option` - --> testdata/parser/import/modifiers.proto:24:1 + --> testdata/parser/import/modifiers.proto:10:1 | -22 | import option weak public "foo.proto"; + 8 | import option weak public "foo.proto"; | -------------------------------------- previous `import option` here -23 | import weak weak "foo.proto"; -24 | import export "foo.proto"; + 9 | import weak weak "foo.proto"; +10 | import export "foo.proto"; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: `import option`s must be the last imports in a file error: unexpected `export` modifier in import - --> testdata/parser/import/modifiers.proto:24:8 + --> testdata/parser/import/modifiers.proto:10:8 | -24 | import export "foo.proto"; +10 | import export "foo.proto"; | ^^^^^^ help: replace with `public` | -24 | - import export "foo.proto"; -24 | + import public "foo.proto"; +10 | - import export "foo.proto"; +10 | + import public "foo.proto"; | = help: `export` only applies to a type definition diff --git a/experimental/parser/testdata/parser/import/no_path.proto b/experimental/parser/testdata/parser/import/no_path.proto index af43ee47f..dbad7380d 100644 --- a/experimental/parser/testdata/parser/import/no_path.proto +++ b/experimental/parser/testdata/parser/import/no_path.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/import/no_path.proto.stderr.txt b/experimental/parser/testdata/parser/import/no_path.proto.stderr.txt index 030e703a2..509c9ec28 100644 --- a/experimental/parser/testdata/parser/import/no_path.proto.stderr.txt +++ b/experimental/parser/testdata/parser/import/no_path.proto.stderr.txt @@ -1,25 +1,25 @@ error: missing import path in import - --> testdata/parser/import/no_path.proto:19:1 + --> testdata/parser/import/no_path.proto:5:1 | -19 | import; + 5 | import; | ^^^^^^^ error: missing import path in import - --> testdata/parser/import/no_path.proto:20:1 + --> testdata/parser/import/no_path.proto:6:1 | -20 | import weak; + 6 | import weak; | ^^^^^^^^^^^^ error: missing import path in import - --> testdata/parser/import/no_path.proto:21:1 + --> testdata/parser/import/no_path.proto:7:1 | -21 | import public; + 7 | import public; | ^^^^^^^^^^^^^^ error: missing import path in import - --> testdata/parser/import/no_path.proto:22:1 + --> testdata/parser/import/no_path.proto:8:1 | -22 | import option; + 8 | import option; | ^^^^^^^^^^^^^^ encountered 4 errors diff --git a/experimental/parser/testdata/parser/import/nosemi.proto b/experimental/parser/testdata/parser/import/nosemi.proto index 61cbe6dd4..79a09e5f8 100644 --- a/experimental/parser/testdata/parser/import/nosemi.proto +++ b/experimental/parser/testdata/parser/import/nosemi.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/import/nosemi.proto.stderr.txt b/experimental/parser/testdata/parser/import/nosemi.proto.stderr.txt index e71b12f63..8cc0f2cf8 100644 --- a/experimental/parser/testdata/parser/import/nosemi.proto.stderr.txt +++ b/experimental/parser/testdata/parser/import/nosemi.proto.stderr.txt @@ -1,23 +1,23 @@ error: unexpected `import` after import - --> testdata/parser/import/nosemi.proto:20:1 + --> testdata/parser/import/nosemi.proto:6:1 | -20 | import "bar.proto" + 6 | import "bar.proto" | ^^^^^^ expected `;` | help: consider inserting a `;` | -19 | import "foo.proto"; + 5 | import "foo.proto"; | + error: unexpected end-of-file after import - --> testdata/parser/import/nosemi.proto:20:19 + --> testdata/parser/import/nosemi.proto:6:19 | -20 | import "bar.proto" + 6 | import "bar.proto" | ^ expected `;` | help: consider inserting a `;` | -20 | import "bar.proto"; + 6 | import "bar.proto"; | + encountered 2 errors diff --git a/experimental/parser/testdata/parser/import/ok.proto b/experimental/parser/testdata/parser/import/ok.proto index 1615cdede..49e9c7652 100644 --- a/experimental/parser/testdata/parser/import/ok.proto +++ b/experimental/parser/testdata/parser/import/ok.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/import/ok.proto.stderr.txt b/experimental/parser/testdata/parser/import/ok.proto.stderr.txt index 1111d127a..63dd00251 100644 --- a/experimental/parser/testdata/parser/import/ok.proto.stderr.txt +++ b/experimental/parser/testdata/parser/import/ok.proto.stderr.txt @@ -1,24 +1,24 @@ warning: `import weak` is deprecated in "proto2" - --> testdata/parser/import/ok.proto:20:8 + --> testdata/parser/import/ok.proto:6:8 | -15 | syntax = "proto2"; + 1 | syntax = "proto2"; | -------- syntax specified here ... -19 | import "foo.proto"; -20 | import weak "weak.proto"; + 5 | import "foo.proto"; + 6 | import weak "weak.proto"; | ^^^^ = help: deprecated since "proto2", to be removed in Edition 2024 = help: `import weak` is not implemented correctly in most Protobuf implementations error: `import option` is not supported in "proto2" - --> testdata/parser/import/ok.proto:22:8 + --> testdata/parser/import/ok.proto:8:8 | -15 | syntax = "proto2"; + 1 | syntax = "proto2"; | -------- syntax specified here ... -21 | import public "public.proto"; -22 | import option "option.proto"; + 7 | import public "public.proto"; + 8 | import option "option.proto"; | ^^^^^^ = help: `import option` requires at least Edition 2024 diff --git a/experimental/parser/testdata/parser/import/options.proto b/experimental/parser/testdata/parser/import/options.proto index dc5f60a5e..7c0a1f885 100644 --- a/experimental/parser/testdata/parser/import/options.proto +++ b/experimental/parser/testdata/parser/import/options.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/import/options.proto.stderr.txt b/experimental/parser/testdata/parser/import/options.proto.stderr.txt index dbd1a5154..5065388c1 100644 --- a/experimental/parser/testdata/parser/import/options.proto.stderr.txt +++ b/experimental/parser/testdata/parser/import/options.proto.stderr.txt @@ -1,32 +1,32 @@ error: import cannot specify compact options - --> testdata/parser/import/options.proto:19:20 + --> testdata/parser/import/options.proto:5:20 | -19 | import "foo.proto" [(not.allowed) = "here"]; + 5 | import "foo.proto" [(not.allowed) = "here"]; | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this warning: `import weak` is deprecated in "proto2" - --> testdata/parser/import/options.proto:20:8 + --> testdata/parser/import/options.proto:6:8 | -15 | syntax = "proto2"; + 1 | syntax = "proto2"; | -------- syntax specified here ... -19 | import "foo.proto" [(not.allowed) = "here"]; -20 | import weak "weak.proto" [(not.allowed) = "here"]; + 5 | import "foo.proto" [(not.allowed) = "here"]; + 6 | import weak "weak.proto" [(not.allowed) = "here"]; | ^^^^ = help: deprecated since "proto2", to be removed in Edition 2024 = help: `import weak` is not implemented correctly in most Protobuf implementations error: import cannot specify compact options - --> testdata/parser/import/options.proto:20:26 + --> testdata/parser/import/options.proto:6:26 | -20 | import weak "weak.proto" [(not.allowed) = "here"]; + 6 | import weak "weak.proto" [(not.allowed) = "here"]; | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this error: import cannot specify compact options - --> testdata/parser/import/options.proto:21:30 + --> testdata/parser/import/options.proto:7:30 | -21 | import public "public.proto" [(not.allowed) = "here"]; + 7 | import public "public.proto" [(not.allowed) = "here"]; | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this encountered 3 errors and 1 warning diff --git a/experimental/parser/testdata/parser/import/order.proto b/experimental/parser/testdata/parser/import/order.proto index 76c39f8d5..1979ab96d 100644 --- a/experimental/parser/testdata/parser/import/order.proto +++ b/experimental/parser/testdata/parser/import/order.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2024"; package test; diff --git a/experimental/parser/testdata/parser/import/order.proto.stderr.txt b/experimental/parser/testdata/parser/import/order.proto.stderr.txt index 43f65b9a1..eca560254 100644 --- a/experimental/parser/testdata/parser/import/order.proto.stderr.txt +++ b/experimental/parser/testdata/parser/import/order.proto.stderr.txt @@ -1,21 +1,21 @@ error: `import weak` is not supported in Edition 2024 - --> testdata/parser/import/order.proto:21:8 + --> testdata/parser/import/order.proto:7:8 | -15 | edition = "2024"; + 1 | edition = "2024"; | ------ edition specified here ... -20 | import "bar.proto"; -21 | import weak "weak.proto"; + 6 | import "bar.proto"; + 7 | import weak "weak.proto"; | ^^^^ = help: deprecated since "proto2", removed in Edition 2024 = help: `import weak` has been replaced with `import option` error: import after `import option` - --> testdata/parser/import/order.proto:24:1 + --> testdata/parser/import/order.proto:10:1 | -23 | import option "bang.proto"; + 9 | import option "bang.proto"; | --------------------------- previous `import option` here -24 | import "wrong.proto"; +10 | import "wrong.proto"; | ^^^^^^^^^^^^^^^^^^^^^ = help: `import option`s must be the last imports in a file diff --git a/experimental/parser/testdata/parser/import/repeated.proto b/experimental/parser/testdata/parser/import/repeated.proto index b5de08ae8..ee37b67d8 100644 --- a/experimental/parser/testdata/parser/import/repeated.proto +++ b/experimental/parser/testdata/parser/import/repeated.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/import/repeated.proto.stderr.txt b/experimental/parser/testdata/parser/import/repeated.proto.stderr.txt index 3e2810eda..d6530f873 100644 --- a/experimental/parser/testdata/parser/import/repeated.proto.stderr.txt +++ b/experimental/parser/testdata/parser/import/repeated.proto.stderr.txt @@ -1,12 +1,12 @@ warning: non-canonical string literal in import - --> testdata/parser/import/repeated.proto:20:8 + --> testdata/parser/import/repeated.proto:6:8 | -20 | import "foo\x2eproto"; + 6 | import "foo\x2eproto"; | ^^^^^^^^^^^^^^ help: replace it with a canonical string | -20 | - import "foo\x2eproto"; -20 | + import "foo.proto"; + 6 | - import "foo\x2eproto"; + 6 | + import "foo.proto"; | encountered 1 warning diff --git a/experimental/parser/testdata/parser/import/symbol.proto b/experimental/parser/testdata/parser/import/symbol.proto index 7435995e9..997812ecd 100644 --- a/experimental/parser/testdata/parser/import/symbol.proto +++ b/experimental/parser/testdata/parser/import/symbol.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/import/symbol.proto.stderr.txt b/experimental/parser/testdata/parser/import/symbol.proto.stderr.txt index 8701b17cf..ae17a6c9a 100644 --- a/experimental/parser/testdata/parser/import/symbol.proto.stderr.txt +++ b/experimental/parser/testdata/parser/import/symbol.proto.stderr.txt @@ -1,25 +1,25 @@ error: unexpected qualified name in import - --> testdata/parser/import/symbol.proto:19:8 + --> testdata/parser/import/symbol.proto:5:8 | -19 | import my.Proto; + 5 | import my.Proto; | ^^^^^^^^ expected string literal | = help: Protobuf does not support importing symbols by name, instead, try importing a file, e.g. `import "google/protobuf/descriptor.proto";` error: unexpected qualified name in import - --> testdata/parser/import/symbol.proto:20:13 + --> testdata/parser/import/symbol.proto:6:13 | -20 | import weak my.Proto; + 6 | import weak my.Proto; | ^^^^^^^^ expected string literal | = help: Protobuf does not support importing symbols by name, instead, try importing a file, e.g. `import "google/protobuf/descriptor.proto";` error: unexpected qualified name in import - --> testdata/parser/import/symbol.proto:21:15 + --> testdata/parser/import/symbol.proto:7:15 | -21 | import public my.Proto; + 7 | import public my.Proto; | ^^^^^^^^ expected string literal | = help: Protobuf does not support importing symbols by name, instead, try diff --git a/experimental/parser/testdata/parser/lists.proto b/experimental/parser/testdata/parser/lists.proto index 89b2e4eef..258793c5b 100644 --- a/experimental/parser/testdata/parser/lists.proto +++ b/experimental/parser/testdata/parser/lists.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - // This test exercises every delimited list production in the language. option foo = []; diff --git a/experimental/parser/testdata/parser/lists.proto.stderr.txt b/experimental/parser/testdata/parser/lists.proto.stderr.txt index d9f5455b6..109015543 100644 --- a/experimental/parser/testdata/parser/lists.proto.stderr.txt +++ b/experimental/parser/testdata/parser/lists.proto.stderr.txt @@ -9,846 +9,846 @@ warning: missing `syntax` declaration discouraged error: unexpected array expression in option setting value - --> testdata/parser/lists.proto:17:14 + --> testdata/parser/lists.proto:3:14 | -17 | option foo = []; + 3 | option foo = []; | ^^ help: delete this option; an empty array expression has no effect | -17 | - option foo = []; + 3 | - option foo = []; | = note: array expressions can only appear inside of message expressions error: unexpected array expression in option setting value - --> testdata/parser/lists.proto:18:14 + --> testdata/parser/lists.proto:4:14 | -18 | option foo = [1]; + 4 | option foo = [1]; | ^^^ help: delete the brackets; this is equivalent for repeated fields | -18 | - option foo = [1]; -18 | + option foo = 1; + 4 | - option foo = [1]; + 4 | + option foo = 1; | = note: array expressions can only appear inside of message expressions error: unexpected array expression in option setting value - --> testdata/parser/lists.proto:19:14 + --> testdata/parser/lists.proto:5:14 | -19 | option foo = [1, 2]; + 5 | option foo = [1, 2]; | ^^^^^^ = note: array expressions can only appear inside of message expressions error: unexpected array expression in option setting value - --> testdata/parser/lists.proto:20:14 + --> testdata/parser/lists.proto:6:14 | -20 | option foo = [1, 2 3]; + 6 | option foo = [1, 2 3]; | ^^^^^^^^ = note: array expressions can only appear inside of message expressions error: unexpected integer literal in array expression - --> testdata/parser/lists.proto:20:20 + --> testdata/parser/lists.proto:6:20 | -20 | option foo = [1, 2 3]; + 6 | option foo = [1, 2 3]; | ^ expected `,` | - note: assuming a missing `,` here | help: add a `,` here | -20 | option foo = [1, 2, 3]; + 6 | option foo = [1, 2, 3]; | + error: unexpected array expression in option setting value - --> testdata/parser/lists.proto:21:14 + --> testdata/parser/lists.proto:7:14 | -21 | option foo = [1, 2,, 3]; + 7 | option foo = [1, 2,, 3]; | ^^^^^^^^^^ = note: array expressions can only appear inside of message expressions error: unexpected extra `,` in array expression - --> testdata/parser/lists.proto:21:20 + --> testdata/parser/lists.proto:7:20 | -21 | option foo = [1, 2,, 3]; + 7 | option foo = [1, 2,, 3]; | -^ expected expression | | | first delimiter is here | help: delete this `,` | -21 | - option foo = [1, 2,, 3]; -21 | + option foo = [1, 2, 3]; + 7 | - option foo = [1, 2,, 3]; + 7 | + option foo = [1, 2, 3]; | error: unexpected array expression in option setting value - --> testdata/parser/lists.proto:22:14 + --> testdata/parser/lists.proto:8:14 | -22 | option foo = [1, 2,, 3,]; + 8 | option foo = [1, 2,, 3,]; | ^^^^^^^^^^^ = note: array expressions can only appear inside of message expressions error: unexpected extra `,` in array expression - --> testdata/parser/lists.proto:22:20 + --> testdata/parser/lists.proto:8:20 | -22 | option foo = [1, 2,, 3,]; + 8 | option foo = [1, 2,, 3,]; | -^ expected expression | | | first delimiter is here | help: delete this `,` | -22 | - option foo = [1, 2,, 3,]; -22 | + option foo = [1, 2, 3,]; + 8 | - option foo = [1, 2,, 3,]; + 8 | + option foo = [1, 2, 3,]; | error: unexpected trailing `,` in array expression - --> testdata/parser/lists.proto:22:23 + --> testdata/parser/lists.proto:8:23 | -22 | option foo = [1, 2,, 3,]; + 8 | option foo = [1, 2,, 3,]; | ^ help: delete this `,` | -22 | - option foo = [1, 2,, 3,]; -22 | + option foo = [1, 2,, 3]; + 8 | - option foo = [1, 2,, 3,]; + 8 | + option foo = [1, 2,, 3]; | error: unexpected array expression in option setting value - --> testdata/parser/lists.proto:23:14 + --> testdata/parser/lists.proto:9:14 | -23 | option foo = [,1 2,, 3,]; + 9 | option foo = [,1 2,, 3,]; | ^^^^^^^^^^^ = note: array expressions can only appear inside of message expressions error: unexpected leading `,` in array expression - --> testdata/parser/lists.proto:23:15 + --> testdata/parser/lists.proto:9:15 | -23 | option foo = [,1 2,, 3,]; + 9 | option foo = [,1 2,, 3,]; | ^ expected expression | help: delete this `,` | -23 | - option foo = [,1 2,, 3,]; -23 | + option foo = [1 2,, 3,]; + 9 | - option foo = [,1 2,, 3,]; + 9 | + option foo = [1 2,, 3,]; | error: unexpected integer literal in array expression - --> testdata/parser/lists.proto:23:18 + --> testdata/parser/lists.proto:9:18 | -23 | option foo = [,1 2,, 3,]; + 9 | option foo = [,1 2,, 3,]; | ^ expected `,` | - note: assuming a missing `,` here | help: add a `,` here | -23 | option foo = [,1, 2,, 3,]; + 9 | option foo = [,1, 2,, 3,]; | + error: unexpected extra `,` in array expression - --> testdata/parser/lists.proto:23:20 + --> testdata/parser/lists.proto:9:20 | -23 | option foo = [,1 2,, 3,]; + 9 | option foo = [,1 2,, 3,]; | -^ expected expression | | | first delimiter is here | help: delete this `,` | -23 | - option foo = [,1 2,, 3,]; -23 | + option foo = [,1 2, 3,]; + 9 | - option foo = [,1 2,, 3,]; + 9 | + option foo = [,1 2, 3,]; | error: unexpected trailing `,` in array expression - --> testdata/parser/lists.proto:23:23 + --> testdata/parser/lists.proto:9:23 | -23 | option foo = [,1 2,, 3,]; + 9 | option foo = [,1 2,, 3,]; | ^ help: delete this `,` | -23 | - option foo = [,1 2,, 3,]; -23 | + option foo = [,1 2,, 3]; + 9 | - option foo = [,1 2,, 3,]; + 9 | + option foo = [,1 2,, 3]; | error: unexpected array expression in option setting value - --> testdata/parser/lists.proto:24:14 + --> testdata/parser/lists.proto:10:14 | -24 | option foo = [1; 2; 3]; +10 | option foo = [1; 2; 3]; | ^^^^^^^^^ = note: array expressions can only appear inside of message expressions error: unexpected `;` in array expression - --> testdata/parser/lists.proto:24:16 + --> testdata/parser/lists.proto:10:16 | -24 | option foo = [1; 2; 3]; +10 | option foo = [1; 2; 3]; | ^ expected `,` error: unexpected `;` in array expression - --> testdata/parser/lists.proto:24:19 + --> testdata/parser/lists.proto:10:19 | -24 | option foo = [1; 2; 3]; +10 | option foo = [1; 2; 3]; | ^ expected `,` error: unexpected array expression in option setting value - --> testdata/parser/lists.proto:25:14 + --> testdata/parser/lists.proto:11:14 | -25 | option foo = [a {}]; +11 | option foo = [a {}]; | ^^^^^^ = note: array expressions can only appear inside of message expressions error: unexpected message expression in array expression - --> testdata/parser/lists.proto:25:17 + --> testdata/parser/lists.proto:11:17 | -25 | option foo = [a {}]; +11 | option foo = [a {}]; | ^^ expected `,` | - note: assuming a missing `,` here | help: add a `,` here | -25 | option foo = [a, {}]; +11 | option foo = [a, {}]; | + error: unexpected array expression in option setting value - --> testdata/parser/lists.proto:26:14 + --> testdata/parser/lists.proto:12:14 | -26 | option foo = [,]; +12 | option foo = [,]; | ^^^ help: delete this option; an empty array expression has no effect | -26 | - option foo = [,]; +12 | - option foo = [,]; | = note: array expressions can only appear inside of message expressions error: unexpected leading `,` in array expression - --> testdata/parser/lists.proto:26:15 + --> testdata/parser/lists.proto:12:15 | -26 | option foo = [,]; +12 | option foo = [,]; | ^ expected expression | help: delete this `,` | -26 | - option foo = [,]; -26 | + option foo = []; +12 | - option foo = [,]; +12 | + option foo = []; | error: unexpected extra `;` in message expression - --> testdata/parser/lists.proto:31:16 + --> testdata/parser/lists.proto:17:16 | -31 | bar: 2;; +17 | bar: 2;; | -^ expected message field value | | | first delimiter is here | help: delete this `;` | -31 | - bar: 2;; -31 | + bar: 2; +17 | - bar: 2;; +17 | + bar: 2; | error: unexpected leading `;` in message expression - --> testdata/parser/lists.proto:34:15 + --> testdata/parser/lists.proto:20:15 | -34 | option foo = {;bar: 1}; +20 | option foo = {;bar: 1}; | ^ expected message field value | help: delete this `;` | -34 | - option foo = {;bar: 1}; -34 | + option foo = {bar: 1}; +20 | - option foo = {;bar: 1}; +20 | + option foo = {bar: 1}; | error: unexpected extra `;` in message expression - --> testdata/parser/lists.proto:35:22 + --> testdata/parser/lists.proto:21:22 | -35 | option foo = {baz: 1;; baz: 1}; +21 | option foo = {baz: 1;; baz: 1}; | -^ expected message field value | | | first delimiter is here | help: delete this `;` | -35 | - option foo = {baz: 1;; baz: 1}; -35 | + option foo = {baz: 1; baz: 1}; +21 | - option foo = {baz: 1;; baz: 1}; +21 | + option foo = {baz: 1; baz: 1}; | error: unexpected extra `;` in message expression - --> testdata/parser/lists.proto:36:22 + --> testdata/parser/lists.proto:22:22 | -36 | option foo = {baz: 1,; baz: 1;}; +22 | option foo = {baz: 1,; baz: 1;}; | -^ expected message field value | | | first delimiter is here | help: delete this `;` | -36 | - option foo = {baz: 1,; baz: 1;}; -36 | + option foo = {baz: 1, baz: 1;}; +22 | - option foo = {baz: 1,; baz: 1;}; +22 | + option foo = {baz: 1, baz: 1;}; | error: unexpected leading `;` in message expression - --> testdata/parser/lists.proto:38:10 + --> testdata/parser/lists.proto:24:10 | -38 | bar {;} +24 | bar {;} | ^ expected message field value | help: delete this `;` | -38 | - bar {;} -38 | + bar {} +24 | - bar {;} +24 | + bar {} | error: unexpected leading `,` in message expression - --> testdata/parser/lists.proto:39:10 + --> testdata/parser/lists.proto:25:10 | -39 | bar {,} +25 | bar {,} | ^ expected message field value | help: delete this `,` | -39 | - bar {,} -39 | + bar {} +25 | - bar {,} +25 | + bar {} | error: expected exactly one type in method parameter list, got 2 - --> testdata/parser/lists.proto:44:12 + --> testdata/parser/lists.proto:30:12 | -44 | rpc Foo(int, int) returns (int, int); +30 | rpc Foo(int, int) returns (int, int); | ^^^^^^^^^^ error: expected exactly one type in method return type, got 2 - --> testdata/parser/lists.proto:44:31 + --> testdata/parser/lists.proto:30:31 | -44 | rpc Foo(int, int) returns (int, int); +30 | rpc Foo(int, int) returns (int, int); | ^^^^^^^^^^ error: expected exactly one type in method parameter list, got 2 - --> testdata/parser/lists.proto:45:12 + --> testdata/parser/lists.proto:31:12 | -45 | rpc Foo(int int) returns (int int); +31 | rpc Foo(int int) returns (int int); | ^^^^^^^^^ error: unexpected type name in method parameter list - --> testdata/parser/lists.proto:45:17 + --> testdata/parser/lists.proto:31:17 | -45 | rpc Foo(int int) returns (int int); +31 | rpc Foo(int int) returns (int int); | ^^^ expected `,` | - note: assuming a missing `,` here | help: add a `,` here | -45 | rpc Foo(int, int) returns (int int); +31 | rpc Foo(int, int) returns (int int); | + error: expected exactly one type in method return type, got 2 - --> testdata/parser/lists.proto:45:30 + --> testdata/parser/lists.proto:31:30 | -45 | rpc Foo(int int) returns (int int); +31 | rpc Foo(int int) returns (int int); | ^^^^^^^^^ error: unexpected type name in method return type - --> testdata/parser/lists.proto:45:35 + --> testdata/parser/lists.proto:31:35 | -45 | rpc Foo(int int) returns (int int); +31 | rpc Foo(int int) returns (int int); | ^^^ expected `,` | - note: assuming a missing `,` here | help: add a `,` here | -45 | rpc Foo(int int) returns (int, int); +31 | rpc Foo(int int) returns (int, int); | + error: expected exactly one type in method parameter list, got 2 - --> testdata/parser/lists.proto:46:12 + --> testdata/parser/lists.proto:32:12 | -46 | rpc Foo(int; int) returns (int, int,); +32 | rpc Foo(int; int) returns (int, int,); | ^^^^^^^^^^ error: unexpected `;` in method parameter list - --> testdata/parser/lists.proto:46:16 + --> testdata/parser/lists.proto:32:16 | -46 | rpc Foo(int; int) returns (int, int,); +32 | rpc Foo(int; int) returns (int, int,); | ^ expected `,` error: expected exactly one type in method return type, got 2 - --> testdata/parser/lists.proto:46:31 + --> testdata/parser/lists.proto:32:31 | -46 | rpc Foo(int; int) returns (int, int,); +32 | rpc Foo(int; int) returns (int, int,); | ^^^^^^^^^^^ error: unexpected trailing `,` in method return type - --> testdata/parser/lists.proto:46:40 + --> testdata/parser/lists.proto:32:40 | -46 | rpc Foo(int; int) returns (int, int,); +32 | rpc Foo(int; int) returns (int, int,); | ^ help: delete this `,` | -46 | - rpc Foo(int; int) returns (int, int,); -46 | + rpc Foo(int; int) returns (int, int); +32 | - rpc Foo(int; int) returns (int, int,); +32 | + rpc Foo(int; int) returns (int, int); | error: expected exactly one type in method parameter list, got 2 - --> testdata/parser/lists.proto:47:12 + --> testdata/parser/lists.proto:33:12 | -47 | rpc Foo(, int, int) returns (int,, int,); +33 | rpc Foo(, int, int) returns (int,, int,); | ^^^^^^^^^^^^ error: unexpected leading `,` in method parameter list - --> testdata/parser/lists.proto:47:13 + --> testdata/parser/lists.proto:33:13 | -47 | rpc Foo(, int, int) returns (int,, int,); +33 | rpc Foo(, int, int) returns (int,, int,); | ^ expected type | help: delete this `,` | -47 | - rpc Foo(, int, int) returns (int,, int,); -47 | + rpc Foo( int, int) returns (int,, int,); +33 | - rpc Foo(, int, int) returns (int,, int,); +33 | + rpc Foo( int, int) returns (int,, int,); | error: expected exactly one type in method return type, got 2 - --> testdata/parser/lists.proto:47:33 + --> testdata/parser/lists.proto:33:33 | -47 | rpc Foo(, int, int) returns (int,, int,); +33 | rpc Foo(, int, int) returns (int,, int,); | ^^^^^^^^^^^^ error: unexpected extra `,` in method return type - --> testdata/parser/lists.proto:47:38 + --> testdata/parser/lists.proto:33:38 | -47 | rpc Foo(, int, int) returns (int,, int,); +33 | rpc Foo(, int, int) returns (int,, int,); | -^ expected type | | | first delimiter is here | help: delete this `,` | -47 | - rpc Foo(, int, int) returns (int,, int,); -47 | + rpc Foo(, int, int) returns (int, int,); +33 | - rpc Foo(, int, int) returns (int,, int,); +33 | + rpc Foo(, int, int) returns (int, int,); | error: unexpected trailing `,` in method return type - --> testdata/parser/lists.proto:47:43 + --> testdata/parser/lists.proto:33:43 | -47 | rpc Foo(, int, int) returns (int,, int,); +33 | rpc Foo(, int, int) returns (int,, int,); | ^ help: delete this `,` | -47 | - rpc Foo(, int, int) returns (int,, int,); -47 | + rpc Foo(, int, int) returns (int,, int); +33 | - rpc Foo(, int, int) returns (int,, int,); +33 | + rpc Foo(, int, int) returns (int,, int); | error: expected exactly one type in method parameter list, got 0 - --> testdata/parser/lists.proto:48:12 + --> testdata/parser/lists.proto:34:12 | -48 | rpc Foo(;) returns (,); +34 | rpc Foo(;) returns (,); | ^^^ error: unexpected `;` in method parameter list - --> testdata/parser/lists.proto:48:13 + --> testdata/parser/lists.proto:34:13 | -48 | rpc Foo(;) returns (,); +34 | rpc Foo(;) returns (,); | ^ expected type error: expected exactly one type in method return type, got 0 - --> testdata/parser/lists.proto:48:24 + --> testdata/parser/lists.proto:34:24 | -48 | rpc Foo(;) returns (,); +34 | rpc Foo(;) returns (,); | ^^^ error: unexpected leading `,` in method return type - --> testdata/parser/lists.proto:48:25 + --> testdata/parser/lists.proto:34:25 | -48 | rpc Foo(;) returns (,); +34 | rpc Foo(;) returns (,); | ^ expected type | help: delete this `,` | -48 | - rpc Foo(;) returns (,); -48 | + rpc Foo(;) returns (); +34 | - rpc Foo(;) returns (,); +34 | + rpc Foo(;) returns (); | error: expected exactly one type in method parameter list, got 0 - --> testdata/parser/lists.proto:49:12 + --> testdata/parser/lists.proto:35:12 | -49 | rpc Foo() returns (); +35 | rpc Foo() returns (); | ^^ error: expected exactly one type in method return type, got 0 - --> testdata/parser/lists.proto:49:23 + --> testdata/parser/lists.proto:35:23 | -49 | rpc Foo() returns (); +35 | rpc Foo() returns (); | ^^ error: missing message field tag in declaration - --> testdata/parser/lists.proto:53:5 + --> testdata/parser/lists.proto:39:5 | -53 | map x; +39 | map x; | ^^^^^^^^^^^ error: expected exactly two type arguments, got 1 - --> testdata/parser/lists.proto:53:8 + --> testdata/parser/lists.proto:39:8 | -53 | map x; +39 | map x; | ^^^^^ error: missing message field tag in declaration - --> testdata/parser/lists.proto:54:5 + --> testdata/parser/lists.proto:40:5 | -54 | map x; +40 | map x; | ^^^^^^^^^^^^^^^^ error: missing message field tag in declaration - --> testdata/parser/lists.proto:55:5 + --> testdata/parser/lists.proto:41:5 | -55 | map x; +41 | map x; | ^^^^^^^^^^^^^^^ error: unexpected type name in type parameters - --> testdata/parser/lists.proto:55:13 + --> testdata/parser/lists.proto:41:13 | -55 | map x; +41 | map x; | ^^^ expected `,` | - note: assuming a missing `,` here | help: add a `,` here | -55 | map x; +41 | map x; | + error: missing message field tag in declaration - --> testdata/parser/lists.proto:56:5 + --> testdata/parser/lists.proto:42:5 | -56 | map x; +42 | map x; | ^^^^^^^^^^^^^^^^^ error: unexpected extra `,` in type parameters - --> testdata/parser/lists.proto:56:13 + --> testdata/parser/lists.proto:42:13 | -56 | map x; +42 | map x; | -^ expected type | | | first delimiter is here | help: delete this `,` | -56 | - map x; -56 | + map x; +42 | - map x; +42 | + map x; | error: missing message field tag in declaration - --> testdata/parser/lists.proto:57:5 + --> testdata/parser/lists.proto:43:5 | -57 | map<,> x; +43 | map<,> x; | ^^^^^^^^^ error: expected exactly two type arguments, got 0 - --> testdata/parser/lists.proto:57:8 + --> testdata/parser/lists.proto:43:8 | -57 | map<,> x; +43 | map<,> x; | ^^^ error: unexpected leading `,` in type parameters - --> testdata/parser/lists.proto:57:9 + --> testdata/parser/lists.proto:43:9 | -57 | map<,> x; +43 | map<,> x; | ^ expected type | help: delete this `,` | -57 | - map<,> x; -57 | + map<> x; +43 | - map<,> x; +43 | + map<> x; | error: missing message field tag in declaration - --> testdata/parser/lists.proto:58:5 + --> testdata/parser/lists.proto:44:5 | -58 | map<> x; +44 | map<> x; | ^^^^^^^^ error: expected exactly two type arguments, got 0 - --> testdata/parser/lists.proto:58:8 + --> testdata/parser/lists.proto:44:8 | -58 | map<> x; +44 | map<> x; | ^^ error: missing message field tag in declaration - --> testdata/parser/lists.proto:59:5 + --> testdata/parser/lists.proto:45:5 | -59 | map<,int, int> x; +45 | map<,int, int> x; | ^^^^^^^^^^^^^^^^^ error: unexpected leading `,` in type parameters - --> testdata/parser/lists.proto:59:9 + --> testdata/parser/lists.proto:45:9 | -59 | map<,int, int> x; +45 | map<,int, int> x; | ^ expected type | help: delete this `,` | -59 | - map<,int, int> x; -59 | + map x; +45 | - map<,int, int> x; +45 | + map x; | error: missing message field tag in declaration - --> testdata/parser/lists.proto:60:5 + --> testdata/parser/lists.proto:46:5 | -60 | map x; +46 | map x; | ^^^^^^^^^^^^^^^^ error: unexpected `;` in type parameters - --> testdata/parser/lists.proto:60:12 + --> testdata/parser/lists.proto:46:12 | -60 | map x; +46 | map x; | ^ expected `,` error: missing message field tag in declaration - --> testdata/parser/lists.proto:61:5 + --> testdata/parser/lists.proto:47:5 | -61 | / map< +47 | / map< ... | -64 | | > x; +50 | | > x; | \________^ error: unexpected trailing `,` in type parameters - --> testdata/parser/lists.proto:63:12 + --> testdata/parser/lists.proto:49:12 | -63 | int, +49 | int, | ^ help: delete this `,` | -63 | - int, -63 | + int +49 | - int, +49 | + int | error: unexpected integer literal in reserved range - --> testdata/parser/lists.proto:68:19 + --> testdata/parser/lists.proto:54:19 | -68 | reserved 1, 2 3; +54 | reserved 1, 2 3; | ^ expected `,` | - note: assuming a missing `,` here | help: add a `,` here | -68 | reserved 1, 2, 3; +54 | reserved 1, 2, 3; | + error: unexpected extra `,` in reserved range - --> testdata/parser/lists.proto:69:19 + --> testdata/parser/lists.proto:55:19 | -69 | reserved 1, 2,, 3; +55 | reserved 1, 2,, 3; | -^ expected expression | | | first delimiter is here | help: delete this `,` | -69 | - reserved 1, 2,, 3; -69 | + reserved 1, 2, 3; +55 | - reserved 1, 2,, 3; +55 | + reserved 1, 2, 3; | error: unexpected extra `,` in reserved range - --> testdata/parser/lists.proto:70:19 + --> testdata/parser/lists.proto:56:19 | -70 | reserved 1, 2,, 3,; +56 | reserved 1, 2,, 3,; | -^ expected expression | | | first delimiter is here | help: delete this `,` | -70 | - reserved 1, 2,, 3,; -70 | + reserved 1, 2, 3,; +56 | - reserved 1, 2,, 3,; +56 | + reserved 1, 2, 3,; | error: unexpected trailing `,` in reserved range - --> testdata/parser/lists.proto:70:22 + --> testdata/parser/lists.proto:56:22 | -70 | reserved 1, 2,, 3,; +56 | reserved 1, 2,, 3,; | ^ help: delete this `,` | -70 | - reserved 1, 2,, 3,; -70 | + reserved 1, 2,, 3; +56 | - reserved 1, 2,, 3,; +56 | + reserved 1, 2,, 3; | error: unexpected leading `,` in reserved range - --> testdata/parser/lists.proto:71:14 + --> testdata/parser/lists.proto:57:14 | -71 | reserved ,1 2,, 3,; +57 | reserved ,1 2,, 3,; | ^ expected expression | help: delete this `,` | -71 | - reserved ,1 2,, 3,; -71 | + reserved 1 2,, 3,; +57 | - reserved ,1 2,, 3,; +57 | + reserved 1 2,, 3,; | error: unexpected integer literal in reserved range - --> testdata/parser/lists.proto:71:17 + --> testdata/parser/lists.proto:57:17 | -71 | reserved ,1 2,, 3,; +57 | reserved ,1 2,, 3,; | ^ expected `,` | - note: assuming a missing `,` here | help: add a `,` here | -71 | reserved ,1, 2,, 3,; +57 | reserved ,1, 2,, 3,; | + error: unexpected extra `,` in reserved range - --> testdata/parser/lists.proto:71:19 + --> testdata/parser/lists.proto:57:19 | -71 | reserved ,1 2,, 3,; +57 | reserved ,1 2,, 3,; | -^ expected expression | | | first delimiter is here | help: delete this `,` | -71 | - reserved ,1 2,, 3,; -71 | + reserved ,1 2, 3,; +57 | - reserved ,1 2,, 3,; +57 | + reserved ,1 2, 3,; | error: unexpected trailing `,` in reserved range - --> testdata/parser/lists.proto:71:22 + --> testdata/parser/lists.proto:57:22 | -71 | reserved ,1 2,, 3,; +57 | reserved ,1 2,, 3,; | ^ help: delete this `,` | -71 | - reserved ,1 2,, 3,; -71 | + reserved ,1 2,, 3; +57 | - reserved ,1 2,, 3,; +57 | + reserved ,1 2,, 3; | error: cannot use identifiers in reserved range in syntax mode - --> testdata/parser/lists.proto:72:14 + --> testdata/parser/lists.proto:58:14 | -72 | reserved a {}; +58 | reserved a {}; | ^ help: quote it to make it into a string literal | -72 | reserved "a" {}; +58 | reserved "a" {}; | + + error: unexpected message expression in reserved range - --> testdata/parser/lists.proto:72:16 + --> testdata/parser/lists.proto:58:16 | -72 | reserved a {}; +58 | reserved a {}; | ^^ | | | expected range expression, string literal, or integer literal error: unexpected message expression in reserved range - --> testdata/parser/lists.proto:72:16 + --> testdata/parser/lists.proto:58:16 | -72 | reserved a {}; +58 | reserved a {}; | ^^ expected `,` | - note: assuming a missing `,` here | help: add a `,` here | -72 | reserved a, {}; +58 | reserved a, {}; | + error: unexpected leading `,` in reserved range - --> testdata/parser/lists.proto:73:14 + --> testdata/parser/lists.proto:59:14 | -73 | reserved ,; +59 | reserved ,; | ^ expected expression | help: delete this `,` | -73 | - reserved ,; -73 | + reserved ; +59 | - reserved ,; +59 | + reserved ; | error: cannot use identifiers in reserved range in syntax mode - --> testdata/parser/lists.proto:75:14 + --> testdata/parser/lists.proto:61:14 | -75 | reserved a, b c; +61 | reserved a, b c; | ^ help: quote it to make it into a string literal | -75 | reserved "a", b c; +61 | reserved "a", b c; | + + error: cannot use identifiers in reserved range in syntax mode - --> testdata/parser/lists.proto:75:17 + --> testdata/parser/lists.proto:61:17 | -75 | reserved a, b c; +61 | reserved a, b c; | ^ help: quote it to make it into a string literal | -75 | reserved a, "b" c; +61 | reserved a, "b" c; | + + error: cannot use identifiers in reserved range in syntax mode - --> testdata/parser/lists.proto:75:19 + --> testdata/parser/lists.proto:61:19 | -75 | reserved a, b c; +61 | reserved a, b c; | ^ help: quote it to make it into a string literal | -75 | reserved a, b "c"; +61 | reserved a, b "c"; | + + error: unexpected identifier in reserved range - --> testdata/parser/lists.proto:75:19 + --> testdata/parser/lists.proto:61:19 | -75 | reserved a, b c; +61 | reserved a, b c; | ^ expected `,` | - note: assuming a missing `,` here | help: add a `,` here | -75 | reserved a, b, c; +61 | reserved a, b, c; | + error: cannot use identifiers in reserved range in syntax mode - --> testdata/parser/lists.proto:76:14 + --> testdata/parser/lists.proto:62:14 | -76 | reserved a, b c +62 | reserved a, b c | ^ help: quote it to make it into a string literal | -76 | reserved "a", b c +62 | reserved "a", b c | + + error: cannot use identifiers in reserved range in syntax mode - --> testdata/parser/lists.proto:76:17 + --> testdata/parser/lists.proto:62:17 | -76 | reserved a, b c +62 | reserved a, b c | ^ help: quote it to make it into a string literal | -76 | reserved a, "b" c +62 | reserved a, "b" c | + + error: cannot use identifiers in reserved range in syntax mode - --> testdata/parser/lists.proto:76:19 + --> testdata/parser/lists.proto:62:19 | -76 | reserved a, b c +62 | reserved a, b c | ^ help: quote it to make it into a string literal | -76 | reserved a, b "c" +62 | reserved a, b "c" | + + error: unexpected identifier in reserved range - --> testdata/parser/lists.proto:76:19 + --> testdata/parser/lists.proto:62:19 | -76 | reserved a, b c +62 | reserved a, b c | ^ expected `,` | - note: assuming a missing `,` here | help: add a `,` here | -76 | reserved a, b, c +62 | reserved a, b, c | + error: unexpected `message` after reserved range - --> testdata/parser/lists.proto:77:5 + --> testdata/parser/lists.proto:63:5 | -77 | message Foo {} +63 | message Foo {} | ^^^^^^^ expected `;` | help: consider inserting a `;` | -76 | reserved a, b c; +62 | reserved a, b c; | + encountered 88 errors and 2 warnings diff --git a/experimental/parser/testdata/parser/method/bad_type.proto b/experimental/parser/testdata/parser/method/bad_type.proto index 82a2c1da8..bece5f0b4 100644 --- a/experimental/parser/testdata/parser/method/bad_type.proto +++ b/experimental/parser/testdata/parser/method/bad_type.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/method/bad_type.proto.stderr.txt b/experimental/parser/testdata/parser/method/bad_type.proto.stderr.txt index 7eb90b4d0..a29441318 100644 --- a/experimental/parser/testdata/parser/method/bad_type.proto.stderr.txt +++ b/experimental/parser/testdata/parser/method/bad_type.proto.stderr.txt @@ -1,95 +1,95 @@ error: unexpected `optional` modifier in method signature - --> testdata/parser/method/bad_type.proto:20:14 + --> testdata/parser/method/bad_type.proto:6:14 | -20 | rpc Bar1(optional foo.Bar) returns (foo.Bar); + 6 | rpc Bar1(optional foo.Bar) returns (foo.Bar); | ^^^^^^^^ help: delete it | -20 | - rpc Bar1(optional foo.Bar) returns (foo.Bar); -20 | + rpc Bar1(foo.Bar) returns (foo.Bar); + 6 | - rpc Bar1(optional foo.Bar) returns (foo.Bar); + 6 | + rpc Bar1(foo.Bar) returns (foo.Bar); | = help: `optional` only applies to a message field error: unexpected `repeated` modifier in method signature - --> testdata/parser/method/bad_type.proto:21:32 + --> testdata/parser/method/bad_type.proto:7:32 | -21 | rpc Bar2(foo.Bar) returns (repeated foo.Bar); + 7 | rpc Bar2(foo.Bar) returns (repeated foo.Bar); | ^^^^^^^^ help: delete it | -21 | - rpc Bar2(foo.Bar) returns (repeated foo.Bar); -21 | + rpc Bar2(foo.Bar) returns (foo.Bar); + 7 | - rpc Bar2(foo.Bar) returns (repeated foo.Bar); + 7 | + rpc Bar2(foo.Bar) returns (foo.Bar); | = help: `repeated` only applies to a message field error: unexpected `repeated` modifier in method signature - --> testdata/parser/method/bad_type.proto:22:31 + --> testdata/parser/method/bad_type.proto:8:31 | -22 | rpc Bar2(foo.Bar) returns repeated foo.Bar; + 8 | rpc Bar2(foo.Bar) returns repeated foo.Bar; | ^^^^^^^^ help: delete it | -22 | - rpc Bar2(foo.Bar) returns repeated foo.Bar; -22 | + rpc Bar2(foo.Bar) returns foo.Bar; + 8 | - rpc Bar2(foo.Bar) returns repeated foo.Bar; + 8 | + rpc Bar2(foo.Bar) returns foo.Bar; | = help: `repeated` only applies to a message field error: missing `(...)` around method return type - --> testdata/parser/method/bad_type.proto:22:31 + --> testdata/parser/method/bad_type.proto:8:31 | -22 | rpc Bar2(foo.Bar) returns repeated foo.Bar; + 8 | rpc Bar2(foo.Bar) returns repeated foo.Bar; | ^^^^^^^^^^^^^^^^ help: insert (...) around the return type | -22 | rpc Bar2(foo.Bar) returns (repeated foo.Bar); + 8 | rpc Bar2(foo.Bar) returns (repeated foo.Bar); | + + error: unexpected type in method parameter list - --> testdata/parser/method/bad_type.proto:23:14 + --> testdata/parser/method/bad_type.proto:9:14 | -23 | rpc Bar3(map) returns (foo.Bar); + 9 | rpc Bar3(map) returns (foo.Bar); | ^^^^^^^^^^^^^^^^^^^^ expected message type error: expected exactly one type in method parameter list, got 2 - --> testdata/parser/method/bad_type.proto:24:13 + --> testdata/parser/method/bad_type.proto:10:13 | -24 | rpc Bar4(string, foo.Bar) returns (foo.Bar); +10 | rpc Bar4(string, foo.Bar) returns (foo.Bar); | ^^^^^^^^^^^^^^^^^ error: expected exactly one type in method return type, got 2 - --> testdata/parser/method/bad_type.proto:25:31 + --> testdata/parser/method/bad_type.proto:11:31 | -25 | rpc Bar5(foo.Bar) returns (foo.Bar, stream string); +11 | rpc Bar5(foo.Bar) returns (foo.Bar, stream string); | ^^^^^^^^^^^^^^^^^^^^^^^^ error: unexpected `repeated` modifier in method signature - --> testdata/parser/method/bad_type.proto:26:21 + --> testdata/parser/method/bad_type.proto:12:21 | -26 | rpc Bar6(stream repeated foo.Bar) returns (foo.Bar); +12 | rpc Bar6(stream repeated foo.Bar) returns (foo.Bar); | ^^^^^^^^ help: delete it | -26 | - rpc Bar6(stream repeated foo.Bar) returns (foo.Bar); -26 | + rpc Bar6(stream foo.Bar) returns (foo.Bar); +12 | - rpc Bar6(stream repeated foo.Bar) returns (foo.Bar); +12 | + rpc Bar6(stream foo.Bar) returns (foo.Bar); | = help: `repeated` only applies to a message field error: unexpected type in method parameter list - --> testdata/parser/method/bad_type.proto:27:21 + --> testdata/parser/method/bad_type.proto:13:21 | -27 | rpc Bar7(stream map) returns (foo.Bar); +13 | rpc Bar7(stream map) returns (foo.Bar); | ^^^^^^^^^^^^^^^^^^^^ expected message type error: unexpected nested extension path in method parameter list - --> testdata/parser/method/bad_type.proto:29:18 + --> testdata/parser/method/bad_type.proto:15:18 | -29 | rpc Bar8(foo.(bar.baz)) returns (buf.build/x.y); +15 | rpc Bar8(foo.(bar.baz)) returns (buf.build/x.y); | ^^^^^^^^^ error: unexpected `/` in path in method return type - --> testdata/parser/method/bad_type.proto:29:47 + --> testdata/parser/method/bad_type.proto:15:47 | -29 | rpc Bar8(foo.(bar.baz)) returns (buf.build/x.y); +15 | rpc Bar8(foo.(bar.baz)) returns (buf.build/x.y); | ^ | | | help: replace this with a `.` diff --git a/experimental/parser/testdata/parser/method/incomplete.proto b/experimental/parser/testdata/parser/method/incomplete.proto index d33ee08b3..1d0417434 100644 --- a/experimental/parser/testdata/parser/method/incomplete.proto +++ b/experimental/parser/testdata/parser/method/incomplete.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/method/incomplete.proto.stderr.txt b/experimental/parser/testdata/parser/method/incomplete.proto.stderr.txt index d56d855f4..3316cd952 100644 --- a/experimental/parser/testdata/parser/method/incomplete.proto.stderr.txt +++ b/experimental/parser/testdata/parser/method/incomplete.proto.stderr.txt @@ -1,69 +1,69 @@ error: missing `(...)` around method return type - --> testdata/parser/method/incomplete.proto:20:31 + --> testdata/parser/method/incomplete.proto:6:31 | -20 | rpc Bar1(foo.Bar) returns foo.Bar; + 6 | rpc Bar1(foo.Bar) returns foo.Bar; | ^^^^^^^ help: insert (...) around the return type | -20 | rpc Bar1(foo.Bar) returns (foo.Bar); + 6 | rpc Bar1(foo.Bar) returns (foo.Bar); | + + error: missing method return type in service method - --> testdata/parser/method/incomplete.proto:21:13 + --> testdata/parser/method/incomplete.proto:7:13 | -21 | rpc Bar2(foo.Bar); + 7 | rpc Bar2(foo.Bar); | ^^^^^^^^^ expected `returns (...)` after this error: missing method parameter list in service method - --> testdata/parser/method/incomplete.proto:22:9 + --> testdata/parser/method/incomplete.proto:8:9 | -22 | rpc Bar3 returns (foo.Bar); + 8 | rpc Bar3 returns (foo.Bar); | ^^^^ expected `(...)` after this error: expected exactly one type in method return type, got 0 - --> testdata/parser/method/incomplete.proto:23:31 + --> testdata/parser/method/incomplete.proto:9:31 | -23 | rpc Bar4(foo.Bar) returns () {} + 9 | rpc Bar4(foo.Bar) returns () {} | ^^ error: expected exactly one type in method parameter list, got 0 - --> testdata/parser/method/incomplete.proto:24:13 + --> testdata/parser/method/incomplete.proto:10:13 | -24 | rpc Bar5() returns (stream foo.Bar); +10 | rpc Bar5() returns (stream foo.Bar); | ^^ error: expected exactly one type in method parameter list, got 0 - --> testdata/parser/method/incomplete.proto:25:13 + --> testdata/parser/method/incomplete.proto:11:13 | -25 | rpc Bar6() returns; +11 | rpc Bar6() returns; | ^^ error: missing method return type in service method - --> testdata/parser/method/incomplete.proto:25:16 + --> testdata/parser/method/incomplete.proto:11:16 | -25 | rpc Bar6() returns; +11 | rpc Bar6() returns; | ^^^^^^^ expected `(...)` after this error: unexpected `;` after `returns` - --> testdata/parser/method/incomplete.proto:25:23 + --> testdata/parser/method/incomplete.proto:11:23 | -25 | rpc Bar6() returns; +11 | rpc Bar6() returns; | ^ expected `(...)` error: expected exactly one type in method parameter list, got 0 - --> testdata/parser/method/incomplete.proto:26:13 + --> testdata/parser/method/incomplete.proto:12:13 | -26 | rpc Bar7() returns stream foo.Bar; +12 | rpc Bar7() returns stream foo.Bar; | ^^ error: missing `(...)` around method return type - --> testdata/parser/method/incomplete.proto:26:24 + --> testdata/parser/method/incomplete.proto:12:24 | -26 | rpc Bar7() returns stream foo.Bar; +12 | rpc Bar7() returns stream foo.Bar; | ^^^^^^^^^^^^^^ help: insert (...) around the return type | -26 | rpc Bar7() returns (stream foo.Bar); +12 | rpc Bar7() returns (stream foo.Bar); | + + encountered 10 errors diff --git a/experimental/parser/testdata/parser/method/ok.proto b/experimental/parser/testdata/parser/method/ok.proto index 715fd3191..66f7a0381 100644 --- a/experimental/parser/testdata/parser/method/ok.proto +++ b/experimental/parser/testdata/parser/method/ok.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/method/options.proto b/experimental/parser/testdata/parser/method/options.proto index cf1f7912b..4e169947f 100644 --- a/experimental/parser/testdata/parser/method/options.proto +++ b/experimental/parser/testdata/parser/method/options.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/method/options.proto.stderr.txt b/experimental/parser/testdata/parser/method/options.proto.stderr.txt index ef46fe0d3..7c9a1ca69 100644 --- a/experimental/parser/testdata/parser/method/options.proto.stderr.txt +++ b/experimental/parser/testdata/parser/method/options.proto.stderr.txt @@ -1,7 +1,7 @@ error: service method cannot specify compact options - --> testdata/parser/method/options.proto:20:41 + --> testdata/parser/method/options.proto:6:41 | -20 | rpc Bar1(foo.Bar) returns (foo.Bar) [not.(allowed).here = 42]; + 6 | rpc Bar1(foo.Bar) returns (foo.Bar) [not.(allowed).here = 42]; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: remove this diff --git a/experimental/parser/testdata/parser/option/bad_path.proto b/experimental/parser/testdata/parser/option/bad_path.proto index 0e8158ee5..347b922f3 100644 --- a/experimental/parser/testdata/parser/option/bad_path.proto +++ b/experimental/parser/testdata/parser/option/bad_path.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/option/bad_path.proto.stderr.txt b/experimental/parser/testdata/parser/option/bad_path.proto.stderr.txt index 3be4b10d1..5faea44e6 100644 --- a/experimental/parser/testdata/parser/option/bad_path.proto.stderr.txt +++ b/experimental/parser/testdata/parser/option/bad_path.proto.stderr.txt @@ -1,61 +1,61 @@ error: missing option setting path - --> testdata/parser/option/bad_path.proto:19:1 + --> testdata/parser/option/bad_path.proto:5:1 | -19 | option; + 5 | option; | ^^^^^^^ error: missing option setting value - --> testdata/parser/option/bad_path.proto:20:1 + --> testdata/parser/option/bad_path.proto:6:1 | -20 | option foo.bar; + 6 | option foo.bar; | ^^^^^^^^^^^^^^^ error: missing option setting path - --> testdata/parser/option/bad_path.proto:21:1 + --> testdata/parser/option/bad_path.proto:7:1 | -21 | option = 2; + 7 | option = 2; | ^^^^^^^^^^^ error: unexpected absolute path in option setting - --> testdata/parser/option/bad_path.proto:22:8 + --> testdata/parser/option/bad_path.proto:8:8 | -22 | option .(foo.bar).baz = 3; + 8 | option .(foo.bar).baz = 3; | ^^^^^^^^^^^^^^ expected a path without a leading `.` | help: remove the leading `.` | -22 | - option .(foo.bar).baz = 3; -22 | + option (foo.bar).baz = 3; + 8 | - option .(foo.bar).baz = 3; + 8 | + option (foo.bar).baz = 3; | error: unexpected `/` in path in option setting - --> testdata/parser/option/bad_path.proto:23:11 + --> testdata/parser/option/bad_path.proto:9:11 | -23 | option foo/(bar.baz).foo = 4; + 9 | option foo/(bar.baz).foo = 4; | ^ help: replace this with a `.` error: unexpected absolute path in option setting - --> testdata/parser/option/bad_path.proto:27:9 + --> testdata/parser/option/bad_path.proto:13:9 | -27 | .(foo.bar).baz = 3, +13 | .(foo.bar).baz = 3, | ^^^^^^^^^^^^^^ expected a path without a leading `.` | help: remove the leading `.` | -27 | - .(foo.bar).baz = 3, -27 | + (foo.bar).baz = 3, +13 | - .(foo.bar).baz = 3, +13 | + (foo.bar).baz = 3, | error: unexpected `/` in path in option setting - --> testdata/parser/option/bad_path.proto:28:12 + --> testdata/parser/option/bad_path.proto:14:12 | -28 | foo/(bar.baz).foo = 4 +14 | foo/(bar.baz).foo = 4 | ^ help: replace this with a `.` error: compact options cannot be empty - --> testdata/parser/option/bad_path.proto:30:17 + --> testdata/parser/option/bad_path.proto:16:17 | -30 | int32 y = 2 []; +16 | int32 y = 2 []; | ^^ help: remove this encountered 8 errors diff --git a/experimental/parser/testdata/parser/option/broken_angle.proto b/experimental/parser/testdata/parser/option/broken_angle.proto index 4f152ed96..4b4317189 100644 --- a/experimental/parser/testdata/parser/option/broken_angle.proto +++ b/experimental/parser/testdata/parser/option/broken_angle.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/option/broken_angle.proto.stderr.txt b/experimental/parser/testdata/parser/option/broken_angle.proto.stderr.txt index 91469f62b..8b17a1826 100644 --- a/experimental/parser/testdata/parser/option/broken_angle.proto.stderr.txt +++ b/experimental/parser/testdata/parser/option/broken_angle.proto.stderr.txt @@ -1,7 +1,7 @@ error: unexpected `{...}` in expression - --> testdata/parser/option/broken_angle.proto:21:1 + --> testdata/parser/option/broken_angle.proto:7:1 | -21 | }; + 7 | }; | ^ expected expression encountered 1 error diff --git a/experimental/parser/testdata/parser/option/cel_literals.proto b/experimental/parser/testdata/parser/option/cel_literals.proto index 5040e96a5..96621b42b 100644 --- a/experimental/parser/testdata/parser/option/cel_literals.proto +++ b/experimental/parser/testdata/parser/option/cel_literals.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/option/cel_literals.proto.stderr.txt b/experimental/parser/testdata/parser/option/cel_literals.proto.stderr.txt index 5e699f6f6..c18f5ca7c 100644 --- a/experimental/parser/testdata/parser/option/cel_literals.proto.stderr.txt +++ b/experimental/parser/testdata/parser/option/cel_literals.proto.stderr.txt @@ -1,59 +1,59 @@ error: invalid digit in decimal integer literal - --> testdata/parser/option/cel_literals.proto:21:14 + --> testdata/parser/option/cel_literals.proto:7:14 | -21 | option x = 42i32; + 7 | option x = 42i32; | ^ expected `0` to `9` error: unrecognized prefix for string literal - --> testdata/parser/option/cel_literals.proto:24:8 + --> testdata/parser/option/cel_literals.proto:10:8 help: delete it | -24 | - r: r"""x""", -24 | + r: """x""", +10 | - r: r"""x""", +10 | + r: """x""", | error: unrecognized prefix for string literal - --> testdata/parser/option/cel_literals.proto:25:8 + --> testdata/parser/option/cel_literals.proto:11:8 help: delete it | -25 | - b: br"""x""", -25 | + b: """x""", +11 | - b: br"""x""", +11 | + b: """x""", | error: unexpected string literal in message expression - --> testdata/parser/option/cel_literals.proto:26:10 + --> testdata/parser/option/cel_literals.proto:12:10 | -26 | b: bR'''x''', +12 | b: bR'''x''', | ^^^^^^^ expected message field value error: unrecognized prefix for string literal - --> testdata/parser/option/cel_literals.proto:29:8 + --> testdata/parser/option/cel_literals.proto:15:8 help: delete it | -29 | - k: r"x", -29 | + k: "x", +15 | - k: r"x", +15 | + k: "x", | error: unrecognized prefix for string literal - --> testdata/parser/option/cel_literals.proto:30:8 + --> testdata/parser/option/cel_literals.proto:16:8 help: delete it | -30 | - j: b"", -30 | + j: "", +16 | - j: b"", +16 | + j: "", | error: unrecognized prefix for string literal - --> testdata/parser/option/cel_literals.proto:32:8 + --> testdata/parser/option/cel_literals.proto:18:8 help: delete it | -32 | - x: r"" b"""""", -32 | + x: "" b"""""", +18 | - x: r"" b"""""", +18 | + x: "" b"""""", | error: implicitly-concatenated string has incompatible prefix - --> testdata/parser/option/cel_literals.proto:32:12 + --> testdata/parser/option/cel_literals.proto:18:12 | -32 | x: r"" b"""""", +18 | x: r"" b"""""", | - ^ | | | must match this prefix diff --git a/experimental/parser/testdata/parser/option/exotic_base.proto b/experimental/parser/testdata/parser/option/exotic_base.proto index 25379ce8f..ccccd2e7d 100644 --- a/experimental/parser/testdata/parser/option/exotic_base.proto +++ b/experimental/parser/testdata/parser/option/exotic_base.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/option/exotic_base.proto.stderr.txt b/experimental/parser/testdata/parser/option/exotic_base.proto.stderr.txt index b2f1b1ab8..7afdc030f 100644 --- a/experimental/parser/testdata/parser/option/exotic_base.proto.stderr.txt +++ b/experimental/parser/testdata/parser/option/exotic_base.proto.stderr.txt @@ -1,50 +1,50 @@ error: unsupported base for integer literal - --> testdata/parser/option/exotic_base.proto:19:12 + --> testdata/parser/option/exotic_base.proto:5:12 help: use a hexadecimal literal instead | -19 | - option x = 0b1100101; -19 | + option x = 0x65; + 5 | - option x = 0b1100101; + 5 | + option x = 0x65; | = note: Protobuf does not support binary literals error: unsupported base for integer literal - --> testdata/parser/option/exotic_base.proto:20:12 + --> testdata/parser/option/exotic_base.proto:6:12 help: use a hexadecimal literal instead | -20 | - option x = 0B1010101; -20 | + option x = 0x55; + 6 | - option x = 0B1010101; + 6 | + option x = 0x55; | = note: Protobuf does not support binary literals error: unsupported base for integer literal - --> testdata/parser/option/exotic_base.proto:21:12 + --> testdata/parser/option/exotic_base.proto:7:12 help: remove the `o` | -21 | - option x = 0o1234567; -21 | + option x = 01234567; + 7 | - option x = 0o1234567; + 7 | + option x = 01234567; | = note: octal literals are prefixed with `0`, not `0o` error: unsupported base for integer literal - --> testdata/parser/option/exotic_base.proto:22:12 + --> testdata/parser/option/exotic_base.proto:8:12 help: remove the `o` | -22 | - option x = 0O1234567; -22 | + option x = 01234567; + 8 | - option x = 0O1234567; + 8 | + option x = 01234567; | = note: octal literals are prefixed with `0`, not `0o` error: unsupported base for floating-point literal - --> testdata/parser/option/exotic_base.proto:24:12 + --> testdata/parser/option/exotic_base.proto:10:12 | -24 | option x = 0x10203.4; +10 | option x = 0x10203.4; | ^^^^^^^^^ = note: Protobuf does not support hexadecimal floating-point literals error: unsupported base for floating-point literal - --> testdata/parser/option/exotic_base.proto:25:12 + --> testdata/parser/option/exotic_base.proto:11:12 | -25 | option x = 0X12.ffP10; +11 | option x = 0X12.ffP10; | ^^^^^^^^^^ = note: Protobuf does not support hexadecimal floating-point literals diff --git a/experimental/parser/testdata/parser/option/ok.proto b/experimental/parser/testdata/parser/option/ok.proto index 323a7fa20..42a1bf5fa 100644 --- a/experimental/parser/testdata/parser/option/ok.proto +++ b/experimental/parser/testdata/parser/option/ok.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/option/thousands.proto b/experimental/parser/testdata/parser/option/thousands.proto index 0aa0e839d..0f58a52f6 100644 --- a/experimental/parser/testdata/parser/option/thousands.proto +++ b/experimental/parser/testdata/parser/option/thousands.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/option/thousands.proto.stderr.txt b/experimental/parser/testdata/parser/option/thousands.proto.stderr.txt index b04572d1b..165e5f209 100644 --- a/experimental/parser/testdata/parser/option/thousands.proto.stderr.txt +++ b/experimental/parser/testdata/parser/option/thousands.proto.stderr.txt @@ -1,54 +1,54 @@ error: integer literal contains underscores - --> testdata/parser/option/thousands.proto:19:12 + --> testdata/parser/option/thousands.proto:5:12 help: remove these underscores | -19 | - option x = 1_000_000; -19 | + option x = 1000000; + 5 | - option x = 1_000_000; + 5 | + option x = 1000000; | = note: Protobuf does not support Go/Java/Rust-style thousands separators error: unsupported base for integer literal - --> testdata/parser/option/thousands.proto:20:12 + --> testdata/parser/option/thousands.proto:6:12 help: use a hexadecimal literal instead | -20 | - option x = 0b1_000_000; -20 | + option x = 0x40; + 6 | - option x = 0b1_000_000; + 6 | + option x = 0x40; | = note: Protobuf does not support binary literals error: unsupported base for integer literal - --> testdata/parser/option/thousands.proto:21:12 + --> testdata/parser/option/thousands.proto:7:12 help: remove the `o` | -21 | - option x = 0o1_000_000; -21 | + option x = 01_000_000; + 7 | - option x = 0o1_000_000; + 7 | + option x = 01_000_000; | = note: octal literals are prefixed with `0`, not `0o` error: integer literal contains underscores - --> testdata/parser/option/thousands.proto:22:12 + --> testdata/parser/option/thousands.proto:8:12 help: remove these underscores | -22 | - option x = 0x1_000_000; -22 | + option x = 0x1000000; + 8 | - option x = 0x1_000_000; + 8 | + option x = 0x1000000; | = note: Protobuf does not support Go/Java/Rust-style thousands separators error: integer literal contains underscores - --> testdata/parser/option/thousands.proto:23:12 + --> testdata/parser/option/thousands.proto:9:12 help: remove these underscores | -23 | - option x = 01_000_000; -23 | + option x = 01000000; + 9 | - option x = 01_000_000; + 9 | + option x = 01000000; | = note: Protobuf does not support Go/Java/Rust-style thousands separators error: floating-point literal contains underscores - --> testdata/parser/option/thousands.proto:24:12 + --> testdata/parser/option/thousands.proto:10:12 help: remove these underscores | -24 | - option x = 1_000_000.00; -24 | + option x = 1000000.00; +10 | - option x = 1_000_000.00; +10 | + option x = 1000000.00; | = note: Protobuf does not support Go/Java/Rust-style thousands separators diff --git a/experimental/parser/testdata/parser/option/values.proto b/experimental/parser/testdata/parser/option/values.proto index 108770a32..e85273881 100644 --- a/experimental/parser/testdata/parser/option/values.proto +++ b/experimental/parser/testdata/parser/option/values.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/option/values.proto.stderr.txt b/experimental/parser/testdata/parser/option/values.proto.stderr.txt index 8838a7f62..802efece8 100644 --- a/experimental/parser/testdata/parser/option/values.proto.stderr.txt +++ b/experimental/parser/testdata/parser/option/values.proto.stderr.txt @@ -1,48 +1,48 @@ error: unexpected range expression in option setting value - --> testdata/parser/option/values.proto:32:12 + --> testdata/parser/option/values.proto:18:12 | -32 | option x = x to y; +18 | option x = x to y; | ^^^^^^ error: unexpected array expression in option setting value - --> testdata/parser/option/values.proto:34:12 + --> testdata/parser/option/values.proto:20:12 | -34 | option x = []; +20 | option x = []; | ^^ help: delete this option; an empty array expression has no effect | -34 | - option x = []; +20 | - option x = []; | = note: array expressions can only appear inside of message expressions error: unexpected array expression in option setting value - --> testdata/parser/option/values.proto:35:12 + --> testdata/parser/option/values.proto:21:12 | -35 | option x = [1]; +21 | option x = [1]; | ^^^ help: delete the brackets; this is equivalent for repeated fields | -35 | - option x = [1]; -35 | + option x = 1; +21 | - option x = [1]; +21 | + option x = 1; | = note: array expressions can only appear inside of message expressions error: unexpected array expression in option setting value - --> testdata/parser/option/values.proto:36:12 + --> testdata/parser/option/values.proto:22:12 | -36 | option x = [1, 2]; +22 | option x = [1, 2]; | ^^^^^^ = note: array expressions can only appear inside of message expressions error: cannot use `<...>` for message expression here - --> testdata/parser/option/values.proto:38:12 + --> testdata/parser/option/values.proto:24:12 | -38 | option x = <>: +24 | option x = <>: | ^^ help: use `{...}` instead | -38 | - option x = <>: -38 | + option x = {}: +24 | - option x = <>: +24 | + option x = {}: | = note: `<...>` are only permitted for sub-messages within a message expression, but as top-level option values @@ -50,31 +50,31 @@ error: cannot use `<...>` for message expression here recommended error: unexpected `:` after definition - --> testdata/parser/option/values.proto:38:14 + --> testdata/parser/option/values.proto:24:14 | -38 | option x = <>: +24 | option x = <>: | ^ expected `;` | help: consider inserting a `;` | -38 | option x = <>;: +24 | option x = <>;: | + error: unexpected `:` in file scope - --> testdata/parser/option/values.proto:38:14 + --> testdata/parser/option/values.proto:24:14 | -38 | option x = <>: +24 | option x = <>: | ^ expected identifier, `;`, `.`, `(...)`, or `{...}` error: cannot use `<...>` for message expression here - --> testdata/parser/option/values.proto:39:12 + --> testdata/parser/option/values.proto:25:12 | -39 | option x = ; +25 | option x = ; | ^^^^^^^ help: use `{...}` instead | -39 | - option x = ; -39 | + option x = {a: 42}; +25 | - option x = ; +25 | + option x = {a: 42}; | = note: `<...>` are only permitted for sub-messages within a message expression, but as top-level option values @@ -82,66 +82,66 @@ error: cannot use `<...>` for message expression here recommended error: unexpected range expression in option setting value - --> testdata/parser/option/values.proto:57:8 + --> testdata/parser/option/values.proto:43:8 | -57 | x: x to y +43 | x: x to y | ^^^^^^ error: unexpected identifier in message expression - --> testdata/parser/option/values.proto:59:5 + --> testdata/parser/option/values.proto:45:5 | -59 | x +45 | x | ^ expected message field value warning: empty array expression has no effect - --> testdata/parser/option/values.proto:61:8 + --> testdata/parser/option/values.proto:47:8 | -61 | x: [] +47 | x: [] | ^^ help: delete this message field value | -61 | - x: [] +47 | - x: [] | = note: repeated fields do not distinguish "empty" and "missing" states error: nested array expressions are not allowed - --> testdata/parser/option/values.proto:64:18 + --> testdata/parser/option/values.proto:50:18 | -64 | x: [1, 2, 3, [4, 5, [6]]] +50 | x: [1, 2, 3, [4, 5, [6]]] | ----------^^^^^^^^^^^- ...within this array expression | | | cannot nest this array expression... error: nested array expressions are not allowed - --> testdata/parser/option/values.proto:66:9 + --> testdata/parser/option/values.proto:52:9 | -65 | x: [ +51 | x: [ | _______- -66 | / [1], +52 | / [1], | | ^^^ cannot nest this array expression... -67 | | ] +53 | | ] | \_____- ...within this array expression error: unexpected trailing `,` in array expression - --> testdata/parser/option/values.proto:66:12 + --> testdata/parser/option/values.proto:52:12 | -66 | [1], +52 | [1], | ^ help: delete this `,` | -66 | - [1], -66 | + [1] +52 | - [1], +52 | + [1] | warning: using `<...>` for message expression is not recommended - --> testdata/parser/option/values.proto:69:8 + --> testdata/parser/option/values.proto:55:8 | -69 | x: <> +55 | x: <> | ^^ help: use `{...}` instead | -69 | - x: <> -69 | + x: {} +55 | - x: <> +55 | + x: {} | = note: `<...>` are only permitted for sub-messages within a message expression, but as top-level option values @@ -149,14 +149,14 @@ warning: using `<...>` for message expression is not recommended recommended warning: using `<...>` for message expression is not recommended - --> testdata/parser/option/values.proto:70:8 + --> testdata/parser/option/values.proto:56:8 | -70 | x: +56 | x: | ^^^^^^^ help: use `{...}` instead | -70 | - x: -70 | + x: {a: 42} +56 | - x: +56 | + x: {a: 42} | = note: `<...>` are only permitted for sub-messages within a message expression, but as top-level option values @@ -164,14 +164,14 @@ warning: using `<...>` for message expression is not recommended recommended warning: using `<...>` for message expression is not recommended - --> testdata/parser/option/values.proto:71:8 + --> testdata/parser/option/values.proto:57:8 | -71 | x: > +57 | x: > | ^^^^^^^^^^^^ help: use `{...}` instead | -71 | - x: > -71 | + x: {a: } +57 | - x: > +57 | + x: {a: } | = note: `<...>` are only permitted for sub-messages within a message expression, but as top-level option values @@ -179,14 +179,14 @@ warning: using `<...>` for message expression is not recommended recommended warning: using `<...>` for message expression is not recommended - --> testdata/parser/option/values.proto:71:12 + --> testdata/parser/option/values.proto:57:12 | -71 | x: > +57 | x: > | ^^^^^^^ help: use `{...}` instead | -71 | - x: > -71 | + x: +57 | - x: > +57 | + x: | = note: `<...>` are only permitted for sub-messages within a message expression, but as top-level option values @@ -194,14 +194,14 @@ warning: using `<...>` for message expression is not recommended recommended warning: using `<...>` for message expression is not recommended - --> testdata/parser/option/values.proto:75:7 + --> testdata/parser/option/values.proto:61:7 | -75 | x +61 | x | ^^^^^^^ help: use `{...}` instead | -75 | - x -75 | + x {a: 42} +61 | - x +61 | + x {a: 42} | = note: `<...>` are only permitted for sub-messages within a message expression, but as top-level option values @@ -209,14 +209,14 @@ warning: using `<...>` for message expression is not recommended recommended warning: using `<...>` for message expression is not recommended - --> testdata/parser/option/values.proto:76:7 + --> testdata/parser/option/values.proto:62:7 | -76 | x +62 | x | ^^^^^^^^^^^^^^ help: use `{...}` instead | -76 | - x -76 | + x {a: 42, b: 43} +62 | - x +62 | + x {a: 42, b: 43} | = note: `<...>` are only permitted for sub-messages within a message expression, but as top-level option values @@ -224,93 +224,93 @@ warning: using `<...>` for message expression is not recommended recommended error: unexpected identifier in message expression - --> testdata/parser/option/values.proto:80:5 + --> testdata/parser/option/values.proto:66:5 | -80 | x3 17 to {} +66 | x3 17 to {} | ^^ expected message field value error: unexpected integer literal in message expression - --> testdata/parser/option/values.proto:80:8 + --> testdata/parser/option/values.proto:66:8 | -80 | x3 17 to {} +66 | x3 17 to {} | ^^ expected message field value error: unexpected range expression in option setting value - --> testdata/parser/option/values.proto:81:8 + --> testdata/parser/option/values.proto:67:8 | -81 | x4 {} to 91 +67 | x4 {} to 91 | ^^^^^^^^ error: cannot name extension field using `(...)` in message expression - --> testdata/parser/option/values.proto:91:5 + --> testdata/parser/option/values.proto:77:5 | -91 | (x.y): 42 +77 | (x.y): 42 | ^^^^^ expected this to be wrapped in `[...]` instead | help: replace the `(...)` with `[...]` | -91 | - (x.y): 42 -91 | + [x.y]: 42 +77 | - (x.y): 42 +77 | + [x.y]: 42 | error: unexpected absolute path in extension name - --> testdata/parser/option/values.proto:96:6 + --> testdata/parser/option/values.proto:82:6 | -96 | [.x.y]: 42 +82 | [.x.y]: 42 | ^^^^ expected a path without a leading `.` | help: remove the leading `.` | -96 | - [.x.y]: 42 -96 | + [x.y]: 42 +82 | - [.x.y]: 42 +82 | + [x.y]: 42 | error: unexpected array expression in message field value - --> testdata/parser/option/values.proto:97:5 + --> testdata/parser/option/values.proto:83:5 | -97 | [x, y, z]: 42 +83 | [x, y, z]: 42 | ^^^^^^^^^ | | | expected message field name, extension name, or `Any` type URL error: unexpected array expression in message field value - --> testdata/parser/option/values.proto:98:5 + --> testdata/parser/option/values.proto:84:5 | -98 | []: 42 +84 | []: 42 | ^^ expected message field name, extension name, or `Any` type URL error: type URL can only contain a single `/` - --> testdata/parser/option/values.proto:100:17 - | -100 | [buf.build/x/y]: 42 - | - ^ - | | - | first one is here + --> testdata/parser/option/values.proto:86:17 + | +86 | [buf.build/x/y]: 42 + | - ^ + | | + | first one is here error: unexpected integer literal in array expression - --> testdata/parser/option/values.proto:102:16 - | -102 | x [{x: 5}, 1, , 2, 3], - | - ^ expected message expression - | | - | because this message field value is missing a `:` - | - = note: the `:` can be omitted in a message field value, but only if the - value is a message expression or a array expression of them + --> testdata/parser/option/values.proto:88:16 + | +88 | x [{x: 5}, 1, , 2, 3], + | - ^ expected message expression + | | + | because this message field value is missing a `:` + | + = note: the `:` can be omitted in a message field value, but only if the + value is a message expression or a array expression of them warning: using `<...>` for message expression is not recommended - --> testdata/parser/option/values.proto:102:19 - | -102 | x [{x: 5}, 1, , 2, 3], - | ^^^^^^ - help: use `{...}` instead - | -102 | - x [{x: 5}, 1, , 2, 3], -102 | + x [{x: 5}, 1, {x: 5}, 2, 3], - | - = note: `<...>` are only permitted for sub-messages within a message - expression, but as top-level option values - = help: `<...>` message expressions are an obscure feature and not - recommended + --> testdata/parser/option/values.proto:88:19 + | +88 | x [{x: 5}, 1, , 2, 3], + | ^^^^^^ + help: use `{...}` instead + | +88 | - x [{x: 5}, 1, , 2, 3], +88 | + x [{x: 5}, 1, {x: 5}, 2, 3], + | + = note: `<...>` are only permitted for sub-messages within a message + expression, but as top-level option values + = help: `<...>` message expressions are an obscure feature and not + recommended encountered 22 errors and 8 warnings diff --git a/experimental/parser/testdata/parser/package/42.proto b/experimental/parser/testdata/parser/package/42.proto index 38205e3c3..f928cc207 100644 --- a/experimental/parser/testdata/parser/package/42.proto +++ b/experimental/parser/testdata/parser/package/42.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; // TODO: This produces a less-than-ideal diagnostic, but it's not an diff --git a/experimental/parser/testdata/parser/package/42.proto.stderr.txt b/experimental/parser/testdata/parser/package/42.proto.stderr.txt index ad1f7612e..6d71f75ae 100644 --- a/experimental/parser/testdata/parser/package/42.proto.stderr.txt +++ b/experimental/parser/testdata/parser/package/42.proto.stderr.txt @@ -1,26 +1,26 @@ error: missing path in `package` declaration - --> testdata/parser/package/42.proto:21:1 + --> testdata/parser/package/42.proto:7:1 | -21 | package 42; + 7 | package 42; | ^^^^^^^ = help: to place a file in the unnamed package, omit the `package` declaration; however, using the unnamed package is discouraged error: unexpected integer literal after `package` declaration - --> testdata/parser/package/42.proto:21:9 + --> testdata/parser/package/42.proto:7:9 | -21 | package 42; + 7 | package 42; | ^^ expected `;` | help: consider inserting a `;` | -21 | package; 42; + 7 | package; 42; | + error: unexpected integer literal in file scope - --> testdata/parser/package/42.proto:21:9 + --> testdata/parser/package/42.proto:7:9 | -21 | package 42; + 7 | package 42; | ^^ expected identifier, `;`, `.`, `(...)`, or `{...}` encountered 3 errors diff --git a/experimental/parser/testdata/parser/package/absolute.proto b/experimental/parser/testdata/parser/package/absolute.proto index cce034703..7e902546d 100644 --- a/experimental/parser/testdata/parser/package/absolute.proto +++ b/experimental/parser/testdata/parser/package/absolute.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package .test.test2; diff --git a/experimental/parser/testdata/parser/package/absolute.proto.stderr.txt b/experimental/parser/testdata/parser/package/absolute.proto.stderr.txt index 4fde8a439..1cc92ec99 100644 --- a/experimental/parser/testdata/parser/package/absolute.proto.stderr.txt +++ b/experimental/parser/testdata/parser/package/absolute.proto.stderr.txt @@ -1,13 +1,13 @@ error: unexpected absolute path in `package` declaration - --> testdata/parser/package/absolute.proto:17:9 + --> testdata/parser/package/absolute.proto:3:9 | -17 | package .test.test2; + 3 | package .test.test2; | ^^^^^^^^^^^ expected a path without a leading `.` | help: remove the leading `.` | -17 | - package .test.test2; -17 | + package test.test2; + 3 | - package .test.test2; + 3 | + package test.test2; | encountered 1 error diff --git a/experimental/parser/testdata/parser/package/empty.proto b/experimental/parser/testdata/parser/package/empty.proto index bf69749ae..fddb20b36 100644 --- a/experimental/parser/testdata/parser/package/empty.proto +++ b/experimental/parser/testdata/parser/package/empty.proto @@ -1,15 +1 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; diff --git a/experimental/parser/testdata/parser/package/eof_after_kw.proto b/experimental/parser/testdata/parser/package/eof_after_kw.proto index 414587023..a528c12db 100644 --- a/experimental/parser/testdata/parser/package/eof_after_kw.proto +++ b/experimental/parser/testdata/parser/package/eof_after_kw.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package diff --git a/experimental/parser/testdata/parser/package/eof_after_kw.proto.stderr.txt b/experimental/parser/testdata/parser/package/eof_after_kw.proto.stderr.txt index 441314ad5..b700e0af6 100644 --- a/experimental/parser/testdata/parser/package/eof_after_kw.proto.stderr.txt +++ b/experimental/parser/testdata/parser/package/eof_after_kw.proto.stderr.txt @@ -1,15 +1,15 @@ error: missing path in `package` declaration - --> testdata/parser/package/eof_after_kw.proto:17:1 + --> testdata/parser/package/eof_after_kw.proto:3:1 | -17 | package + 3 | package | ^^^^^^^ = help: to place a file in the unnamed package, omit the `package` declaration; however, using the unnamed package is discouraged error: unexpected end-of-file in `package` declaration - --> testdata/parser/package/eof_after_kw.proto:17:8 + --> testdata/parser/package/eof_after_kw.proto:3:8 | -17 | package + 3 | package | ^ encountered 2 errors diff --git a/experimental/parser/testdata/parser/package/extension.proto b/experimental/parser/testdata/parser/package/extension.proto index 4c6102853..4f67e9d35 100644 --- a/experimental/parser/testdata/parser/package/extension.proto +++ b/experimental/parser/testdata/parser/package/extension.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test.(extension.path).test; diff --git a/experimental/parser/testdata/parser/package/extension.proto.stderr.txt b/experimental/parser/testdata/parser/package/extension.proto.stderr.txt index 206ecb4ea..00caafd9c 100644 --- a/experimental/parser/testdata/parser/package/extension.proto.stderr.txt +++ b/experimental/parser/testdata/parser/package/extension.proto.stderr.txt @@ -1,7 +1,7 @@ error: unexpected nested extension path in `package` declaration - --> testdata/parser/package/extension.proto:17:14 + --> testdata/parser/package/extension.proto:3:14 | -17 | package test.(extension.path).test; + 3 | package test.(extension.path).test; | ^^^^^^^^^^^^^^^^ encountered 1 error diff --git a/experimental/parser/testdata/parser/package/host_qualified.proto b/experimental/parser/testdata/parser/package/host_qualified.proto index 2e6ce6d35..da1273b22 100644 --- a/experimental/parser/testdata/parser/package/host_qualified.proto +++ b/experimental/parser/testdata/parser/package/host_qualified.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package buf.build/test.test2; diff --git a/experimental/parser/testdata/parser/package/host_qualified.proto.stderr.txt b/experimental/parser/testdata/parser/package/host_qualified.proto.stderr.txt index f4cb132c4..683e1b07b 100644 --- a/experimental/parser/testdata/parser/package/host_qualified.proto.stderr.txt +++ b/experimental/parser/testdata/parser/package/host_qualified.proto.stderr.txt @@ -1,7 +1,7 @@ error: unexpected `/` in path in `package` declaration - --> testdata/parser/package/host_qualified.proto:17:18 + --> testdata/parser/package/host_qualified.proto:3:18 | -17 | package buf.build/test.test2; + 3 | package buf.build/test.test2; | ^ help: replace this with a `.` encountered 1 error diff --git a/experimental/parser/testdata/parser/package/multi.proto b/experimental/parser/testdata/parser/package/multi.proto index 7ec9cb9d0..3c13601c2 100644 --- a/experimental/parser/testdata/parser/package/multi.proto +++ b/experimental/parser/testdata/parser/package/multi.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test.test2; diff --git a/experimental/parser/testdata/parser/package/no_path.proto b/experimental/parser/testdata/parser/package/no_path.proto index f09faf953..f358d585e 100644 --- a/experimental/parser/testdata/parser/package/no_path.proto +++ b/experimental/parser/testdata/parser/package/no_path.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package; \ No newline at end of file diff --git a/experimental/parser/testdata/parser/package/no_path.proto.stderr.txt b/experimental/parser/testdata/parser/package/no_path.proto.stderr.txt index 15a1e99fc..504cdccb8 100644 --- a/experimental/parser/testdata/parser/package/no_path.proto.stderr.txt +++ b/experimental/parser/testdata/parser/package/no_path.proto.stderr.txt @@ -1,7 +1,7 @@ error: missing path in `package` declaration - --> testdata/parser/package/no_path.proto:17:1 + --> testdata/parser/package/no_path.proto:3:1 | -17 | package; + 3 | package; | ^^^^^^^^ = help: to place a file in the unnamed package, omit the `package` declaration; however, using the unnamed package is discouraged diff --git a/experimental/parser/testdata/parser/package/nosemi.proto b/experimental/parser/testdata/parser/package/nosemi.proto index 858716333..1e419f7e1 100644 --- a/experimental/parser/testdata/parser/package/nosemi.proto +++ b/experimental/parser/testdata/parser/package/nosemi.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test diff --git a/experimental/parser/testdata/parser/package/nosemi.proto.stderr.txt b/experimental/parser/testdata/parser/package/nosemi.proto.stderr.txt index 468b59010..6c03014a1 100644 --- a/experimental/parser/testdata/parser/package/nosemi.proto.stderr.txt +++ b/experimental/parser/testdata/parser/package/nosemi.proto.stderr.txt @@ -1,12 +1,12 @@ error: unexpected end-of-file after `package` declaration - --> testdata/parser/package/nosemi.proto:17:13 + --> testdata/parser/package/nosemi.proto:3:13 | -17 | package test + 3 | package test | ^ expected `;` | help: consider inserting a `;` | -17 | package test; + 3 | package test; | + encountered 1 error diff --git a/experimental/parser/testdata/parser/package/options.proto b/experimental/parser/testdata/parser/package/options.proto index e37b9e63e..ab30bf5db 100644 --- a/experimental/parser/testdata/parser/package/options.proto +++ b/experimental/parser/testdata/parser/package/options.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test [(not.allowed) = "here"]; diff --git a/experimental/parser/testdata/parser/package/options.proto.stderr.txt b/experimental/parser/testdata/parser/package/options.proto.stderr.txt index 512000c87..163b7ebc2 100644 --- a/experimental/parser/testdata/parser/package/options.proto.stderr.txt +++ b/experimental/parser/testdata/parser/package/options.proto.stderr.txt @@ -1,7 +1,7 @@ error: `package` declaration cannot specify compact options - --> testdata/parser/package/options.proto:17:14 + --> testdata/parser/package/options.proto:3:14 | -17 | package test [(not.allowed) = "here"]; + 3 | package test [(not.allowed) = "here"]; | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this encountered 1 error diff --git a/experimental/parser/testdata/parser/package/single.proto b/experimental/parser/testdata/parser/package/single.proto index 9ff43bb3a..5b65bb0c3 100644 --- a/experimental/parser/testdata/parser/package/single.proto +++ b/experimental/parser/testdata/parser/package/single.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/package/too_big.proto b/experimental/parser/testdata/parser/package/too_big.proto index 7b5794e9a..452cbff20 100644 --- a/experimental/parser/testdata/parser/package/too_big.proto +++ b/experimental/parser/testdata/parser/package/too_big.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package thispackagenameconsistsof513bytes. diff --git a/experimental/parser/testdata/parser/package/too_big.proto.stderr.txt b/experimental/parser/testdata/parser/package/too_big.proto.stderr.txt index 418a1a4f2..31afc1741 100644 --- a/experimental/parser/testdata/parser/package/too_big.proto.stderr.txt +++ b/experimental/parser/testdata/parser/package/too_big.proto.stderr.txt @@ -1,9 +1,9 @@ error: path in `package` declaration is too large - --> testdata/parser/package/too_big.proto:17:9 + --> testdata/parser/package/too_big.proto:3:9 | -17 | package thispackagenameconsistsof513bytes. + 3 | package thispackagenameconsistsof513bytes. | ________^ -18 | / x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000; + 4 | / x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000; | \___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________^ = note: Protobuf imposes a limit of 512 bytes here diff --git a/experimental/parser/testdata/parser/package/too_long.proto b/experimental/parser/testdata/parser/package/too_long.proto index 89167650e..7250c1f16 100644 --- a/experimental/parser/testdata/parser/package/too_long.proto +++ b/experimental/parser/testdata/parser/package/too_long.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package thispathhas102components diff --git a/experimental/parser/testdata/parser/package/too_long.proto.stderr.txt b/experimental/parser/testdata/parser/package/too_long.proto.stderr.txt index 9c4b8d1bb..b60f38e4b 100644 --- a/experimental/parser/testdata/parser/package/too_long.proto.stderr.txt +++ b/experimental/parser/testdata/parser/package/too_long.proto.stderr.txt @@ -1,11 +1,11 @@ error: path in `package` declaration is too large - --> testdata/parser/package/too_long.proto:17:9 + --> testdata/parser/package/too_long.proto:3:9 | -17 | package thispathhas102components + 3 | package thispathhas102components | ________^ ... / -26 | | .a.a.a.a.a.a.a.a.a.a -27 | | .a.a.a.a.a.a.a.a.a.a.x; +12 | | .a.a.a.a.a.a.a.a.a.a +13 | | .a.a.a.a.a.a.a.a.a.a.x; | \__________________________^ = note: Protobuf imposes a limit of 101 components here diff --git a/experimental/parser/testdata/parser/range/escapes.proto b/experimental/parser/testdata/parser/range/escapes.proto index dac9827f8..6fb7ab702 100644 --- a/experimental/parser/testdata/parser/range/escapes.proto +++ b/experimental/parser/testdata/parser/range/escapes.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/range/escapes.proto.stderr.txt b/experimental/parser/testdata/parser/range/escapes.proto.stderr.txt index 57f30cffc..c59eddab7 100644 --- a/experimental/parser/testdata/parser/range/escapes.proto.stderr.txt +++ b/experimental/parser/testdata/parser/range/escapes.proto.stderr.txt @@ -1,31 +1,31 @@ warning: non-canonical string literal in reserved range - --> testdata/parser/range/escapes.proto:20:14 + --> testdata/parser/range/escapes.proto:6:14 | -20 | reserved "foo" "bar"; + 6 | reserved "foo" "bar"; | ^^^^^^^^^^^ help: replace it with a canonical string | -20 | - reserved "foo" "bar"; -20 | + reserved "foobar"; + 6 | - reserved "foo" "bar"; + 6 | + reserved "foobar"; | = note: Protobuf implicitly concatenates adjacent string literals, like C or Python; this can lead to surprising behavior error: reserved message field name is not a valid identifier - --> testdata/parser/range/escapes.proto:21:14 + --> testdata/parser/range/escapes.proto:7:14 | -21 | reserved "foo\n", "b\x61r"; + 7 | reserved "foo\n", "b\x61r"; | ^^^^^^^ warning: non-canonical string literal in reserved range - --> testdata/parser/range/escapes.proto:21:23 + --> testdata/parser/range/escapes.proto:7:23 | -21 | reserved "foo\n", "b\x61r"; + 7 | reserved "foo\n", "b\x61r"; | ^^^^^^^^ help: replace it with a canonical string | -21 | - reserved "foo\n", "b\x61r"; -21 | + reserved "foo\n", "bar"; + 7 | - reserved "foo\n", "b\x61r"; + 7 | + reserved "foo\n", "bar"; | encountered 1 error and 2 warnings diff --git a/experimental/parser/testdata/parser/range/extension_names.proto b/experimental/parser/testdata/parser/range/extension_names.proto index 9f7868f89..d04fcc817 100644 --- a/experimental/parser/testdata/parser/range/extension_names.proto +++ b/experimental/parser/testdata/parser/range/extension_names.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/range/extension_names.proto.stderr.txt b/experimental/parser/testdata/parser/range/extension_names.proto.stderr.txt index 9b5d31e4b..4d6bbdfdf 100644 --- a/experimental/parser/testdata/parser/range/extension_names.proto.stderr.txt +++ b/experimental/parser/testdata/parser/range/extension_names.proto.stderr.txt @@ -1,7 +1,7 @@ error: unexpected string literal in extension range - --> testdata/parser/range/extension_names.proto:20:21 + --> testdata/parser/range/extension_names.proto:6:21 | -20 | extensions foo, "bar"; + 6 | extensions foo, "bar"; | ^^^^^ expected range expression or integer literal encountered 1 error diff --git a/experimental/parser/testdata/parser/range/invalid_exprs.proto b/experimental/parser/testdata/parser/range/invalid_exprs.proto index 699b4dcc0..4e5c3445c 100644 --- a/experimental/parser/testdata/parser/range/invalid_exprs.proto +++ b/experimental/parser/testdata/parser/range/invalid_exprs.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/range/invalid_exprs.proto.stderr.txt b/experimental/parser/testdata/parser/range/invalid_exprs.proto.stderr.txt index 4e63f74b2..95fd8c482 100644 --- a/experimental/parser/testdata/parser/range/invalid_exprs.proto.stderr.txt +++ b/experimental/parser/testdata/parser/range/invalid_exprs.proto.stderr.txt @@ -1,21 +1,21 @@ error: unexpected message expression in extension range - --> testdata/parser/range/invalid_exprs.proto:20:16 + --> testdata/parser/range/invalid_exprs.proto:6:16 | -20 | extensions {}; + 6 | extensions {}; | ^^ expected range expression or integer literal error: unexpected message expression in reserved range - --> testdata/parser/range/invalid_exprs.proto:21:14 + --> testdata/parser/range/invalid_exprs.proto:7:14 | -21 | reserved {}; + 7 | reserved {}; | ^^ | | | expected range expression, string literal, or integer literal error: unexpected string literal in extension range - --> testdata/parser/range/invalid_exprs.proto:23:16 + --> testdata/parser/range/invalid_exprs.proto:9:16 | -23 | extensions "foo", -"bar", "foo" to "bar"; + 9 | extensions "foo", -"bar", "foo" to "bar"; | ^^^^^ expected range expression or integer literal encountered 3 errors diff --git a/experimental/parser/testdata/parser/range/invalid_parent.proto b/experimental/parser/testdata/parser/range/invalid_parent.proto index 6554872e9..0708becbf 100644 --- a/experimental/parser/testdata/parser/range/invalid_parent.proto +++ b/experimental/parser/testdata/parser/range/invalid_parent.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/range/invalid_parent.proto.stderr.txt b/experimental/parser/testdata/parser/range/invalid_parent.proto.stderr.txt index 3ab0ff57c..468bb6a8f 100644 --- a/experimental/parser/testdata/parser/range/invalid_parent.proto.stderr.txt +++ b/experimental/parser/testdata/parser/range/invalid_parent.proto.stderr.txt @@ -1,60 +1,60 @@ error: unexpected extension range within service definition - --> testdata/parser/range/invalid_parent.proto:20:5 + --> testdata/parser/range/invalid_parent.proto:6:5 | -19 | / service Foo { -20 | | extensions 1; + 5 | / service Foo { + 6 | | extensions 1; | | ^^^^^^^^^^^^^ this extension range... -21 | | reserved 1; -22 | | } + 7 | | reserved 1; + 8 | | } | \_- ...cannot be declared within this service definition | = help: this extension range can only appear within a message definition error: unexpected reserved range within service definition - --> testdata/parser/range/invalid_parent.proto:21:5 + --> testdata/parser/range/invalid_parent.proto:7:5 | -19 | / service Foo { -20 | | extensions 1; -21 | | reserved 1; + 5 | / service Foo { + 6 | | extensions 1; + 7 | | reserved 1; | | ^^^^^^^^^^^ this reserved range... -22 | | } + 8 | | } | \_- ...cannot be declared within this service definition | = help: this reserved range can only appear within one of message definition or enum definition error: unexpected extension range within message extension block - --> testdata/parser/range/invalid_parent.proto:25:5 + --> testdata/parser/range/invalid_parent.proto:11:5 | -24 | / extend Foo { -25 | | extensions 1; +10 | / extend Foo { +11 | | extensions 1; | | ^^^^^^^^^^^^^ this extension range... -26 | | reserved 1; -27 | | } +12 | | reserved 1; +13 | | } | \_- ...cannot be declared within this message extension block | = help: this extension range can only appear within a message definition error: unexpected reserved range within message extension block - --> testdata/parser/range/invalid_parent.proto:26:5 + --> testdata/parser/range/invalid_parent.proto:12:5 | -24 | / extend Foo { -25 | | extensions 1; -26 | | reserved 1; +10 | / extend Foo { +11 | | extensions 1; +12 | | reserved 1; | | ^^^^^^^^^^^ this reserved range... -27 | | } +13 | | } | \_- ...cannot be declared within this message extension block | = help: this reserved range can only appear within one of message definition or enum definition error: unexpected extension range within enum definition - --> testdata/parser/range/invalid_parent.proto:30:5 + --> testdata/parser/range/invalid_parent.proto:16:5 | -29 | / enum Foo { -30 | | extensions 1; +15 | / enum Foo { +16 | | extensions 1; | | ^^^^^^^^^^^^^ this extension range... -31 | | } +17 | | } | \_- ...cannot be declared within this enum definition | = help: this extension range can only appear within a message definition diff --git a/experimental/parser/testdata/parser/range/ok.proto b/experimental/parser/testdata/parser/range/ok.proto index 4111f6361..cf2f75820 100644 --- a/experimental/parser/testdata/parser/range/ok.proto +++ b/experimental/parser/testdata/parser/range/ok.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/range/options.proto b/experimental/parser/testdata/parser/range/options.proto index d796357d6..34cfdcae5 100644 --- a/experimental/parser/testdata/parser/range/options.proto +++ b/experimental/parser/testdata/parser/range/options.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/range/options.proto.stderr.txt b/experimental/parser/testdata/parser/range/options.proto.stderr.txt index c11ac9730..fd4f5781d 100644 --- a/experimental/parser/testdata/parser/range/options.proto.stderr.txt +++ b/experimental/parser/testdata/parser/range/options.proto.stderr.txt @@ -1,7 +1,7 @@ error: reserved range cannot specify compact options - --> testdata/parser/range/options.proto:21:16 + --> testdata/parser/range/options.proto:7:16 | -21 | reserved 1 [(allowed) = false]; + 7 | reserved 1 [(allowed) = false]; | ^^^^^^^^^^^^^^^^^^^ help: remove this encountered 1 error diff --git a/experimental/parser/testdata/parser/range/reserved_default_syntax.proto b/experimental/parser/testdata/parser/range/reserved_default_syntax.proto index 605ea40d3..4901fa5fd 100644 --- a/experimental/parser/testdata/parser/range/reserved_default_syntax.proto +++ b/experimental/parser/testdata/parser/range/reserved_default_syntax.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/range/reserved_default_syntax.proto.stderr.txt b/experimental/parser/testdata/parser/range/reserved_default_syntax.proto.stderr.txt index 54aca7ce1..771a55722 100644 --- a/experimental/parser/testdata/parser/range/reserved_default_syntax.proto.stderr.txt +++ b/experimental/parser/testdata/parser/range/reserved_default_syntax.proto.stderr.txt @@ -1,14 +1,14 @@ error: cannot use identifiers in reserved range in syntax mode - --> testdata/parser/range/reserved_default_syntax.proto:20:14 + --> testdata/parser/range/reserved_default_syntax.proto:6:14 | -15 | syntax = "proto2"; + 1 | syntax = "proto2"; | ------------------ syntax mode is specified here ... -20 | reserved foo, "foo"; + 6 | reserved foo, "foo"; | ^^^ help: quote it to make it into a string literal | -20 | reserved "foo", "foo"; + 6 | reserved "foo", "foo"; | + + encountered 1 error diff --git a/experimental/parser/testdata/parser/range/reserved_edition.proto b/experimental/parser/testdata/parser/range/reserved_edition.proto index 820ce86df..06cdb59aa 100644 --- a/experimental/parser/testdata/parser/range/reserved_edition.proto +++ b/experimental/parser/testdata/parser/range/reserved_edition.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package test; diff --git a/experimental/parser/testdata/parser/range/reserved_edition.proto.stderr.txt b/experimental/parser/testdata/parser/range/reserved_edition.proto.stderr.txt index a37d6a938..4162330f7 100644 --- a/experimental/parser/testdata/parser/range/reserved_edition.proto.stderr.txt +++ b/experimental/parser/testdata/parser/range/reserved_edition.proto.stderr.txt @@ -1,15 +1,15 @@ error: cannot use string literals in reserved range in editions mode - --> testdata/parser/range/reserved_edition.proto:20:19 + --> testdata/parser/range/reserved_edition.proto:6:19 | -15 | edition = "2023"; + 1 | edition = "2023"; | ----------------- editions mode is specified here ... -20 | reserved foo, "foo"; + 6 | reserved foo, "foo"; | ^^^^^ help: replace this with an identifier | -20 | - reserved foo, "foo"; -20 | + reserved foo, foo; + 6 | - reserved foo, "foo"; + 6 | + reserved foo, foo; | encountered 1 error diff --git a/experimental/parser/testdata/parser/range/reserved_mixed.proto b/experimental/parser/testdata/parser/range/reserved_mixed.proto index 07925dc18..79f7ca0c2 100644 --- a/experimental/parser/testdata/parser/range/reserved_mixed.proto +++ b/experimental/parser/testdata/parser/range/reserved_mixed.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/range/reserved_mixed.proto.stderr.txt b/experimental/parser/testdata/parser/range/reserved_mixed.proto.stderr.txt index 0f3932291..493eef889 100644 --- a/experimental/parser/testdata/parser/range/reserved_mixed.proto.stderr.txt +++ b/experimental/parser/testdata/parser/range/reserved_mixed.proto.stderr.txt @@ -1,76 +1,76 @@ error: cannot mix tags and names in reserved range - --> testdata/parser/range/reserved_mixed.proto:20:17 + --> testdata/parser/range/reserved_mixed.proto:6:17 | -20 | reserved 5, "foo"; + 6 | reserved 5, "foo"; | - ^^^^^ this field name must go in its own reserved range | | | but expected a field tag because of this | help: split the reserved range | -20 | - reserved 5, "foo"; -20 | + reserved 5; -21 | + reserved "foo"; + 6 | - reserved 5, "foo"; + 6 | + reserved 5; + 7 | + reserved "foo"; | error: cannot mix tags and names in reserved range - --> testdata/parser/range/reserved_mixed.proto:21:21 + --> testdata/parser/range/reserved_mixed.proto:7:21 | -21 | reserved "foo", 5; + 7 | reserved "foo", 5; | ----- ^ this field tag must go in its own reserved range | | | but expected a field name because of this | help: split the reserved range | -21 | - reserved "foo", 5; -21 | + reserved "foo"; -22 | + reserved 5; + 7 | - reserved "foo", 5; + 7 | + reserved "foo"; + 8 | + reserved 5; | error: cannot mix tags and names in reserved range - --> testdata/parser/range/reserved_mixed.proto:22:17 + --> testdata/parser/range/reserved_mixed.proto:8:17 | -22 | reserved 5, "foo", 5; + 8 | reserved 5, "foo", 5; | - ^^^^^ this field name must go in its own reserved range | | | but expected a field tag because of this | help: split the reserved range | -22 | - reserved 5, "foo", 5; -22 | + reserved 5, 5; -23 | + reserved "foo"; + 8 | - reserved 5, "foo", 5; + 8 | + reserved 5, 5; + 9 | + reserved "foo"; | error: cannot mix tags and names in reserved range - --> testdata/parser/range/reserved_mixed.proto:23:21 + --> testdata/parser/range/reserved_mixed.proto:9:21 | -23 | reserved "foo", 5, "foo"; + 9 | reserved "foo", 5, "foo"; | ----- ^ this field tag must go in its own reserved range | | | but expected a field name because of this | help: split the reserved range | -23 | - reserved "foo", 5, "foo"; -23 | + reserved "foo", "foo"; -24 | + reserved 5; + 9 | - reserved "foo", 5, "foo"; + 9 | + reserved "foo", "foo"; +10 | + reserved 5; | error: cannot mix tags and names in reserved range - --> testdata/parser/range/reserved_mixed.proto:24:17 + --> testdata/parser/range/reserved_mixed.proto:10:17 | -24 | reserved 5, "foo", 5, "foo", 5, 5; +10 | reserved 5, "foo", 5, "foo", 5, 5; | - ^^^^^ this field name must go in its own reserved range | | | but expected a field tag because of this | help: split the reserved range | -24 | - reserved 5, "foo", 5, "foo", 5, 5; -24 | + reserved 5, 5, 5, 5; -25 | + reserved "foo", "foo"; +10 | - reserved 5, "foo", 5, "foo", 5, 5; +10 | + reserved 5, 5, 5, 5; +11 | + reserved "foo", "foo"; | encountered 5 errors diff --git a/experimental/parser/testdata/parser/range/reserved_syntax.proto b/experimental/parser/testdata/parser/range/reserved_syntax.proto index 605ea40d3..4901fa5fd 100644 --- a/experimental/parser/testdata/parser/range/reserved_syntax.proto +++ b/experimental/parser/testdata/parser/range/reserved_syntax.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/range/reserved_syntax.proto.stderr.txt b/experimental/parser/testdata/parser/range/reserved_syntax.proto.stderr.txt index 7b783f53c..581c928ed 100644 --- a/experimental/parser/testdata/parser/range/reserved_syntax.proto.stderr.txt +++ b/experimental/parser/testdata/parser/range/reserved_syntax.proto.stderr.txt @@ -1,14 +1,14 @@ error: cannot use identifiers in reserved range in syntax mode - --> testdata/parser/range/reserved_syntax.proto:20:14 + --> testdata/parser/range/reserved_syntax.proto:6:14 | -15 | syntax = "proto2"; + 1 | syntax = "proto2"; | ------------------ syntax mode is specified here ... -20 | reserved foo, "foo"; + 6 | reserved foo, "foo"; | ^^^ help: quote it to make it into a string literal | -20 | reserved "foo", "foo"; + 6 | reserved "foo", "foo"; | + + encountered 1 error diff --git a/experimental/parser/testdata/parser/syntax/2023.proto b/experimental/parser/testdata/parser/syntax/2023.proto index cf647afa0..e38eade17 100644 --- a/experimental/parser/testdata/parser/syntax/2023.proto +++ b/experimental/parser/testdata/parser/syntax/2023.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "2023"; package test; diff --git a/experimental/parser/testdata/parser/syntax/edition_invalid.proto b/experimental/parser/testdata/parser/syntax/edition_invalid.proto index cfe3bfb6e..6668e3cb2 100644 --- a/experimental/parser/testdata/parser/syntax/edition_invalid.proto +++ b/experimental/parser/testdata/parser/syntax/edition_invalid.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "invalid"; package test; diff --git a/experimental/parser/testdata/parser/syntax/edition_invalid.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/edition_invalid.proto.stderr.txt index edd576f84..c71a52258 100644 --- a/experimental/parser/testdata/parser/syntax/edition_invalid.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/edition_invalid.proto.stderr.txt @@ -1,7 +1,7 @@ error: unrecognized `edition` declaration value - --> testdata/parser/syntax/edition_invalid.proto:15:11 + --> testdata/parser/syntax/edition_invalid.proto:1:11 | -15 | edition = "invalid"; + 1 | edition = "invalid"; | ^^^^^^^^^ = note: treating the file as Edition 2023 instead = help: permitted values: "2023", "2024" diff --git a/experimental/parser/testdata/parser/syntax/edition_proto2.proto b/experimental/parser/testdata/parser/syntax/edition_proto2.proto index c09c56613..dd72785a3 100644 --- a/experimental/parser/testdata/parser/syntax/edition_proto2.proto +++ b/experimental/parser/testdata/parser/syntax/edition_proto2.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/syntax/edition_proto2.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/edition_proto2.proto.stderr.txt index 178a6fb22..0716ef2f2 100644 --- a/experimental/parser/testdata/parser/syntax/edition_proto2.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/edition_proto2.proto.stderr.txt @@ -1,12 +1,12 @@ error: "proto2" use the `syntax` keyword - --> testdata/parser/syntax/edition_proto2.proto:15:1 + --> testdata/parser/syntax/edition_proto2.proto:1:1 | -15 | edition = "proto2"; + 1 | edition = "proto2"; | ^^^^^^^ help: replace with `syntax` | -15 | - edition = "proto2"; -15 | + syntax = "proto2"; + 1 | - edition = "proto2"; + 1 | + syntax = "proto2"; | = help: "proto2" is technically an edition, but cannot use `edition` diff --git a/experimental/parser/testdata/parser/syntax/eof_after_eq.proto b/experimental/parser/testdata/parser/syntax/eof_after_eq.proto index eda5ce740..14d82331a 100644 --- a/experimental/parser/testdata/parser/syntax/eof_after_eq.proto +++ b/experimental/parser/testdata/parser/syntax/eof_after_eq.proto @@ -1,15 +1 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = diff --git a/experimental/parser/testdata/parser/syntax/eof_after_eq.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/eof_after_eq.proto.stderr.txt index 3a85151c6..0f41f5046 100644 --- a/experimental/parser/testdata/parser/syntax/eof_after_eq.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/eof_after_eq.proto.stderr.txt @@ -4,9 +4,9 @@ warning: missing `package` declaration package; using it strongly is discouraged error: unexpected end-of-file in expression - --> testdata/parser/syntax/eof_after_eq.proto:15:9 + --> testdata/parser/syntax/eof_after_eq.proto:1:9 | -15 | syntax = + 1 | syntax = | ^ expected expression encountered 1 error and 1 warning diff --git a/experimental/parser/testdata/parser/syntax/eof_after_kw.proto b/experimental/parser/testdata/parser/syntax/eof_after_kw.proto index c985ca415..71c0ff728 100644 --- a/experimental/parser/testdata/parser/syntax/eof_after_kw.proto +++ b/experimental/parser/testdata/parser/syntax/eof_after_kw.proto @@ -1,15 +1 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax diff --git a/experimental/parser/testdata/parser/syntax/eof_after_kw.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/eof_after_kw.proto.stderr.txt index 7d8e7e6ff..82d5ee691 100644 --- a/experimental/parser/testdata/parser/syntax/eof_after_kw.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/eof_after_kw.proto.stderr.txt @@ -4,9 +4,9 @@ warning: missing `package` declaration package; using it strongly is discouraged error: unexpected end-of-file in `syntax` declaration - --> testdata/parser/syntax/eof_after_kw.proto:15:7 + --> testdata/parser/syntax/eof_after_kw.proto:1:7 | -15 | syntax + 1 | syntax | ^ encountered 1 error and 1 warning diff --git a/experimental/parser/testdata/parser/syntax/invalid.proto b/experimental/parser/testdata/parser/syntax/invalid.proto index 7f4235969..7a179b7d4 100644 --- a/experimental/parser/testdata/parser/syntax/invalid.proto +++ b/experimental/parser/testdata/parser/syntax/invalid.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = invalid; package test; diff --git a/experimental/parser/testdata/parser/syntax/invalid.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/invalid.proto.stderr.txt index 5a0d878af..7e0c2d893 100644 --- a/experimental/parser/testdata/parser/syntax/invalid.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/invalid.proto.stderr.txt @@ -1,7 +1,7 @@ error: unrecognized `syntax` declaration value - --> testdata/parser/syntax/invalid.proto:15:10 + --> testdata/parser/syntax/invalid.proto:1:10 | -15 | syntax = invalid; + 1 | syntax = invalid; | ^^^^^^^ = note: treating the file as "proto2" instead = help: permitted values: "proto2", "proto3" diff --git a/experimental/parser/testdata/parser/syntax/lonely.proto b/experimental/parser/testdata/parser/syntax/lonely.proto index 6fe7ab10e..904d7c2f4 100644 --- a/experimental/parser/testdata/parser/syntax/lonely.proto +++ b/experimental/parser/testdata/parser/syntax/lonely.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition; syntax = ; diff --git a/experimental/parser/testdata/parser/syntax/lonely.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/lonely.proto.stderr.txt index baaadc60f..314caaca1 100644 --- a/experimental/parser/testdata/parser/syntax/lonely.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/lonely.proto.stderr.txt @@ -4,43 +4,43 @@ warning: missing `package` declaration package; using it strongly is discouraged error: unexpected `;` in `edition` declaration - --> testdata/parser/syntax/lonely.proto:15:8 + --> testdata/parser/syntax/lonely.proto:1:8 | -15 | edition; + 1 | edition; | ^ expected `=` | help: consider inserting a `=` | -15 | edition = ; + 1 | edition = ; | +++ error: unexpected `syntax` declaration - --> testdata/parser/syntax/lonely.proto:17:1 + --> testdata/parser/syntax/lonely.proto:3:1 | -15 | edition; + 1 | edition; | -------- previous declaration is here -16 | -17 | syntax = ; + 2 | + 3 | syntax = ; | ^^^^^^^^^^ help: remove this | -17 | - syntax = ; + 3 | - syntax = ; | = note: a file may contain at most one `syntax` or `edition` declaration error: unexpected `;` in `syntax` declaration - --> testdata/parser/syntax/lonely.proto:17:10 + --> testdata/parser/syntax/lonely.proto:3:10 | -17 | syntax = ; + 3 | syntax = ; | ^ expected expression warning: the `package` declaration should be placed at the top of the file - --> testdata/parser/syntax/lonely.proto:19:1 + --> testdata/parser/syntax/lonely.proto:5:1 | -17 | syntax = ; + 3 | syntax = ; | ---------- previous declaration is here -18 | -19 | package test; + 4 | + 5 | package test; | ^^^^^^^^^^^^^ = help: a file's `package` declaration should immediately follow the `syntax` or `edition` declaration diff --git a/experimental/parser/testdata/parser/syntax/missing.proto b/experimental/parser/testdata/parser/syntax/missing.proto index b915535a9..4ebb7a319 100644 --- a/experimental/parser/testdata/parser/syntax/missing.proto +++ b/experimental/parser/testdata/parser/syntax/missing.proto @@ -1,15 +1 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package test; diff --git a/experimental/parser/testdata/parser/syntax/nosemi.proto b/experimental/parser/testdata/parser/syntax/nosemi.proto index 14aa6ee49..01d1c7d82 100644 --- a/experimental/parser/testdata/parser/syntax/nosemi.proto +++ b/experimental/parser/testdata/parser/syntax/nosemi.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2" package test; diff --git a/experimental/parser/testdata/parser/syntax/nosemi.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/nosemi.proto.stderr.txt index 10c5748fe..ceb543601 100644 --- a/experimental/parser/testdata/parser/syntax/nosemi.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/nosemi.proto.stderr.txt @@ -1,12 +1,12 @@ error: unexpected `package` after `syntax` declaration - --> testdata/parser/syntax/nosemi.proto:17:1 + --> testdata/parser/syntax/nosemi.proto:3:1 | -17 | package test; + 3 | package test; | ^^^^^^^ expected `;` | help: consider inserting a `;` | -15 | syntax = "proto2"; + 1 | syntax = "proto2"; | + encountered 1 error diff --git a/experimental/parser/testdata/parser/syntax/not_first.proto b/experimental/parser/testdata/parser/syntax/not_first.proto index 8ea571928..e87a6ad44 100644 --- a/experimental/parser/testdata/parser/syntax/not_first.proto +++ b/experimental/parser/testdata/parser/syntax/not_first.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package test; syntax = "proto2"; \ No newline at end of file diff --git a/experimental/parser/testdata/parser/syntax/not_first.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/not_first.proto.stderr.txt index 01e09049b..3c159cb3a 100644 --- a/experimental/parser/testdata/parser/syntax/not_first.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/not_first.proto.stderr.txt @@ -1,10 +1,10 @@ error: unexpected `syntax` declaration - --> testdata/parser/syntax/not_first.proto:17:1 + --> testdata/parser/syntax/not_first.proto:3:1 | -15 | package test; + 1 | package test; | ------------- previous declaration is here -16 | -17 | syntax = "proto2"; + 2 | + 3 | syntax = "proto2"; | ^^^^^^^^^^^^^^^^^^ = note: a `syntax` declaration must be the first declaration in a file diff --git a/experimental/parser/testdata/parser/syntax/options.proto b/experimental/parser/testdata/parser/syntax/options.proto index f0ea4ff78..119ba296d 100644 --- a/experimental/parser/testdata/parser/syntax/options.proto +++ b/experimental/parser/testdata/parser/syntax/options.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2" [(not.allowed) = "here"]; package test; diff --git a/experimental/parser/testdata/parser/syntax/options.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/options.proto.stderr.txt index 55bb58e64..e0ad901da 100644 --- a/experimental/parser/testdata/parser/syntax/options.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/options.proto.stderr.txt @@ -1,7 +1,7 @@ error: `syntax` declaration cannot specify compact options - --> testdata/parser/syntax/options.proto:15:19 + --> testdata/parser/syntax/options.proto:1:19 | -15 | syntax = "proto2" [(not.allowed) = "here"]; + 1 | syntax = "proto2" [(not.allowed) = "here"]; | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this encountered 1 error diff --git a/experimental/parser/testdata/parser/syntax/proto2.proto b/experimental/parser/testdata/parser/syntax/proto2.proto index 9ff43bb3a..5b65bb0c3 100644 --- a/experimental/parser/testdata/parser/syntax/proto2.proto +++ b/experimental/parser/testdata/parser/syntax/proto2.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/syntax/proto2_escaped.proto b/experimental/parser/testdata/parser/syntax/proto2_escaped.proto index 1efa2c0d8..05840ab64 100644 --- a/experimental/parser/testdata/parser/syntax/proto2_escaped.proto +++ b/experimental/parser/testdata/parser/syntax/proto2_escaped.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto\x32"; package test; diff --git a/experimental/parser/testdata/parser/syntax/proto2_escaped.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/proto2_escaped.proto.stderr.txt index 736f68c4a..8ec9d5afa 100644 --- a/experimental/parser/testdata/parser/syntax/proto2_escaped.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/proto2_escaped.proto.stderr.txt @@ -1,12 +1,12 @@ warning: non-canonical string literal in `syntax` declaration - --> testdata/parser/syntax/proto2_escaped.proto:15:10 + --> testdata/parser/syntax/proto2_escaped.proto:1:10 | -15 | syntax = "proto\x32"; + 1 | syntax = "proto\x32"; | ^^^^^^^^^^^ help: replace it with a canonical string | -15 | - syntax = "proto\x32"; -15 | + syntax = "proto2"; + 1 | - syntax = "proto\x32"; + 1 | + syntax = "proto2"; | encountered 1 warning diff --git a/experimental/parser/testdata/parser/syntax/proto2_split.proto b/experimental/parser/testdata/parser/syntax/proto2_split.proto index 36f72cb87..7f0802e06 100644 --- a/experimental/parser/testdata/parser/syntax/proto2_split.proto +++ b/experimental/parser/testdata/parser/syntax/proto2_split.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto" "2"; package test; diff --git a/experimental/parser/testdata/parser/syntax/proto2_split.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/proto2_split.proto.stderr.txt index 9e58fb7d3..a0089569f 100644 --- a/experimental/parser/testdata/parser/syntax/proto2_split.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/proto2_split.proto.stderr.txt @@ -1,12 +1,12 @@ warning: non-canonical string literal in `syntax` declaration - --> testdata/parser/syntax/proto2_split.proto:15:10 + --> testdata/parser/syntax/proto2_split.proto:1:10 | -15 | syntax = "proto" "2"; + 1 | syntax = "proto" "2"; | ^^^^^^^^^^^ help: replace it with a canonical string | -15 | - syntax = "proto" "2"; -15 | + syntax = "proto2"; + 1 | - syntax = "proto" "2"; + 1 | + syntax = "proto2"; | = note: Protobuf implicitly concatenates adjacent string literals, like C or Python; this can lead to surprising behavior diff --git a/experimental/parser/testdata/parser/syntax/proto3.proto b/experimental/parser/testdata/parser/syntax/proto3.proto index d8019fb1c..2ab56027c 100644 --- a/experimental/parser/testdata/parser/syntax/proto3.proto +++ b/experimental/parser/testdata/parser/syntax/proto3.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; package test; diff --git a/experimental/parser/testdata/parser/syntax/proto4.proto b/experimental/parser/testdata/parser/syntax/proto4.proto index ecc3ef2cf..68bcab23c 100644 --- a/experimental/parser/testdata/parser/syntax/proto4.proto +++ b/experimental/parser/testdata/parser/syntax/proto4.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto4"; package test; diff --git a/experimental/parser/testdata/parser/syntax/proto4.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/proto4.proto.stderr.txt index 9bec12251..2588c8dd6 100644 --- a/experimental/parser/testdata/parser/syntax/proto4.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/proto4.proto.stderr.txt @@ -1,7 +1,7 @@ error: unrecognized `syntax` declaration value - --> testdata/parser/syntax/proto4.proto:15:10 + --> testdata/parser/syntax/proto4.proto:1:10 | -15 | syntax = "proto4"; + 1 | syntax = "proto4"; | ^^^^^^^^ = note: treating the file as "proto2" instead = help: permitted values: "proto2", "proto3" diff --git a/experimental/parser/testdata/parser/syntax/syntax_2023.proto b/experimental/parser/testdata/parser/syntax/syntax_2023.proto index 7991c836b..d19ebaf80 100644 --- a/experimental/parser/testdata/parser/syntax/syntax_2023.proto +++ b/experimental/parser/testdata/parser/syntax/syntax_2023.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "2023"; package test; diff --git a/experimental/parser/testdata/parser/syntax/syntax_2023.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/syntax_2023.proto.stderr.txt index 10958127d..1795c55a4 100644 --- a/experimental/parser/testdata/parser/syntax/syntax_2023.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/syntax_2023.proto.stderr.txt @@ -1,12 +1,12 @@ error: editions must use the `edition` keyword - --> testdata/parser/syntax/syntax_2023.proto:15:1 + --> testdata/parser/syntax/syntax_2023.proto:1:1 | -15 | syntax = "2023"; + 1 | syntax = "2023"; | ^^^^^^ help: replace with `edition` | -15 | - syntax = "2023"; -15 | + edition = "2023"; + 1 | - syntax = "2023"; + 1 | + edition = "2023"; | encountered 1 error diff --git a/experimental/parser/testdata/parser/syntax/unquoted.proto b/experimental/parser/testdata/parser/syntax/unquoted.proto index 8cc1eb88e..dfefc60bd 100644 --- a/experimental/parser/testdata/parser/syntax/unquoted.proto +++ b/experimental/parser/testdata/parser/syntax/unquoted.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = proto2; package test; \ No newline at end of file diff --git a/experimental/parser/testdata/parser/syntax/unquoted.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/unquoted.proto.stderr.txt index 7c33bcf0b..c7256fad5 100644 --- a/experimental/parser/testdata/parser/syntax/unquoted.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/unquoted.proto.stderr.txt @@ -1,11 +1,11 @@ error: the value of a `syntax` declaration must be a string literal - --> testdata/parser/syntax/unquoted.proto:15:10 + --> testdata/parser/syntax/unquoted.proto:1:10 | -15 | syntax = proto2; + 1 | syntax = proto2; | ^^^^^^ help: add quotes to make this a string literal | -15 | syntax = "proto2"; + 1 | syntax = "proto2"; | + + encountered 1 error diff --git a/experimental/parser/testdata/parser/syntax/unquoted_edition.proto b/experimental/parser/testdata/parser/syntax/unquoted_edition.proto index 573227d57..bc622798c 100644 --- a/experimental/parser/testdata/parser/syntax/unquoted_edition.proto +++ b/experimental/parser/testdata/parser/syntax/unquoted_edition.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - edition = 2023; package test; \ No newline at end of file diff --git a/experimental/parser/testdata/parser/syntax/unquoted_edition.proto.stderr.txt b/experimental/parser/testdata/parser/syntax/unquoted_edition.proto.stderr.txt index 366132b39..28a1e8d22 100644 --- a/experimental/parser/testdata/parser/syntax/unquoted_edition.proto.stderr.txt +++ b/experimental/parser/testdata/parser/syntax/unquoted_edition.proto.stderr.txt @@ -1,11 +1,11 @@ error: the value of a `edition` declaration must be a string literal - --> testdata/parser/syntax/unquoted_edition.proto:15:11 + --> testdata/parser/syntax/unquoted_edition.proto:1:11 | -15 | edition = 2023; + 1 | edition = 2023; | ^^^^ help: add quotes to make this a string literal | -15 | edition = "2023"; + 1 | edition = "2023"; | + + encountered 1 error diff --git a/experimental/parser/testdata/parser/type/generic.proto b/experimental/parser/testdata/parser/type/generic.proto index ce7668495..b9c048f6e 100644 --- a/experimental/parser/testdata/parser/type/generic.proto +++ b/experimental/parser/testdata/parser/type/generic.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/type/generic.proto.stderr.txt b/experimental/parser/testdata/parser/type/generic.proto.stderr.txt index ddf9a98c4..347e3bc5b 100644 --- a/experimental/parser/testdata/parser/type/generic.proto.stderr.txt +++ b/experimental/parser/testdata/parser/type/generic.proto.stderr.txt @@ -1,125 +1,125 @@ error: unexpected type in map value type - --> testdata/parser/type/generic.proto:23:17 + --> testdata/parser/type/generic.proto:9:17 | -23 | map> x4 = 4; + 9 | map> x4 = 4; | ^^^^^^^^^^^^^^^^^^^ expected type name error: generic types other than `map` are not supported - --> testdata/parser/type/generic.proto:25:5 + --> testdata/parser/type/generic.proto:11:5 | -25 | list x5 = 5; +11 | list x5 = 5; | ^^^^ error: generic types other than `map` are not supported - --> testdata/parser/type/generic.proto:26:5 + --> testdata/parser/type/generic.proto:12:5 | -26 | void<> x6 = 6; +12 | void<> x6 = 6; | ^^^^ error: generic types other than `map` are not supported - --> testdata/parser/type/generic.proto:28:5 + --> testdata/parser/type/generic.proto:14:5 | -28 | my.Map x7 = 7; +14 | my.Map x7 = 7; | ^^^^^^ error: unexpected type after `optional` - --> testdata/parser/type/generic.proto:30:14 + --> testdata/parser/type/generic.proto:16:14 | -30 | optional map x8 = 8; +16 | optional map x8 = 8; | ^^^^^^^^^^^^^^^^^^^ expected type name error: unexpected type after `repeated` - --> testdata/parser/type/generic.proto:31:14 + --> testdata/parser/type/generic.proto:17:14 | -31 | repeated map x9 = 9; +17 | repeated map x9 = 9; | ^^^^^^^^^^^^^^^^^^^ expected type name warning: required fields are deprecated - --> testdata/parser/type/generic.proto:32:5 + --> testdata/parser/type/generic.proto:18:5 | -32 | required map x10 = 10; +18 | required map x10 = 10; | ^^^^^^^^ = help: do not attempt to change this to `optional` if the field is already in-use; doing so is a wire protocol break error: unexpected type after `required` - --> testdata/parser/type/generic.proto:32:14 + --> testdata/parser/type/generic.proto:18:14 | -32 | required map x10 = 10; +18 | required map x10 = 10; | ^^^^^^^^^^^^^^^^^^^ expected type name error: unexpected `repeated` in map value type - --> testdata/parser/type/generic.proto:34:17 + --> testdata/parser/type/generic.proto:20:17 | -34 | map x11 = 11; +20 | map x11 = 11; | ^^^^^^^^ error: unexpected `required` in map value type - --> testdata/parser/type/generic.proto:35:27 + --> testdata/parser/type/generic.proto:21:27 | -35 | map x12 = 12; +21 | map x12 = 12; | ^^^^^^^^ error: generic types other than `map` are not supported - --> testdata/parser/type/generic.proto:37:5 + --> testdata/parser/type/generic.proto:23:5 | -37 | set x13 = 13; +23 | set x13 = 13; | ^^^ error: unexpected type name in type parameters - --> testdata/parser/type/generic.proto:37:13 + --> testdata/parser/type/generic.proto:23:13 | -37 | set x13 = 13; +23 | set x13 = 13; | ^^^ expected `,` | - note: assuming a missing `,` here | help: add a `,` here | -37 | set x13 = 13; +23 | set x13 = 13; | + error: generic types other than `map` are not supported - --> testdata/parser/type/generic.proto:38:5 + --> testdata/parser/type/generic.proto:24:5 | -38 | set x14 = 14; +24 | set x14 = 14; | ^^^ error: unexpected type in method parameter list - --> testdata/parser/type/generic.proto:42:12 + --> testdata/parser/type/generic.proto:28:12 | -42 | rpc X1(map) returns (map) {} +28 | rpc X1(map) returns (map) {} | ^^^^^^^^^^^^^^^^^^^ expected message type error: unexpected type in method return type - --> testdata/parser/type/generic.proto:42:42 + --> testdata/parser/type/generic.proto:28:42 | -42 | rpc X1(map) returns (map) {} +28 | rpc X1(map) returns (map) {} | ^^^^^^^^^^^^^^^^^^^^^ | | | expected message type error: unexpected type in method parameter list - --> testdata/parser/type/generic.proto:43:12 + --> testdata/parser/type/generic.proto:29:12 | -43 | rpc X2(list) returns (stream .void) {} +29 | rpc X2(list) returns (stream .void) {} | ^^^^^^^^^^^^ expected message type error: unexpected type in method return type - --> testdata/parser/type/generic.proto:43:42 + --> testdata/parser/type/generic.proto:29:42 | -43 | rpc X2(list) returns (stream .void) {} +29 | rpc X2(list) returns (stream .void) {} | ^^^^^^^^ expected message type error: unexpected type in method parameter list - --> testdata/parser/type/generic.proto:44:12 + --> testdata/parser/type/generic.proto:30:12 | -44 | rpc X3(map) returns (stream map) {} +30 | rpc X3(map) returns (stream map) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected message type error: unexpected type in method return type - --> testdata/parser/type/generic.proto:44:58 + --> testdata/parser/type/generic.proto:30:58 | -44 | rpc X3(map) returns (stream map) {} +30 | rpc X3(map) returns (stream map) {} | ^^^^^^^^^^^^^^^^^^^ | | | expected message type diff --git a/experimental/parser/testdata/parser/type/generic_broken.proto b/experimental/parser/testdata/parser/type/generic_broken.proto index ed2acb4aa..ac2c00297 100644 --- a/experimental/parser/testdata/parser/type/generic_broken.proto +++ b/experimental/parser/testdata/parser/type/generic_broken.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/type/generic_broken.proto.stderr.txt b/experimental/parser/testdata/parser/type/generic_broken.proto.stderr.txt index 981287e3f..345f9bc9e 100644 --- a/experimental/parser/testdata/parser/type/generic_broken.proto.stderr.txt +++ b/experimental/parser/testdata/parser/type/generic_broken.proto.stderr.txt @@ -1,25 +1,25 @@ error: missing name in message field - --> testdata/parser/type/generic_broken.proto:21:5 + --> testdata/parser/type/generic_broken.proto:7:5 | -21 | map testdata/parser/type/generic_broken.proto:21:8 + --> testdata/parser/type/generic_broken.proto:7:8 | -21 | map testdata/parser/type/generic_broken.proto:21:24 + --> testdata/parser/type/generic_broken.proto:7:24 | -21 | map testdata/parser/type/ok.proto:22:5 + --> testdata/parser/type/ok.proto:8:5 | -22 | required M x3 = 3; + 8 | required M x3 = 3; | ^^^^^^^^ expected type name, `optional`, or `repeated` | help: delete it | -22 | - required M x3 = 3; -22 | + M x3 = 3; + 8 | - required M x3 = 3; + 8 | + M x3 = 3; | | = help: required fields are only permitted in proto2; even then, their use is diff --git a/experimental/parser/testdata/parser/type/repeated.proto b/experimental/parser/testdata/parser/type/repeated.proto index cf2cca220..c6315bab8 100644 --- a/experimental/parser/testdata/parser/type/repeated.proto +++ b/experimental/parser/testdata/parser/type/repeated.proto @@ -1,17 +1,3 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto2"; package test; diff --git a/experimental/parser/testdata/parser/type/repeated.proto.stderr.txt b/experimental/parser/testdata/parser/type/repeated.proto.stderr.txt index ddf7ac2ab..6add0499a 100644 --- a/experimental/parser/testdata/parser/type/repeated.proto.stderr.txt +++ b/experimental/parser/testdata/parser/type/repeated.proto.stderr.txt @@ -1,318 +1,318 @@ error: multiple modifiers on message field type - --> testdata/parser/type/repeated.proto:20:14 + --> testdata/parser/type/repeated.proto:6:14 | -20 | optional optional M x1 = 1; + 6 | optional optional M x1 = 1; | -------- ^^^^^^^^ | | | previous one is here | help: delete it | -20 | - optional optional M x1 = 1; -20 | + optional M x1 = 1; + 6 | - optional optional M x1 = 1; + 6 | + optional M x1 = 1; | error: multiple modifiers on message field type - --> testdata/parser/type/repeated.proto:21:14 + --> testdata/parser/type/repeated.proto:7:14 | -21 | repeated optional M x2 = 2; + 7 | repeated optional M x2 = 2; | -------- ^^^^^^^^ | | | previous one is here | help: delete it | -21 | - repeated optional M x2 = 2; -21 | + repeated M x2 = 2; + 7 | - repeated optional M x2 = 2; + 7 | + repeated M x2 = 2; | warning: required fields are deprecated - --> testdata/parser/type/repeated.proto:22:5 + --> testdata/parser/type/repeated.proto:8:5 | -22 | required optional M x3 = 3; + 8 | required optional M x3 = 3; | ^^^^^^^^ = help: do not attempt to change this to `optional` if the field is already in-use; doing so is a wire protocol break error: multiple modifiers on message field type - --> testdata/parser/type/repeated.proto:22:14 + --> testdata/parser/type/repeated.proto:8:14 | -22 | required optional M x3 = 3; + 8 | required optional M x3 = 3; | -------- ^^^^^^^^ | | | previous one is here | help: delete it | -22 | - required optional M x3 = 3; -22 | + required M x3 = 3; + 8 | - required optional M x3 = 3; + 8 | + required M x3 = 3; | error: multiple modifiers on message field type - --> testdata/parser/type/repeated.proto:23:14 + --> testdata/parser/type/repeated.proto:9:14 | -23 | repeated repeated M x4 = 4; + 9 | repeated repeated M x4 = 4; | -------- ^^^^^^^^ | | | previous one is here | help: delete it | -23 | - repeated repeated M x4 = 4; -23 | + repeated M x4 = 4; + 9 | - repeated repeated M x4 = 4; + 9 | + repeated M x4 = 4; | error: multiple modifiers on message field type - --> testdata/parser/type/repeated.proto:24:14 + --> testdata/parser/type/repeated.proto:10:14 | -24 | repeated stream M x5 = 5; +10 | repeated stream M x5 = 5; | -------- ^^^^^^ | | | previous one is here | help: delete it | -24 | - repeated stream M x5 = 5; -24 | + repeated M x5 = 5; +10 | - repeated stream M x5 = 5; +10 | + repeated M x5 = 5; | error: unexpected `stream` modifier on message field - --> testdata/parser/type/repeated.proto:25:5 + --> testdata/parser/type/repeated.proto:11:5 | -25 | stream stream M x6 = 6; +11 | stream stream M x6 = 6; | ^^^^^^ help: delete it | -25 | - stream stream M x6 = 6; -25 | + stream M x6 = 6; +11 | - stream stream M x6 = 6; +11 | + stream M x6 = 6; | = help: `stream` only applies to an input or output of a service method error: multiple modifiers on message field type - --> testdata/parser/type/repeated.proto:25:12 + --> testdata/parser/type/repeated.proto:11:12 | -25 | stream stream M x6 = 6; +11 | stream stream M x6 = 6; | ------ ^^^^^^ | | | previous one is here | help: delete it | -25 | - stream stream M x6 = 6; -25 | + stream M x6 = 6; +11 | - stream stream M x6 = 6; +11 | + stream M x6 = 6; | error: unexpected `required` modifier in method signature - --> testdata/parser/type/repeated.proto:29:12 + --> testdata/parser/type/repeated.proto:15:12 | -29 | rpc X1(required optional M) returns (stream optional M) {} +15 | rpc X1(required optional M) returns (stream optional M) {} | ^^^^^^^^ help: delete it | -29 | - rpc X1(required optional M) returns (stream optional M) {} -29 | + rpc X1(optional M) returns (stream optional M) {} +15 | - rpc X1(required optional M) returns (stream optional M) {} +15 | + rpc X1(optional M) returns (stream optional M) {} | = help: `required` only applies to a message field error: unexpected `optional` modifier in method signature - --> testdata/parser/type/repeated.proto:29:21 + --> testdata/parser/type/repeated.proto:15:21 | -29 | rpc X1(required optional M) returns (stream optional M) {} +15 | rpc X1(required optional M) returns (stream optional M) {} | ^^^^^^^^ help: delete it | -29 | - rpc X1(required optional M) returns (stream optional M) {} -29 | + rpc X1(required M) returns (stream optional M) {} +15 | - rpc X1(required optional M) returns (stream optional M) {} +15 | + rpc X1(required M) returns (stream optional M) {} | = help: `optional` only applies to a message field error: unexpected `optional` modifier in method signature - --> testdata/parser/type/repeated.proto:29:49 + --> testdata/parser/type/repeated.proto:15:49 | -29 | rpc X1(required optional M) returns (stream optional M) {} +15 | rpc X1(required optional M) returns (stream optional M) {} | ^^^^^^^^ help: delete it | -29 | - rpc X1(required optional M) returns (stream optional M) {} -29 | + rpc X1(required optional M) returns (stream M) {} +15 | - rpc X1(required optional M) returns (stream optional M) {} +15 | + rpc X1(required optional M) returns (stream M) {} | = help: `optional` only applies to a message field error: unexpected `repeated` modifier in method signature - --> testdata/parser/type/repeated.proto:30:12 + --> testdata/parser/type/repeated.proto:16:12 | -30 | rpc X2(repeated repeated test.M) returns (repeated stream .test.M) {} +16 | rpc X2(repeated repeated test.M) returns (repeated stream .test.M) {} | ^^^^^^^^ help: delete it | -30 | - rpc X2(repeated repeated test.M) returns (repeated stream .test.M) {} -30 | + rpc X2(repeated test.M) returns (repeated stream .test.M) {} +16 | - rpc X2(repeated repeated test.M) returns (repeated stream .test.M) {} +16 | + rpc X2(repeated test.M) returns (repeated stream .test.M) {} | = help: `repeated` only applies to a message field error: unexpected `repeated` modifier in method signature - --> testdata/parser/type/repeated.proto:30:21 + --> testdata/parser/type/repeated.proto:16:21 | -30 | rpc X2(repeated repeated test.M) returns (repeated stream .test.M) {} +16 | rpc X2(repeated repeated test.M) returns (repeated stream .test.M) {} | ^^^^^^^^ help: delete it | -30 | - rpc X2(repeated repeated test.M) returns (repeated stream .test.M) {} -30 | + rpc X2(repeated test.M) returns (repeated stream .test.M) {} +16 | - rpc X2(repeated repeated test.M) returns (repeated stream .test.M) {} +16 | + rpc X2(repeated test.M) returns (repeated stream .test.M) {} | = help: `repeated` only applies to a message field error: unexpected `repeated` modifier in method signature - --> testdata/parser/type/repeated.proto:30:47 + --> testdata/parser/type/repeated.proto:16:47 | -30 | rpc X2(repeated repeated test.M) returns (repeated stream .test.M) {} +16 | rpc X2(repeated repeated test.M) returns (repeated stream .test.M) {} | ^^^^^^^^ help: delete it | -30 | - rpc X2(repeated repeated test.M) returns (repeated stream .test.M) {} -30 | + rpc X2(repeated repeated test.M) returns (stream .test.M) {} +16 | - rpc X2(repeated repeated test.M) returns (repeated stream .test.M) {} +16 | + rpc X2(repeated repeated test.M) returns (stream .test.M) {} | = help: `repeated` only applies to a message field error: encountered more than one `stream` - --> testdata/parser/type/repeated.proto:31:19 + --> testdata/parser/type/repeated.proto:17:19 | -31 | rpc X3(stream stream .test.M) returns (stream repeated M) {} +17 | rpc X3(stream stream .test.M) returns (stream repeated M) {} | ------ ^^^^^^ help: consider removing this | | | first one is here error: unexpected `repeated` modifier in method signature - --> testdata/parser/type/repeated.proto:31:51 + --> testdata/parser/type/repeated.proto:17:51 | -31 | rpc X3(stream stream .test.M) returns (stream repeated M) {} +17 | rpc X3(stream stream .test.M) returns (stream repeated M) {} | ^^^^^^^^ help: delete it | -31 | - rpc X3(stream stream .test.M) returns (stream repeated M) {} -31 | + rpc X3(stream stream .test.M) returns (stream M) {} +17 | - rpc X3(stream stream .test.M) returns (stream repeated M) {} +17 | + rpc X3(stream stream .test.M) returns (stream M) {} | = help: `repeated` only applies to a message field error: unexpected `required` modifier in method signature - --> testdata/parser/type/repeated.proto:33:12 + --> testdata/parser/type/repeated.proto:19:12 | -33 | rpc X4(required optional M) returns stream optional M {} +19 | rpc X4(required optional M) returns stream optional M {} | ^^^^^^^^ help: delete it | -33 | - rpc X4(required optional M) returns stream optional M {} -33 | + rpc X4(optional M) returns stream optional M {} +19 | - rpc X4(required optional M) returns stream optional M {} +19 | + rpc X4(optional M) returns stream optional M {} | = help: `required` only applies to a message field error: unexpected `optional` modifier in method signature - --> testdata/parser/type/repeated.proto:33:21 + --> testdata/parser/type/repeated.proto:19:21 | -33 | rpc X4(required optional M) returns stream optional M {} +19 | rpc X4(required optional M) returns stream optional M {} | ^^^^^^^^ help: delete it | -33 | - rpc X4(required optional M) returns stream optional M {} -33 | + rpc X4(required M) returns stream optional M {} +19 | - rpc X4(required optional M) returns stream optional M {} +19 | + rpc X4(required M) returns stream optional M {} | = help: `optional` only applies to a message field error: missing `(...)` around method return type - --> testdata/parser/type/repeated.proto:33:41 + --> testdata/parser/type/repeated.proto:19:41 | -33 | rpc X4(required optional M) returns stream optional M {} +19 | rpc X4(required optional M) returns stream optional M {} | ^^^^^^^^^^^^^^^^^ help: insert (...) around the return type | -33 | rpc X4(required optional M) returns (stream optional M) {} +19 | rpc X4(required optional M) returns (stream optional M) {} | + + error: unexpected `optional` modifier in method signature - --> testdata/parser/type/repeated.proto:33:48 + --> testdata/parser/type/repeated.proto:19:48 | -33 | rpc X4(required optional M) returns stream optional M {} +19 | rpc X4(required optional M) returns stream optional M {} | ^^^^^^^^ help: delete it | -33 | - rpc X4(required optional M) returns stream optional M {} -33 | + rpc X4(required optional M) returns stream M {} +19 | - rpc X4(required optional M) returns stream optional M {} +19 | + rpc X4(required optional M) returns stream M {} | = help: `optional` only applies to a message field error: unexpected `repeated` modifier in method signature - --> testdata/parser/type/repeated.proto:34:12 + --> testdata/parser/type/repeated.proto:20:12 | -34 | rpc X5(repeated repeated test.M) returns repeated stream .test.M {} +20 | rpc X5(repeated repeated test.M) returns repeated stream .test.M {} | ^^^^^^^^ help: delete it | -34 | - rpc X5(repeated repeated test.M) returns repeated stream .test.M {} -34 | + rpc X5(repeated test.M) returns repeated stream .test.M {} +20 | - rpc X5(repeated repeated test.M) returns repeated stream .test.M {} +20 | + rpc X5(repeated test.M) returns repeated stream .test.M {} | = help: `repeated` only applies to a message field error: unexpected `repeated` modifier in method signature - --> testdata/parser/type/repeated.proto:34:21 + --> testdata/parser/type/repeated.proto:20:21 | -34 | rpc X5(repeated repeated test.M) returns repeated stream .test.M {} +20 | rpc X5(repeated repeated test.M) returns repeated stream .test.M {} | ^^^^^^^^ help: delete it | -34 | - rpc X5(repeated repeated test.M) returns repeated stream .test.M {} -34 | + rpc X5(repeated test.M) returns repeated stream .test.M {} +20 | - rpc X5(repeated repeated test.M) returns repeated stream .test.M {} +20 | + rpc X5(repeated test.M) returns repeated stream .test.M {} | = help: `repeated` only applies to a message field error: unexpected `repeated` modifier in method signature - --> testdata/parser/type/repeated.proto:34:46 + --> testdata/parser/type/repeated.proto:20:46 | -34 | rpc X5(repeated repeated test.M) returns repeated stream .test.M {} +20 | rpc X5(repeated repeated test.M) returns repeated stream .test.M {} | ^^^^^^^^ help: delete it | -34 | - rpc X5(repeated repeated test.M) returns repeated stream .test.M {} -34 | + rpc X5(repeated repeated test.M) returns stream .test.M {} +20 | - rpc X5(repeated repeated test.M) returns repeated stream .test.M {} +20 | + rpc X5(repeated repeated test.M) returns stream .test.M {} | = help: `repeated` only applies to a message field error: missing `(...)` around method return type - --> testdata/parser/type/repeated.proto:34:46 + --> testdata/parser/type/repeated.proto:20:46 | -34 | rpc X5(repeated repeated test.M) returns repeated stream .test.M {} +20 | rpc X5(repeated repeated test.M) returns repeated stream .test.M {} | ^^^^^^^^^^^^^^^^^^^^^^^ help: insert (...) around the return type | -34 | rpc X5(repeated repeated test.M) returns (repeated stream .test.M) {} +20 | rpc X5(repeated repeated test.M) returns (repeated stream .test.M) {} | + + error: encountered more than one `stream` - --> testdata/parser/type/repeated.proto:35:19 + --> testdata/parser/type/repeated.proto:21:19 | -35 | rpc X6(stream stream .test.M) returns stream repeated M {} +21 | rpc X6(stream stream .test.M) returns stream repeated M {} | ------ ^^^^^^ help: consider removing this | | | first one is here error: missing `(...)` around method return type - --> testdata/parser/type/repeated.proto:35:43 + --> testdata/parser/type/repeated.proto:21:43 | -35 | rpc X6(stream stream .test.M) returns stream repeated M {} +21 | rpc X6(stream stream .test.M) returns stream repeated M {} | ^^^^^^^^^^^^^^^^^ help: insert (...) around the return type | -35 | rpc X6(stream stream .test.M) returns (stream repeated M) {} +21 | rpc X6(stream stream .test.M) returns (stream repeated M) {} | + + error: unexpected `repeated` modifier in method signature - --> testdata/parser/type/repeated.proto:35:50 + --> testdata/parser/type/repeated.proto:21:50 | -35 | rpc X6(stream stream .test.M) returns stream repeated M {} +21 | rpc X6(stream stream .test.M) returns stream repeated M {} | ^^^^^^^^ help: delete it | -35 | - rpc X6(stream stream .test.M) returns stream repeated M {} -35 | + rpc X6(stream stream .test.M) returns stream M {} +21 | - rpc X6(stream stream .test.M) returns stream repeated M {} +21 | + rpc X6(stream stream .test.M) returns stream M {} | = help: `repeated` only applies to a message field diff --git a/experimental/report/diagnostic.go b/experimental/report/diagnostic.go index 0f499951e..11bf03c86 100644 --- a/experimental/report/diagnostic.go +++ b/experimental/report/diagnostic.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/report/diff.go b/experimental/report/diff.go index 2bc72975f..338a9a8de 100644 --- a/experimental/report/diff.go +++ b/experimental/report/diff.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/report/doc.go b/experimental/report/doc.go index 24a80b199..e99b673db 100644 --- a/experimental/report/doc.go +++ b/experimental/report/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/report/renderer.go b/experimental/report/renderer.go index 4aedfe095..8ca91debb 100644 --- a/experimental/report/renderer.go +++ b/experimental/report/renderer.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/report/renderer_test.go b/experimental/report/renderer_test.go index 04d832059..368257b2e 100644 --- a/experimental/report/renderer_test.go +++ b/experimental/report/renderer_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/report/report.go b/experimental/report/report.go index 87cd3c906..8b9f27a46 100644 --- a/experimental/report/report.go +++ b/experimental/report/report.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/report/rtags/rtags.go b/experimental/report/rtags/rtags.go index 887e2cbe1..8f03cac89 100644 --- a/experimental/report/rtags/rtags.go +++ b/experimental/report/rtags/rtags.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/report/stylesheet.go b/experimental/report/stylesheet.go index c9bc282ed..41fdb151c 100644 --- a/experimental/report/stylesheet.go +++ b/experimental/report/stylesheet.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/report/testdata/i18n.yaml b/experimental/report/testdata/i18n.yaml index 01eebed0f..015bc9cb2 100644 --- a/experimental/report/testdata/i18n.yaml +++ b/experimental/report/testdata/i18n.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2024 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # buf.compiler.v1.Report files: diff --git a/experimental/report/testdata/multi-file.yaml b/experimental/report/testdata/multi-file.yaml index 99e8d51a1..e583aa1bf 100644 --- a/experimental/report/testdata/multi-file.yaml +++ b/experimental/report/testdata/multi-file.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2024 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # buf.compiler.v1.Report files: diff --git a/experimental/report/testdata/multi-underline.yaml b/experimental/report/testdata/multi-underline.yaml index ba562066b..0ff6d367c 100644 --- a/experimental/report/testdata/multi-underline.yaml +++ b/experimental/report/testdata/multi-underline.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2024 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # buf.compiler.v1.Report files: diff --git a/experimental/report/testdata/multiline.yaml b/experimental/report/testdata/multiline.yaml index 406a6f4c8..be48b3080 100644 --- a/experimental/report/testdata/multiline.yaml +++ b/experimental/report/testdata/multiline.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2024 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # buf.compiler.v1.Report files: diff --git a/experimental/report/testdata/no-snippets.yaml b/experimental/report/testdata/no-snippets.yaml index 6b718a9c6..13a166d49 100644 --- a/experimental/report/testdata/no-snippets.yaml +++ b/experimental/report/testdata/no-snippets.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2024 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # buf.compiler.v1.Report diagnostics: diff --git a/experimental/report/testdata/single-line.yaml b/experimental/report/testdata/single-line.yaml index b541d8cad..59f9e1cf6 100644 --- a/experimental/report/testdata/single-line.yaml +++ b/experimental/report/testdata/single-line.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2024 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # buf.compiler.v1.Report files: diff --git a/experimental/report/testdata/suggestions.yaml b/experimental/report/testdata/suggestions.yaml index ee4372098..2bd622a6e 100644 --- a/experimental/report/testdata/suggestions.yaml +++ b/experimental/report/testdata/suggestions.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2024 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # buf.compiler.v1.Report files: diff --git a/experimental/report/testdata/tabstops.yaml b/experimental/report/testdata/tabstops.yaml index 9086b6558..861c06f0e 100644 --- a/experimental/report/testdata/tabstops.yaml +++ b/experimental/report/testdata/tabstops.yaml @@ -1,17 +1,3 @@ -# Copyright 2020-2024 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # buf.compiler.v1.Report files: diff --git a/experimental/report/writer.go b/experimental/report/writer.go index b25542726..dc7ce5d95 100644 --- a/experimental/report/writer.go +++ b/experimental/report/writer.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/seq/func.go b/experimental/seq/func.go index 378814123..4d84149d4 100644 --- a/experimental/seq/func.go +++ b/experimental/seq/func.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/seq/seq.go b/experimental/seq/seq.go index c353b9cef..de1c21c5b 100644 --- a/experimental/seq/seq.go +++ b/experimental/seq/seq.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/seq/slice.go b/experimental/seq/slice.go index f012f1b49..edaede7ec 100644 --- a/experimental/seq/slice.go +++ b/experimental/seq/slice.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/source/doc.go b/experimental/source/doc.go index 9897134c8..adef2bbaa 100644 --- a/experimental/source/doc.go +++ b/experimental/source/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/source/file.go b/experimental/source/file.go index a132531f9..bb70de18b 100644 --- a/experimental/source/file.go +++ b/experimental/source/file.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/source/length/doc.go b/experimental/source/length/doc.go index 25c221a9c..a2839ab3f 100644 --- a/experimental/source/length/doc.go +++ b/experimental/source/length/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/source/length/unit.go b/experimental/source/length/unit.go index dc407953e..07b974304 100644 --- a/experimental/source/length/unit.go +++ b/experimental/source/length/unit.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/source/length/unit.yaml b/experimental/source/length/unit.yaml index 39589ea9c..aa6a66a58 100644 --- a/experimental/source/length/unit.yaml +++ b/experimental/source/length/unit.yaml @@ -1,10 +1,10 @@ -# Copyright 2020-2024 Buf Technologies, Inc. +# Copyright 2020-2026 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http:#www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/experimental/source/opener.go b/experimental/source/opener.go index 553b49f88..bd75071d4 100644 --- a/experimental/source/opener.go +++ b/experimental/source/opener.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/source/opener_test.go b/experimental/source/opener_test.go index b9359babf..0602bd367 100644 --- a/experimental/source/opener_test.go +++ b/experimental/source/opener_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/source/span.go b/experimental/source/span.go index 1ec3f2ded..0835e72aa 100644 --- a/experimental/source/span.go +++ b/experimental/source/span.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/source/span_test.go b/experimental/source/span_test.go index c7696d2a7..8e39bdd51 100644 --- a/experimental/source/span_test.go +++ b/experimental/source/span_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/source/wkts.go b/experimental/source/wkts.go index 81ab17004..2bc8381dc 100644 --- a/experimental/source/wkts.go +++ b/experimental/source/wkts.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/source/workspace.go b/experimental/source/workspace.go index 6edc5f3a0..52f64dfa7 100644 --- a/experimental/source/workspace.go +++ b/experimental/source/workspace.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/cursor.go b/experimental/token/cursor.go index 273c6af0c..c95af158f 100644 --- a/experimental/token/cursor.go +++ b/experimental/token/cursor.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/cursor_test.go b/experimental/token/cursor_test.go index 260fbd4e8..bb3f7e518 100644 --- a/experimental/token/cursor_test.go +++ b/experimental/token/cursor_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/doc.go b/experimental/token/doc.go index 57a853e28..8ffb4dbb6 100644 --- a/experimental/token/doc.go +++ b/experimental/token/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/keyword/doc.go b/experimental/token/keyword/doc.go index a594c507a..7eaa0c06f 100644 --- a/experimental/token/keyword/doc.go +++ b/experimental/token/keyword/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/keyword/keyword.go b/experimental/token/keyword/keyword.go index 9c16e83f6..c32ca4712 100644 --- a/experimental/token/keyword/keyword.go +++ b/experimental/token/keyword/keyword.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/keyword/keyword.yaml b/experimental/token/keyword/keyword.yaml index f37efda06..3f967ef4f 100644 --- a/experimental/token/keyword/keyword.yaml +++ b/experimental/token/keyword/keyword.yaml @@ -1,10 +1,10 @@ -# Copyright 2020-2024 Buf Technologies, Inc. +# Copyright 2020-2026 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http:#www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/experimental/token/keyword/keyword_test.go b/experimental/token/keyword/keyword_test.go index 1e84690f5..bbc31419c 100644 --- a/experimental/token/keyword/keyword_test.go +++ b/experimental/token/keyword/keyword_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/keyword/methods.go b/experimental/token/keyword/methods.go index 2ceb55ebf..9f2069d4c 100644 --- a/experimental/token/keyword/methods.go +++ b/experimental/token/keyword/methods.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/keyword/properties.go b/experimental/token/keyword/properties.go index fe4002559..8abcd4506 100644 --- a/experimental/token/keyword/properties.go +++ b/experimental/token/keyword/properties.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/kind.go b/experimental/token/kind.go index eaf23494e..17a27601d 100644 --- a/experimental/token/kind.go +++ b/experimental/token/kind.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/kind.yaml b/experimental/token/kind.yaml index c76e6a90b..f0d9689ef 100644 --- a/experimental/token/kind.yaml +++ b/experimental/token/kind.yaml @@ -1,10 +1,10 @@ -# Copyright 2020-2024 Buf Technologies, Inc. +# Copyright 2020-2026 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http:#www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/experimental/token/meta.go b/experimental/token/meta.go index c1ff119ff..081c09852 100644 --- a/experimental/token/meta.go +++ b/experimental/token/meta.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/number.go b/experimental/token/number.go index 9e5817ee2..b3e7686ca 100644 --- a/experimental/token/number.go +++ b/experimental/token/number.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/raw.go b/experimental/token/raw.go index 5097f2ca2..1c88a163f 100644 --- a/experimental/token/raw.go +++ b/experimental/token/raw.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/stream.go b/experimental/token/stream.go index 91e147810..9e7851c12 100644 --- a/experimental/token/stream.go +++ b/experimental/token/stream.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/string.go b/experimental/token/string.go index 88cbf261c..53553f718 100644 --- a/experimental/token/string.go +++ b/experimental/token/string.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/token.go b/experimental/token/token.go index 2a8124a66..96971787f 100644 --- a/experimental/token/token.go +++ b/experimental/token/token.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/experimental/token/token_test.go b/experimental/token/token_test.go index 12d8cad39..f4c2f1902 100644 --- a/experimental/token/token_test.go +++ b/experimental/token/token_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/export_test.go b/export_test.go index ada538c42..c474abd60 100644 --- a/export_test.go +++ b/export_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/arena/arena.go b/internal/arena/arena.go index 75abada93..3f92aa855 100644 --- a/internal/arena/arena.go +++ b/internal/arena/arena.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/arena/arena_test.go b/internal/arena/arena_test.go index 44c47d625..c8d33a32e 100644 --- a/internal/arena/arena_test.go +++ b/internal/arena/arena_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/benchmarks/benchmark_test.go b/internal/benchmarks/benchmark_test.go index 7d94c64df..36fdedd79 100644 --- a/internal/benchmarks/benchmark_test.go +++ b/internal/benchmarks/benchmark_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/cases/cases.go b/internal/cases/cases.go index 528725795..3978df323 100644 --- a/internal/cases/cases.go +++ b/internal/cases/cases.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/cases/cases_test.go b/internal/cases/cases_test.go index fd64000a4..e084e9aff 100644 --- a/internal/cases/cases_test.go +++ b/internal/cases/cases_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/cases/words.go b/internal/cases/words.go index 6546ea55d..2b8068a87 100644 --- a/internal/cases/words.go +++ b/internal/cases/words.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/cases/words_test.go b/internal/cases/words_test.go index 3d96ec34c..22645d323 100644 --- a/internal/cases/words_test.go +++ b/internal/cases/words_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/debug.go b/internal/debug.go index 3e9673faf..ed0b4f747 100644 --- a/internal/debug.go +++ b/internal/debug.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/decimal/decimal.go b/internal/decimal/decimal.go index 6d8b13ca0..bb5b0e39f 100644 --- a/internal/decimal/decimal.go +++ b/internal/decimal/decimal.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/decimal/decimal_test.go b/internal/decimal/decimal_test.go index f72e8fede..cc73f5c17 100644 --- a/internal/decimal/decimal_test.go +++ b/internal/decimal/decimal_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/decimal/float.go b/internal/decimal/float.go index f5d7cc92d..41fa85b69 100644 --- a/internal/decimal/float.go +++ b/internal/decimal/float.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/decimal/format.go b/internal/decimal/format.go index f516f2789..54cf457e3 100644 --- a/internal/decimal/format.go +++ b/internal/decimal/format.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/decimal/int.go b/internal/decimal/int.go index 562d3108c..02da2d8db 100644 --- a/internal/decimal/int.go +++ b/internal/decimal/int.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/decimal/parse.go b/internal/decimal/parse.go index 9018ddeec..473757c3c 100644 --- a/internal/decimal/parse.go +++ b/internal/decimal/parse.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/editions/editions.go b/internal/editions/editions.go index 27ad10f4b..e9c479083 100644 --- a/internal/editions/editions.go +++ b/internal/editions/editions.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/editions/editions_test.go b/internal/editions/editions_test.go index 4a793ca20..a7c511ad7 100644 --- a/internal/editions/editions_test.go +++ b/internal/editions/editions_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/enum/enum.go b/internal/enum/enum.go index 01c588139..a02d56969 100644 --- a/internal/enum/enum.go +++ b/internal/enum/enum.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/bigx/bigx.go b/internal/ext/bigx/bigx.go index b68750610..48d5df5c0 100644 --- a/internal/ext/bigx/bigx.go +++ b/internal/ext/bigx/bigx.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/bigx/log.go b/internal/ext/bigx/log.go index 844fd0d45..d44a7d4cf 100644 --- a/internal/ext/bigx/log.go +++ b/internal/ext/bigx/log.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/bitsx/bitsx.go b/internal/ext/bitsx/bitsx.go index 8b9374be3..cf43bfae2 100644 --- a/internal/ext/bitsx/bitsx.go +++ b/internal/ext/bitsx/bitsx.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/bitsx/bytesize.go b/internal/ext/bitsx/bytesize.go index a52ccd0d5..ae3ca4bd6 100644 --- a/internal/ext/bitsx/bytesize.go +++ b/internal/ext/bitsx/bytesize.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/bytesx/bytesx.go b/internal/ext/bytesx/bytesx.go index ebcd85ff5..4862e1cd5 100644 --- a/internal/ext/bytesx/bytesx.go +++ b/internal/ext/bytesx/bytesx.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/bytesx/writer.go b/internal/ext/bytesx/writer.go index 3811cdda9..004b9385f 100644 --- a/internal/ext/bytesx/writer.go +++ b/internal/ext/bytesx/writer.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/cmpx/cmpx.go b/internal/ext/cmpx/cmpx.go index 9f9b33553..9304951aa 100644 --- a/internal/ext/cmpx/cmpx.go +++ b/internal/ext/cmpx/cmpx.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/cmpx/cmpx_test.go b/internal/ext/cmpx/cmpx_test.go index 765ab8f60..b86700937 100644 --- a/internal/ext/cmpx/cmpx_test.go +++ b/internal/ext/cmpx/cmpx_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/cmpx/map.go b/internal/ext/cmpx/map.go index 579a5c34c..b9d551ab3 100644 --- a/internal/ext/cmpx/map.go +++ b/internal/ext/cmpx/map.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/flagx/flagx.go b/internal/ext/flagx/flagx.go index b8c710fa9..5205b8059 100644 --- a/internal/ext/flagx/flagx.go +++ b/internal/ext/flagx/flagx.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/iterx/consume.go b/internal/ext/iterx/consume.go index 51c5ed609..b888d832b 100644 --- a/internal/ext/iterx/consume.go +++ b/internal/ext/iterx/consume.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/iterx/filtermap.go b/internal/ext/iterx/filtermap.go index 4679653c3..12acef5fe 100644 --- a/internal/ext/iterx/filtermap.go +++ b/internal/ext/iterx/filtermap.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/iterx/get.go b/internal/ext/iterx/get.go index 6d69c567a..125f30dad 100644 --- a/internal/ext/iterx/get.go +++ b/internal/ext/iterx/get.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/iterx/iterx.go b/internal/ext/iterx/iterx.go index 60ad3b594..8d96ecd71 100644 --- a/internal/ext/iterx/iterx.go +++ b/internal/ext/iterx/iterx.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/iterx/kv.go b/internal/ext/iterx/kv.go index 022510267..8a0c2a4ee 100644 --- a/internal/ext/iterx/kv.go +++ b/internal/ext/iterx/kv.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/mapsx/collect.go b/internal/ext/mapsx/collect.go index 48c28965e..4cf03a2e1 100644 --- a/internal/ext/mapsx/collect.go +++ b/internal/ext/mapsx/collect.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/mapsx/mapsx.go b/internal/ext/mapsx/mapsx.go index fb6ab51ee..954fd832b 100644 --- a/internal/ext/mapsx/mapsx.go +++ b/internal/ext/mapsx/mapsx.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/osx/perms.go b/internal/ext/osx/perms.go index 7cb0caff2..3261dc40c 100644 --- a/internal/ext/osx/perms.go +++ b/internal/ext/osx/perms.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/reflectx/reflectx.go b/internal/ext/reflectx/reflectx.go index d626ad89a..40c23ab94 100644 --- a/internal/ext/reflectx/reflectx.go +++ b/internal/ext/reflectx/reflectx.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/reflectx/reflectx_test.go b/internal/ext/reflectx/reflectx_test.go index 00675cc0e..fcd1b4e81 100644 --- a/internal/ext/reflectx/reflectx_test.go +++ b/internal/ext/reflectx/reflectx_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/reflectx/sort.go b/internal/ext/reflectx/sort.go index 96972a09a..18c7aec61 100644 --- a/internal/ext/reflectx/sort.go +++ b/internal/ext/reflectx/sort.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/slicesx/dedup.go b/internal/ext/slicesx/dedup.go index e7807bceb..a95910b4b 100644 --- a/internal/ext/slicesx/dedup.go +++ b/internal/ext/slicesx/dedup.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/slicesx/dedup_test.go b/internal/ext/slicesx/dedup_test.go index 55cad5614..085cd46e5 100644 --- a/internal/ext/slicesx/dedup_test.go +++ b/internal/ext/slicesx/dedup_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/slicesx/heap.go b/internal/ext/slicesx/heap.go index ede2fbb21..dff3de0c6 100644 --- a/internal/ext/slicesx/heap.go +++ b/internal/ext/slicesx/heap.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/slicesx/index.go b/internal/ext/slicesx/index.go index a30220667..562c06958 100644 --- a/internal/ext/slicesx/index.go +++ b/internal/ext/slicesx/index.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/slicesx/index_test.go b/internal/ext/slicesx/index_test.go index 9bc35fcb6..af5157a82 100644 --- a/internal/ext/slicesx/index_test.go +++ b/internal/ext/slicesx/index_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/slicesx/iter.go b/internal/ext/slicesx/iter.go index 77d61d345..6f8be54b0 100644 --- a/internal/ext/slicesx/iter.go +++ b/internal/ext/slicesx/iter.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/slicesx/merge.go b/internal/ext/slicesx/merge.go index fc07dc9d4..4fb5f516e 100644 --- a/internal/ext/slicesx/merge.go +++ b/internal/ext/slicesx/merge.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/slicesx/merge_test.go b/internal/ext/slicesx/merge_test.go index 4fce8c87f..74358fb55 100644 --- a/internal/ext/slicesx/merge_test.go +++ b/internal/ext/slicesx/merge_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/slicesx/partition_test.go b/internal/ext/slicesx/partition_test.go index fe00b72ec..afd8dff98 100644 --- a/internal/ext/slicesx/partition_test.go +++ b/internal/ext/slicesx/partition_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/slicesx/queue.go b/internal/ext/slicesx/queue.go index d04630c35..9f8ea0493 100644 --- a/internal/ext/slicesx/queue.go +++ b/internal/ext/slicesx/queue.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/slicesx/queue_test.go b/internal/ext/slicesx/queue_test.go index 9acd2bc8d..92009b99e 100644 --- a/internal/ext/slicesx/queue_test.go +++ b/internal/ext/slicesx/queue_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/slicesx/slicesx.go b/internal/ext/slicesx/slicesx.go index 4d126ad7d..8db74c2f6 100644 --- a/internal/ext/slicesx/slicesx.go +++ b/internal/ext/slicesx/slicesx.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/slicesx/split.go b/internal/ext/slicesx/split.go index 89eb03aff..b5a28aeb0 100644 --- a/internal/ext/slicesx/split.go +++ b/internal/ext/slicesx/split.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/stringsx/stringsx.go b/internal/ext/stringsx/stringsx.go index 257bf80f1..d0584dbbb 100644 --- a/internal/ext/stringsx/stringsx.go +++ b/internal/ext/stringsx/stringsx.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/synctestx/synctestx.go b/internal/ext/synctestx/synctestx.go index ad9128e66..e879761e8 100644 --- a/internal/ext/synctestx/synctestx.go +++ b/internal/ext/synctestx/synctestx.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/syncx/log.go b/internal/ext/syncx/log.go index 2cb6883ff..48004e40b 100644 --- a/internal/ext/syncx/log.go +++ b/internal/ext/syncx/log.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/syncx/log_test.go b/internal/ext/syncx/log_test.go index ac01e2058..c7fd94167 100644 --- a/internal/ext/syncx/log_test.go +++ b/internal/ext/syncx/log_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/timex/stopwatch.go b/internal/ext/timex/stopwatch.go index be24a472f..30aa0e76a 100644 --- a/internal/ext/timex/stopwatch.go +++ b/internal/ext/timex/stopwatch.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/timex/stopwatch_test.go b/internal/ext/timex/stopwatch_test.go index 5f953e5a8..e71159b97 100644 --- a/internal/ext/timex/stopwatch_test.go +++ b/internal/ext/timex/stopwatch_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/unicodex/ascii.go b/internal/ext/unicodex/ascii.go index 62eda099b..9f66df768 100644 --- a/internal/ext/unicodex/ascii.go +++ b/internal/ext/unicodex/ascii.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/unicodex/digit.go b/internal/ext/unicodex/digit.go index 55ffcd9ec..a25a51dc6 100644 --- a/internal/ext/unicodex/digit.go +++ b/internal/ext/unicodex/digit.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/unicodex/width.go b/internal/ext/unicodex/width.go index ad483e815..1207c8de4 100644 --- a/internal/ext/unicodex/width.go +++ b/internal/ext/unicodex/width.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/unicodex/xid.go b/internal/ext/unicodex/xid.go index 17b959c9a..5aa409cf3 100644 --- a/internal/ext/unicodex/xid.go +++ b/internal/ext/unicodex/xid.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/ext/unsafex/unsafex.go b/internal/ext/unsafex/unsafex.go index 43bbc4f8f..bf48b3d7b 100644 --- a/internal/ext/unsafex/unsafex.go +++ b/internal/ext/unsafex/unsafex.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/featuresext/featuresext.go b/internal/featuresext/featuresext.go index d8d466239..6120a7ff6 100644 --- a/internal/featuresext/featuresext.go +++ b/internal/featuresext/featuresext.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/featuresext/featuresext_test.go b/internal/featuresext/featuresext_test.go index 13e9424ef..653222b27 100644 --- a/internal/featuresext/featuresext_test.go +++ b/internal/featuresext/featuresext_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/gen/buf/compiler/expr/v1alpha1/expr.pb.go b/internal/gen/buf/compiler/expr/v1alpha1/expr.pb.go index d61bab153..45676803e 100644 --- a/internal/gen/buf/compiler/expr/v1alpha1/expr.pb.go +++ b/internal/gen/buf/compiler/expr/v1alpha1/expr.pb.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/gen/buf/compiler/v1alpha1/ast.pb.go b/internal/gen/buf/compiler/v1alpha1/ast.pb.go index b578ace7a..2a7422264 100644 --- a/internal/gen/buf/compiler/v1alpha1/ast.pb.go +++ b/internal/gen/buf/compiler/v1alpha1/ast.pb.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/gen/buf/compiler/v1alpha1/report.pb.go b/internal/gen/buf/compiler/v1alpha1/report.pb.go index 69c238c32..e858126c8 100644 --- a/internal/gen/buf/compiler/v1alpha1/report.pb.go +++ b/internal/gen/buf/compiler/v1alpha1/report.pb.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/gen/buf/compiler/v1alpha1/symtab.pb.go b/internal/gen/buf/compiler/v1alpha1/symtab.pb.go index 794da13ec..f607685aa 100644 --- a/internal/gen/buf/compiler/v1alpha1/symtab.pb.go +++ b/internal/gen/buf/compiler/v1alpha1/symtab.pb.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/golden/golden.go b/internal/golden/golden.go index 905ff8c4b..550c2e8e9 100644 --- a/internal/golden/golden.go +++ b/internal/golden/golden.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/inlinetest/inlinetest.go b/internal/inlinetest/inlinetest.go index 50fb3d23a..f3e42389a 100644 --- a/internal/inlinetest/inlinetest.go +++ b/internal/inlinetest/inlinetest.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/intern/char6.go b/internal/intern/char6.go index 5623b6e6f..29f6860a3 100644 --- a/internal/intern/char6.go +++ b/internal/intern/char6.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/intern/container.go b/internal/intern/container.go index 6f870804d..38917eb39 100644 --- a/internal/intern/container.go +++ b/internal/intern/container.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/intern/export_test.go b/internal/intern/export_test.go index 20644aade..a832af4dd 100644 --- a/internal/intern/export_test.go +++ b/internal/intern/export_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/intern/intern.go b/internal/intern/intern.go index 7d70ea22b..b8fe0c8b6 100644 --- a/internal/intern/intern.go +++ b/internal/intern/intern.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/intern/intern_test.go b/internal/intern/intern_test.go index 5f7770c91..6552c44a4 100644 --- a/internal/intern/intern_test.go +++ b/internal/intern/intern_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/interval/intersect.go b/internal/interval/intersect.go index bebcdeb88..0bceea9c3 100644 --- a/internal/interval/intersect.go +++ b/internal/interval/intersect.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/interval/intersect_test.go b/internal/interval/intersect_test.go index 04482c870..89b649c4c 100644 --- a/internal/interval/intersect_test.go +++ b/internal/interval/intersect_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/interval/nesting.go b/internal/interval/nesting.go index d459d1661..cb0a6c87b 100644 --- a/internal/interval/nesting.go +++ b/internal/interval/nesting.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/interval/nesting_test.go b/internal/interval/nesting_test.go index b050e7f7c..9c952d46d 100644 --- a/internal/interval/nesting_test.go +++ b/internal/interval/nesting_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/message_context.go b/internal/message_context.go index f1b900bfd..3e22cbb75 100644 --- a/internal/message_context.go +++ b/internal/message_context.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/messageset/messageset.go b/internal/messageset/messageset.go index cb07669bd..7ea693d78 100644 --- a/internal/messageset/messageset.go +++ b/internal/messageset/messageset.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/messageset/messageset_protolegacy_test.go b/internal/messageset/messageset_protolegacy_test.go index 1f7464e9c..18af2c8a3 100644 --- a/internal/messageset/messageset_protolegacy_test.go +++ b/internal/messageset/messageset_protolegacy_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/messageset/messageset_test.go b/internal/messageset/messageset_test.go index dc177667a..d78c0ee39 100644 --- a/internal/messageset/messageset_test.go +++ b/internal/messageset/messageset_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/nodebug.go b/internal/nodebug.go index 7176f816c..ee53bde5e 100644 --- a/internal/nodebug.go +++ b/internal/nodebug.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/norace.go b/internal/norace.go index 43a66a592..f18584fe1 100644 --- a/internal/norace.go +++ b/internal/norace.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/options.go b/internal/options.go index 0bfdddded..d7520571c 100644 --- a/internal/options.go +++ b/internal/options.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/proto/buf/compiler/expr/v1alpha1/expr.proto b/internal/proto/buf/compiler/expr/v1alpha1/expr.proto index 410c5db3c..ce10cd267 100644 --- a/internal/proto/buf/compiler/expr/v1alpha1/expr.proto +++ b/internal/proto/buf/compiler/expr/v1alpha1/expr.proto @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/proto/buf/compiler/v1alpha1/ast.proto b/internal/proto/buf/compiler/v1alpha1/ast.proto index 3c2698dfe..0278dd2c3 100644 --- a/internal/proto/buf/compiler/v1alpha1/ast.proto +++ b/internal/proto/buf/compiler/v1alpha1/ast.proto @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/proto/buf/compiler/v1alpha1/symtab.proto b/internal/proto/buf/compiler/v1alpha1/symtab.proto index ae816eb84..c74834221 100644 --- a/internal/proto/buf/compiler/v1alpha1/symtab.proto +++ b/internal/proto/buf/compiler/v1alpha1/symtab.proto @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/protoc/protoc.go b/internal/protoc/protoc.go index d3c12ea0f..111e998fd 100644 --- a/internal/protoc/protoc.go +++ b/internal/protoc/protoc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/prototest/caller.go b/internal/prototest/caller.go index 0307d4171..82a9022fe 100644 --- a/internal/prototest/caller.go +++ b/internal/prototest/caller.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/prototest/same_layout.go b/internal/prototest/same_layout.go index 3adcf1791..c0c5efb30 100644 --- a/internal/prototest/same_layout.go +++ b/internal/prototest/same_layout.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/prototest/util.go b/internal/prototest/util.go index bab746f2e..336fac100 100644 --- a/internal/prototest/util.go +++ b/internal/prototest/util.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/prototest/yaml.go b/internal/prototest/yaml.go index ce0625ae9..28338b828 100644 --- a/internal/prototest/yaml.go +++ b/internal/prototest/yaml.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/race.go b/internal/race.go index 4dbfaa915..3ab5a4fd1 100644 --- a/internal/race.go +++ b/internal/race.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/tags/gen/main.go b/internal/tags/gen/main.go index b0e51b1b0..363e24ebb 100644 --- a/internal/tags/gen/main.go +++ b/internal/tags/gen/main.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/tags/generated.go b/internal/tags/generated.go index c98f90b81..1aedc1799 100644 --- a/internal/tags/generated.go +++ b/internal/tags/generated.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/tags/tags.go b/internal/tags/tags.go index 3f9506dbb..192f6a664 100644 --- a/internal/tags/tags.go +++ b/internal/tags/tags.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/testing/dualcompiler/adapters.go b/internal/testing/dualcompiler/adapters.go index 0437e45f5..b2f4ff8e3 100644 --- a/internal/testing/dualcompiler/adapters.go +++ b/internal/testing/dualcompiler/adapters.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/testing/dualcompiler/helpers.go b/internal/testing/dualcompiler/helpers.go index d17a1c162..e465879fd 100644 --- a/internal/testing/dualcompiler/helpers.go +++ b/internal/testing/dualcompiler/helpers.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/testing/dualcompiler/interface.go b/internal/testing/dualcompiler/interface.go index f425603f1..151d73301 100644 --- a/internal/testing/dualcompiler/interface.go +++ b/internal/testing/dualcompiler/interface.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/testing/dualcompiler/new_adapter.go b/internal/testing/dualcompiler/new_adapter.go index afc4cc605..0933a5df6 100644 --- a/internal/testing/dualcompiler/new_adapter.go +++ b/internal/testing/dualcompiler/new_adapter.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/testing/dualcompiler/old_adapter.go b/internal/testing/dualcompiler/old_adapter.go index 3f920c718..e786f6e97 100644 --- a/internal/testing/dualcompiler/old_adapter.go +++ b/internal/testing/dualcompiler/old_adapter.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/testing/googleapis/archive.go b/internal/testing/googleapis/archive.go index ef8462b67..ffbd176f9 100644 --- a/internal/testing/googleapis/archive.go +++ b/internal/testing/googleapis/archive.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/testing/googleapis/gen/main.go b/internal/testing/googleapis/gen/main.go index 143e7614e..aa5969ff5 100644 --- a/internal/testing/googleapis/gen/main.go +++ b/internal/testing/googleapis/gen/main.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/testing/googleapis/googleapis.go b/internal/testing/googleapis/googleapis.go index 306270df3..d69657bdd 100644 --- a/internal/testing/googleapis/googleapis.go +++ b/internal/testing/googleapis/googleapis.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/testing/memory/measure.go b/internal/testing/memory/measure.go index 6cefbf807..259457e19 100644 --- a/internal/testing/memory/measure.go +++ b/internal/testing/memory/measure.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/testing/memory/measure_test.go b/internal/testing/memory/measure_test.go index 9c0840da2..d3101e536 100644 --- a/internal/testing/memory/measure_test.go +++ b/internal/testing/memory/measure_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/tools/tools.go b/internal/tools/tools.go index 947299cb1..05970c8ce 100644 --- a/internal/tools/tools.go +++ b/internal/tools/tools.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/toposort/toposort.go b/internal/toposort/toposort.go index c766d4f42..f740d0859 100644 --- a/internal/toposort/toposort.go +++ b/internal/toposort/toposort.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/toposort/toposort_test.go b/internal/toposort/toposort_test.go index 66f8b8c04..4f1886304 100644 --- a/internal/toposort/toposort_test.go +++ b/internal/toposort/toposort_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/trie/export_test.go b/internal/trie/export_test.go index 35af516c4..3eafe3e9e 100644 --- a/internal/trie/export_test.go +++ b/internal/trie/export_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/trie/nybbles.go b/internal/trie/nybbles.go index 9fe7357e7..a925168d3 100644 --- a/internal/trie/nybbles.go +++ b/internal/trie/nybbles.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/trie/trie.go b/internal/trie/trie.go index ce4a7f050..3c7c7dff8 100644 --- a/internal/trie/trie.go +++ b/internal/trie/trie.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/trie/trie_test.go b/internal/trie/trie_test.go index 5b1cc7898..c4a5627aa 100644 --- a/internal/trie/trie_test.go +++ b/internal/trie/trie_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/types.go b/internal/types.go index 7b6bda840..15b6bea87 100644 --- a/internal/types.go +++ b/internal/types.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/util.go b/internal/util.go index 1117d9fe3..ce40b429a 100644 --- a/internal/util.go +++ b/internal/util.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/descriptors.go b/linker/descriptors.go index 8d60d3081..d64ce98d2 100644 --- a/linker/descriptors.go +++ b/linker/descriptors.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/descriptors_ext_test.go b/linker/descriptors_ext_test.go index 0c993ad33..7fd11e6a4 100644 --- a/linker/descriptors_ext_test.go +++ b/linker/descriptors_ext_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/descriptors_test.go b/linker/descriptors_test.go index 920124b93..9a95cd4f2 100644 --- a/linker/descriptors_test.go +++ b/linker/descriptors_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/doc.go b/linker/doc.go index 05defc907..0126925c7 100644 --- a/linker/doc.go +++ b/linker/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/files.go b/linker/files.go index 3f7256ef8..8c10757c6 100644 --- a/linker/files.go +++ b/linker/files.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/linker.go b/linker/linker.go index 5cad09f5d..dd13a5dd3 100644 --- a/linker/linker.go +++ b/linker/linker.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/linker_test.go b/linker/linker_test.go index dec436c61..e863c7d8f 100644 --- a/linker/linker_test.go +++ b/linker/linker_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/pool.go b/linker/pool.go index ba666c735..2b937552c 100644 --- a/linker/pool.go +++ b/linker/pool.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/resolve.go b/linker/resolve.go index b677cc1ab..c4e86f3f5 100644 --- a/linker/resolve.go +++ b/linker/resolve.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/symbols.go b/linker/symbols.go index c644b0b78..f5f65d17f 100644 --- a/linker/symbols.go +++ b/linker/symbols.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/symbols_benchmark_test.go b/linker/symbols_benchmark_test.go index 99cf07395..87b453cdf 100644 --- a/linker/symbols_benchmark_test.go +++ b/linker/symbols_benchmark_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/symbols_test.go b/linker/symbols_test.go index c316de566..13bc04d1d 100644 --- a/linker/symbols_test.go +++ b/linker/symbols_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/validate.go b/linker/validate.go index 0a8a2a032..dcecb80a8 100644 --- a/linker/validate.go +++ b/linker/validate.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/linker/validate_test.go b/linker/validate_test.go index 5f32fff53..dac6ed1be 100644 --- a/linker/validate_test.go +++ b/linker/validate_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/options/message_set_option_test.go b/options/message_set_option_test.go index f9be234d3..350136908 100644 --- a/options/message_set_option_test.go +++ b/options/message_set_option_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/options/options.go b/options/options.go index 8eb9e1620..91d56961f 100644 --- a/options/options.go +++ b/options/options.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/options/options_test.go b/options/options_test.go index 01e5c61d3..6f9aa765f 100644 --- a/options/options_test.go +++ b/options/options_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/options/source_retention_options.go b/options/source_retention_options.go index 312e76e7d..9a720f015 100644 --- a/options/source_retention_options.go +++ b/options/source_retention_options.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/options/source_retention_options_test.go b/options/source_retention_options_test.go index 5d556a611..974400705 100644 --- a/options/source_retention_options_test.go +++ b/options/source_retention_options_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/options/target_types.go b/options/target_types.go index d8501a7a4..cb3add58b 100644 --- a/options/target_types.go +++ b/options/target_types.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/ast.go b/parser/ast.go index 413adb75f..e068d1d9b 100644 --- a/parser/ast.go +++ b/parser/ast.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/clone.go b/parser/clone.go index aa37fd385..2be24f893 100644 --- a/parser/clone.go +++ b/parser/clone.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/clone_test.go b/parser/clone_test.go index 9bd069269..58d888e6f 100644 --- a/parser/clone_test.go +++ b/parser/clone_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/doc.go b/parser/doc.go index 09e46f777..f33e180b4 100644 --- a/parser/doc.go +++ b/parser/doc.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/errors.go b/parser/errors.go index 74fa8d62b..4ca194f5f 100644 --- a/parser/errors.go +++ b/parser/errors.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/fastscan/fastscan.go b/parser/fastscan/fastscan.go index 0ad7317fe..e3703916c 100644 --- a/parser/fastscan/fastscan.go +++ b/parser/fastscan/fastscan.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/fastscan/fastscan_test.go b/parser/fastscan/fastscan_test.go index ad6791d21..3588c86c8 100644 --- a/parser/fastscan/fastscan_test.go +++ b/parser/fastscan/fastscan_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/fastscan/lexer.go b/parser/fastscan/lexer.go index f2a7dd524..88be65673 100644 --- a/parser/fastscan/lexer.go +++ b/parser/fastscan/lexer.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/lexer.go b/parser/lexer.go index bbc4b5e20..f7e6aa7a4 100644 --- a/parser/lexer.go +++ b/parser/lexer.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/lexer_test.go b/parser/lexer_test.go index fe149eb7b..207a35a97 100644 --- a/parser/lexer_test.go +++ b/parser/lexer_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/parser.go b/parser/parser.go index fb8404930..9a9171c1c 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/parser_test.go b/parser/parser_test.go index 343823cd2..616b8d64d 100644 --- a/parser/parser_test.go +++ b/parser/parser_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/proto.y.go b/parser/proto.y.go index c694c95b0..83cd11184 100644 --- a/parser/proto.y.go +++ b/parser/proto.y.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/result.go b/parser/result.go index 24a558784..625048022 100644 --- a/parser/result.go +++ b/parser/result.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/validate.go b/parser/validate.go index a5d65fbb4..aa07c9238 100644 --- a/parser/validate.go +++ b/parser/validate.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/parser/validate_test.go b/parser/validate_test.go index 2e725b8d4..fb17fed98 100644 --- a/parser/validate_test.go +++ b/parser/validate_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto/buf/compiler/v1alpha1/report.proto b/proto/buf/compiler/v1alpha1/report.proto index d362051bf..105a53d36 100644 --- a/proto/buf/compiler/v1alpha1/report.proto +++ b/proto/buf/compiler/v1alpha1/report.proto @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protoutil/editions.go b/protoutil/editions.go index 0e44a025e..d68d9f419 100644 --- a/protoutil/editions.go +++ b/protoutil/editions.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protoutil/editions_test.go b/protoutil/editions_test.go index 975bda9a9..908ec2d6b 100644 --- a/protoutil/editions_test.go +++ b/protoutil/editions_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protoutil/protos.go b/protoutil/protos.go index 40816d413..3acb6e8b7 100644 --- a/protoutil/protos.go +++ b/protoutil/protos.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/reporter/errors.go b/reporter/errors.go index 7c0e37f3d..a8323589a 100644 --- a/reporter/errors.go +++ b/reporter/errors.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/reporter/reporter.go b/reporter/reporter.go index 64cca9b36..2987a5be8 100644 --- a/reporter/reporter.go +++ b/reporter/reporter.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/reporting_test.go b/reporting_test.go index e2689f882..044803c8a 100644 --- a/reporting_test.go +++ b/reporting_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/resolver.go b/resolver.go index f98e81080..6de296d64 100644 --- a/resolver.go +++ b/resolver.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/sourceinfo/source_code_info.go b/sourceinfo/source_code_info.go index 57914295d..760ba72f4 100644 --- a/sourceinfo/source_code_info.go +++ b/sourceinfo/source_code_info.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/sourceinfo/source_code_info_test.go b/sourceinfo/source_code_info_test.go index 4110b6080..952d003b9 100644 --- a/sourceinfo/source_code_info_test.go +++ b/sourceinfo/source_code_info_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/std_imports.go b/std_imports.go index ca9324ab1..884dd9c12 100644 --- a/std_imports.go +++ b/std_imports.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/std_imports_test.go b/std_imports_test.go index c502bfe76..b8c86f33c 100644 --- a/std_imports_test.go +++ b/std_imports_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/supported_editions.go b/supported_editions.go index 229d87353..3a48e6aa6 100644 --- a/supported_editions.go +++ b/supported_editions.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/supported_editions_test.go b/supported_editions_test.go index 9a03e48de..2df592d28 100644 --- a/supported_editions_test.go +++ b/supported_editions_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/walk/walk.go b/walk/walk.go index 6c6b7fc85..eaa7363aa 100644 --- a/walk/walk.go +++ b/walk/walk.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/walk/walk_benchmark_test.go b/walk/walk_benchmark_test.go index 3384c9504..fcac1e067 100644 --- a/walk/walk_benchmark_test.go +++ b/walk/walk_benchmark_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/walk/walk_test.go b/walk/walk_test.go index 52442b402..cfca83a60 100644 --- a/walk/walk_test.go +++ b/walk/walk_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/wellknownimports/wellknownimports.go b/wellknownimports/wellknownimports.go index 93808fa8d..7c5b91c64 100644 --- a/wellknownimports/wellknownimports.go +++ b/wellknownimports/wellknownimports.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/wellknownimports/wellknownimports_test.go b/wellknownimports/wellknownimports_test.go index a3f226ce9..9ddd0b35d 100644 --- a/wellknownimports/wellknownimports_test.go +++ b/wellknownimports/wellknownimports_test.go @@ -1,4 +1,4 @@ -// Copyright 2020-2025 Buf Technologies, Inc. +// Copyright 2020-2026 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.