-
Notifications
You must be signed in to change notification settings - Fork 25
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
Sitecore namespace conflicts #98
Comments
Your best bet for this situation would be to use Leprechaun for code generation, if that's an option. I am planning another Synthesis release next week. If you'd like to submit a PR to add Leprechaun's code generator is a LOT more flexible and is designed to work with Synthesis out of the box. |
Awesome. Thanks @blipson89! I had a look at the Synthesis code last night and it does indeed look like I could just update CodeDomGenerator.cs. I'll try to get a PR submitted this week, but I'll look into Leprechaun as well. I really appreciate your suggestions! |
Released in 9.1.4 - thank you for the help! |
Do you want to request a feature or report a bug?
Enhancement
What is the current behavior?
The generated models reference the Sitecore.ContentSearch and Sitecore.Data namespaces directly. I'm in the unfortunate situation of inheriting a Helix-like project that has chosen a namespace of Org.Sitecore.Feature.Module. So when Synthesis references the Sitecore namespace the compiler thinks it is referring to the project namespace and compilation fails. Much of my codebase aliases the Sitecore namespace to something like SC, but I can't do that with the Synthesis-generated code.
What is the expected behavior?
The desired behaviour might reference global::Sitecore.ContentSearch and global::Sitecore.Data, similar to the way the searchFields constructor in concrete model classes references global::System.Collections.Generic.IDictionary. I would be happy to submit a PR if this sounds like a desirable solution.
Please mention your Sitecore version and Synthesis version.
Sitecore 9.3.0 and Synthesis 9.1.2.1
The text was updated successfully, but these errors were encountered: