This PR works on adding set-up changes for integration roundtrip tests on generated code
List of changes:
Adds some changes for struct templates, that were resulting in specific errors with roundtrip testing
Replaces to_string()? with to_str()?.to_string(). (to_string() would return a raw string e.g. "\"hello\"" whereas to_str() returns a string value as "hello")
Adds isl_type_name property in Field this helps store symbol as Rust/Java string but when writing it as Ion it will use write_symbol using write_{{ field.isl_type_name}}.
Add a namespace option for java code generation (This option is only required when --language option is set as java).
Adds changes to use only a single module with all generated data models in Rust. Generated module is named as ion_generated_code.rs. This will help in importing entire file using include! macro and also simplifies attaching a single file as a module in any Rust crate. More information can be found in Rust guide on code generation: https://doc.rust-lang.org/cargo/reference/build-script-examples.html#code-generation
Adds changes to generate code for all schema files in a directory/authority.
Adds changes to current tests and clippy changes.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue #88:
Description of changes:
This PR works on adding set-up changes for integration roundtrip tests on generated code
List of changes:
to_string()?
withto_str()?.to_string()
. (to_string()
would return a raw string e.g. "\"hello\"" whereasto_str()
returns a string value as"hello"
)isl_type_name
property inField
this helps storesymbol
as Rust/Java string but when writing it as Ion it will usewrite_symbol
usingwrite_{{ field.isl_type_name}}
.--language
option is set asjava
).ion_generated_code.rs
. This will help in importing entire file usinginclude!
macro and also simplifies attaching a single file as a module in any Rust crate. More information can be found in Rust guide on code generation: https://doc.rust-lang.org/cargo/reference/build-script-examples.html#code-generationBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.