Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge new-model-changes feature branch to main #171

Merged
merged 12 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ thiserror = "1.0.50"
zstd = "0.13.0"
termcolor = "1.4.1"
derive_builder = "0.20.0"
itertools = "0.13.0"

[target.'cfg(not(target_os = "windows"))'.dependencies]
pager = "0.16.1"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FoobarBaz // expected FooBarBaz, found FoobarBaz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello // expected (foo, bar, baz or FooBarBaz) found hello
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"foo" // expected a symbol value foo for enum, found string "foo"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
D: false,
E: (1 2 3) // expected list
}
}
}
2 changes: 1 addition & 1 deletion code-gen-projects/input/bad/scalar/mismatched_type.ion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12 // expected string
12 // expected string

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1, 2, 3] // expected list of strings
Original file line number Diff line number Diff line change
@@ -1 +1 @@
("foo" "bar" "baz") // expected list
("foo" "bar" "baz") // expected list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[foobar] // expected values are either foo , bar or baz, found foobar.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[ mango ] // expected apple, banana or strawberry, found mango
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(apple banana) // expected list, found sexp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{
A: "hello",
B: 12,
C: (1 2 3),
C: (1 2 3), // expected sexpression of strings
D: 10e2
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// simple struct with type mismatched sequence type
{
A: "hello",
B: 12,
C: ["foo", "bar", "baz"], // expected sexp
D: 10e2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// simple struct with type mismatched fields
{
A: "hello",
B: false, // expected field type: int
C: ("foo" "bar" "baz"),
D: 10e2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// simple struct with all valid fields
{
A: "hello",
B: 12,
// C: ("foo" "bar" "baz"), // since `C` is a required field, this is an invalid struct
D: 10e2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// struct with mismatched sequence element
{
A: "hello",
B: 12,
C: (1 2 3), // expected sexpression of strings
D: 10e2
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
C: ("foo" "bar" "baz"),
D: 10e2
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// simple struct with all valid fields
{
A: "hello",
B: 12,
// C: ("foo" "bar" "baz"), // since `C` is a required field, this is an invalid struct
D: 10e2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// simple struct with type mismatched import field
{
A: "hello",
B: false, // expected field type symbol
}
1 change: 1 addition & 0 deletions code-gen-projects/input/good/enum_type/valid_value_1.ion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo
1 change: 1 addition & 0 deletions code-gen-projects/input/good/enum_type/valid_value_2.ion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bar
1 change: 1 addition & 0 deletions code-gen-projects/input/good/enum_type/valid_value_3.ion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
baz
1 change: 1 addition & 0 deletions code-gen-projects/input/good/enum_type/valid_value_4.ion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FooBarBaz
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// nested struct with some optional fields that are not provided
{
A: "hello",
// B: 12, // since `B` is optional field, this is a valid struct
C: {
D: false,
E: [1, 2, 3]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
E: [1, 2, 3]
}
}

2 changes: 1 addition & 1 deletion code-gen-projects/input/good/scalar/empty_value.ion
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// empty string
""
""
2 changes: 1 addition & 1 deletion code-gen-projects/input/good/scalar/valid_value.ion
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// a scalar value of string type
"Hello World!"
"Hello World!"
2 changes: 1 addition & 1 deletion code-gen-projects/input/good/sequence/empty_sequence.ion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[]
[]
2 changes: 1 addition & 1 deletion code-gen-projects/input/good/sequence/valid_elements.ion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["foo", "bar", "baz"]
["foo", "bar", "baz"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[foo, bar, baz]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[ apple, strawberry ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// struct with empty list, empty string and zeros
{
C: (),
A: "",
B: 0,
D: 0e0,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// simple struct with all valid fields
{
A: "hello",
B: 12,
C: ("foo" "bar" "baz"),
D: 10e2,
E: foo
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// simple struct with all valid fields
{
A: "hello",
B: 12,
C: ("foo" "bar" "baz"),
// D: 10e2, // since `D` is optional field, this is a valid struct
E: foo,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// struct with unordered fields
{
C: ("foo" "bar" "baz"),
A: "hello",
B: 12,
E: foo,
D: 10e2,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// simple struct with all valid fields
{
A: "hello",
B: 12,
C: ("foo" "bar" "baz"),
// D: 10e2, // since `D` is optional field, this is a valid struct
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

// struct with unordered fields
{
C: ("foo" "bar" "baz"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// simple struct with all valid fields
{
A: "hello",
B: apple,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// simple struct with all valid fields
{
A: "hello",
// B: apple, // since `B` is an optional field, this is a valid struct
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// struct with unordered fields
{
B: banana,
A: "hello",
}
Loading
Loading