Skip to content

Commit

Permalink
Remove 1.dev-only things from LF 1.13 protofile. (#9599)
Browse files Browse the repository at this point in the history
* Remove 1.dev stuff from 1.13 LF protofile.

changelog_begin
changelog_end

* Remove Experimental

* update hashes
  • Loading branch information
sofiafaro-da authored May 6, 2021
1 parent 03034ec commit 2176173
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,22 +316,6 @@ enum PrimType {
// Builtin type 'TRoundingMode'
// *Available in versions >= 1.13*
ROUNDING_MODE = 22;

// Builtin type 'TAnyException'
// *Available in versions >= 1.dev*
ANY_EXCEPTION = 23;

// Builtin type 'TGeneralError'
// *Available in versions >= 1.dev*
GENERAL_ERROR = 24;

// Builtin type 'TArithmeticError'
// *Available in versions >= 1.dev*
ARITHMETIC_ERROR = 25;

// Builtin type 'TContractError'
// *Available in versions >= 1.dev*
CONTRACT_ERROR = 26;
}

// Types
Expand Down Expand Up @@ -492,13 +476,6 @@ enum BuiltinFunction {
APPEND_TEXT = 24;

ERROR = 25;
ANY_EXCEPTION_MESSAGE = 147; // *Available in versions >= 1.dev*
MAKE_GENERAL_ERROR = 148; // *Available in versions >= 1.dev*
GENERAL_ERROR_MESSAGE = 149; // *Available in versions >= 1.dev*
MAKE_ARITHMETIC_ERROR = 150; // *Available in versions >= 1.dev*
ARITHMETIC_ERROR_MESSAGE = 151; // *Available in versions >= 1.dev*
MAKE_CONTRACT_ERROR = 152; // *Available in versions >= 1.dev*
CONTRACT_ERROR_MESSAGE = 153; // *Available in versions >= 1.dev*

LEQ_INT64 = 33; // *Available in versions < 1.11*
LEQ_DECIMAL = 34; // *Available in versions < 1.7*
Expand Down Expand Up @@ -596,18 +573,6 @@ enum BuiltinFunction {
TO_NUMERIC_BIGNUMERIC = 144; // *Available in versions >= 1.13*
TO_BIGNUMERIC_NUMERIC = 145; // *Available in versions >= 1.13*
TO_TEXT_BIGNUMERIC = 146; // *Available in versions >= 1.13*

// Next id is 154. 153 is CONTRACT_ERROR_MESSAGE.

// EXPERIMENTAL TEXT PRIMITIVES -- these do not yet have stable numbers.
TEXT_TO_UPPER = 9901; // *Available in versions >= 1.dev*
TEXT_TO_LOWER = 9902; // *Available in versions >= 1.dev*
TEXT_SLICE = 9903; // *Available in versions >= 1.dev*
TEXT_SLICE_INDEX = 9904; // *Available in versions >= 1.dev*
TEXT_CONTAINS_ONLY = 9905; // *Available in versions >= 1.dev*
TEXT_REPLICATE = 9906; // *Available in versions >= 1.dev*
TEXT_SPLIT_ON = 9907; // *Available in versions >= 1.dev*
TEXT_INTERCALATE = 9908; // *Available in versions >= 1.dev*
}

// Builtin literals
Expand Down Expand Up @@ -912,40 +877,6 @@ message Expr {
Expr expr = 2;
}

// Wrap an exception value in AnyException
// *Available in versions >= 1.dev*
message ToAnyException {
// type of argument. Must be an exception type.
Type type = 1;
// argument
Expr expr = 2;
}

// Extract the given exception type from AnyException or return None on type-mismatch
// *Available in versions >= 1.dev*
message FromAnyException {
// type that should be extracted. Must be an exception type.
Type type = 1;
// Value of type AnyException
Expr expr = 2;
}

// Throw an exception.
// *Available in versions >= 1.dev*
message Throw {
// Overall type of the "throw" expression.
Type return_type = 1;
// Type of exception to throw. Must be an exception type.
Type exception_type = 2;
// Value of type "exception_type".
Expr exception_expr = 3;
}

message Experimental {
string name = 1;
Type type = 2 ;
}

// Location of the expression in the Daml code source.
// Optional
Location location = 25;
Expand Down Expand Up @@ -1043,20 +974,6 @@ message Expr {
// A type representation
// *Available in versions >= 1.7*
Type type_rep = 32;

// Wrap an arbitrary exception into an AnyException ('ExpToAnyException').
// *Available in versions >= 1.dev*
ToAnyException to_any_exception = 33;

// Extract an arbitrary exception from an AnyException ('ExpFromAnyException').
// *Available in versions >= 1.dev*
FromAnyException from_any_exception = 34;

// Throw an exception ('ExpThrow').
// *Available in versions >= 1.dev*
Throw throw = 35;

Experimental experimental = 9999; // *Available only in 1.dev*
}

reserved 19; // This was equals. Removed in favour of BuiltinFunction.EQUAL_*
Expand Down Expand Up @@ -1269,7 +1186,6 @@ message Update {
RetrieveByKey fetch_by_key = 9; // *Available in versions >= 1.2*
// see similar constructor in `Scenario` on why this is useful.
EmbedExpr embed_expr = 7;
TryCatch try_catch = 11; // *Available in versions >= 1.dev*
}
}

Expand Down Expand Up @@ -1464,15 +1380,6 @@ message DefTemplate {
DefKey key = 10; // optional // *Available in versions >= 1.3*
}

// Exception definition
// *Available in versions >= 1.dev*
message DefException {
// *Must be a valid interned dotted name*
int32 name_interned_dname = 1;
Location location = 2;
Expr message = 3;
}

// Data type definition
message DefDataType {
message Fields {
Expand Down Expand Up @@ -1594,7 +1501,6 @@ message Module {
repeated DefDataType data_types = 5;
repeated DefValue values = 6;
repeated DefTemplate templates = 7;
repeated DefException exceptions = 10; // *Available in versions >= 1.dev*
}

message InternedDottedName {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ class ProtoTest extends AnyWordSpec with Matchers with TableDrivenPropertyChecks
("file", "Linux hash", "windows hash"),
(
"daml_lf_1.proto",
"d39be086ffd1ef8d510bc850f0d01b9ab671a7be829a61abfdc66bae08028f75",
"905f035efa5c06e1a07a925eaedbe7f430fd0f30ef6e5bad33cd2b7f8f9be1a1",
"66c18f32acff0c75cc2cbcb55e175749aedc246ccb9630cc959b462ddf717af4",
"33c4f75472db481862a745d18b7e28843aa284666b79b822172cd7ead1dc6ca8",
),
(
"daml_lf.proto",
Expand Down

0 comments on commit 2176173

Please sign in to comment.