Skip to content
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

Failed to render Liquid template on CRUD controller #169

Closed
Mettwasser opened this issue Dec 29, 2024 · 2 comments · Fixed by #172
Closed

Failed to render Liquid template on CRUD controller #169

Mettwasser opened this issue Dec 29, 2024 · 2 comments · Fixed by #172
Assignees
Labels
bug Something isn't working

Comments

@Mettwasser
Copy link

Mettwasser commented Dec 29, 2024

>cargo generate crud-controller tasks
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.17s
     Running `target\debug\generate.exe crud-controller tasks`
ℹ️  Generating CRUD controller…
✅ Generated CRUD controller ./web/src/controllers/tasks.rs.
ℹ️  Do not forget to route the controller's actions in ./web/src/routes.rs!
ℹ️  Generating test for CRUD controller…
❌ Could not generate test for CRUD controller!
Failed to render Liquid template

Caused by:
    liquid: Unknown variable
      with:
        requested variable=crate_name

Version this is generated by

gerust 0.0.3 (via cargo install gerust)

@marcoow marcoow added the bug Something isn't working label Dec 31, 2024
@marcoow
Copy link
Member

marcoow commented Dec 31, 2024

This should be covered by tests and it fails on CI but the action succeeds anyway 😞 – see https://github.com/mainmatter/gerust/actions/runs/12554819658/job/35004061787#step:10:21. We're just swallowing any errors e.g. here

Err(e) => ui.error("Could not generate CRUD controller!", e),

@marcoow marcoow self-assigned this Dec 31, 2024
@datenzauberer
Copy link

Executing cargo generate crud-controller tasks does not generate the test for the CRUD controller (./web/tests/api/tasks_test.rs is missing).
However, using the fix from PR #172 resolves this issue and works as expected.

Is there anything blocking the merge of this PR? I’d be happy to support if needed. Please let me know how I can assist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants