Open charypar opened 2 years ago
@charypar Thanks for the report. IIRC prefixing identifiers with the module name is useful. Have you tried a setup more similar to the test file swift_generation.rs
? (E.g. in this test, the module "Testing" matches the file name "Testing.swift". Your module is "shared" and the file is "shared_types.swift". Perhaps this helps?)
🐛 Bug
Generated swift code, which includes types that reference each other, prefixes local references with module name provided to' in scope".
CodeGeneratorConfig
. The code fails to compile with an error "Cannot find type 'The problem can be worked around by searching and replacing the module name followed by "." (e.g. "module.") with an empty string, effectively stripping the namespacing out of the generated code.
To reproduce
Types to be traced
Tracing and generating build.rs script
Relevant part of the generated Swift code
Removing
shared.
from the above resolves the problem.Expected Behavior
Generated Swift code should compile without errors.
System information
Serde reflection v0.3.6 Serde generate v0.24.0