blipson89 / Leprechaun

A template code generation framework for Rainbow
MIT License
42 stars 22 forks source link

Troubleshooting Leprechaun.Validation.ArchitectureValidationException #31

Closed estockwell-alpert closed 4 years ago

estockwell-alpert commented 4 years ago

I'm trying to run Leprechaun in a Helix project. When it runs I'm getting the exception

Leprechaun.Validation.ArchitectureValidationException: At least one error occurred validating your template architecture.

I don't see any information in this error that can help me troubleshoot what the problem is. Can you provide assistance in how to troubleshoot this error?

blipson89 commented 4 years ago

Hi @estockwell-alpert - that error means at least one of three things happened:

  1. You have a field name that matches the name of the template (i.e. a template named Foo can't have a single-line text field named Foo)
  2. You have two fields on a template with the same name
  3. You have two templates with the same name in the same configuration (i.e. Feature.News has two templates named News Item, regardless of whether or not they're in different folders)

The full stack trace should indicate which error you're getting, but either way I'll make a note to make the error message more clear.

https://github.com/blipson89/Leprechaun/blob/master/src/Leprechaun/Validation/StandardArchitectureValidator.cs

If you want, you can disable these validators in the Leprechaun.config: https://github.com/blipson89/Leprechaun/blob/master/src/Leprechaun.Console/Leprechaun.config#L67-L68

blipson89 commented 4 years ago

Hi @estockwell-alpert - did that help? Can I close out this issue?

blipson89 commented 4 years ago

closing as there has been no response