[Bug]: query casing is not respected for file queries and aliases
Describe the bug
---
queries:
- releaseYear: release_year.sql
---
vs
---
queries:
- my_alternative_alias: release_year.sql
---
If you alias release_year.sql as releaseYear, the frontmatter will run without error and a query named releaseyear (lowercase 'y') will run successfully. But there will not be a query named releaseYear (capital 'y') in the scope, and any downstream attempts to reference it as such will fail.
While the examples in the docs use snakecase, I don't believe anywhere in the docs indicates that camelCase aliases will cause this particular bug.
Severity
annoyance
Additional Information, or Workarounds
No response
I've looked back into the PR where this feature was implemented.
https://github.com/evidence-dev/evidence/pull/734
We intentionally decided to lowercase all query ids because of unexpected behaviour if you used mixed cases. Solution is therefore
- Better docs - document this behaviour
- And ideally - throw useful warning if user tries to use capital letters in a query ID
or better yet
- Fix this behaviour