Skip to content

fix/ADFA-3668 enable strictvariables flag in pebble#1172

Merged
davidschachterADFA merged 1 commit intostagefrom
fix/ADFA-3668-strictvariables
Apr 10, 2026
Merged

fix/ADFA-3668 enable strictvariables flag in pebble#1172
davidschachterADFA merged 1 commit intostagefrom
fix/ADFA-3668-strictvariables

Conversation

@jomen-adfa
Copy link
Copy Markdown
Contributor

enable strictvariables flag in pebble

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 44070652-40ed-4196-a7cc-f3e484007edb

📥 Commits

Reviewing files that changed from the base of the PR and between 2850e77 and 211e667.

📒 Files selected for processing (1)
  • templates-impl/src/main/java/com/itsaky/androidide/templates/impl/zip/ZipRecipeExecutor.kt

📝 Walkthrough

Release Notes: Enable strictVariables flag in Pebble

  • Template validation enhanced: Enabled strictVariables(true) in Pebble template engine configuration, which enforces strict variable checking during template rendering in ZipRecipeExecutor

  • Breaking change - Undefined variables now error: Templates that reference undefined or missing variables will now fail to evaluate instead of silently treating them as empty/null. Existing templates must be audited to ensure all variable references are properly defined in the context

  • Risk: Template compatibility: Any custom templates or template files that rely on undefined variables being silently ignored will break. Requires validation of all template files used by the Android IDE template system

  • Risk: User impact: If users have custom project templates referencing undefined variables, those templates will fail to generate new projects until updated to include proper variable definitions

  • Recommendation: Before deploying to production, audit all template files in the codebase to identify any templates with undefined variable references and update them accordingly

Walkthrough

A single-line configuration change enables strict variable mode in the Pebble template engine within ZipRecipeExecutor. The strictVariables(true) flag is added to PebbleEngine.Builder(), altering how template evaluation handles undefined or missing variables.

Changes

Cohort / File(s) Summary
Template Engine Configuration
templates-impl/src/main/java/com/itsaky/androidide/templates/impl/zip/ZipRecipeExecutor.kt
Enabled strictVariables(true) on PebbleEngine.Builder() to enforce strict variable evaluation during template rendering, causing undefined variable references to be treated as errors rather than silently ignored.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • itsaky-adfa
  • alome007
  • Daniel-ADFA
  • hal-eisen-adfa

Poem

🐰 A strictness blessing flows today,
Variables now cannot stray,
Undefined shall not hide away,
Pebble templates find their way,
Errors caught in template's play! 📝✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix/ADFA-3668 enable strictvariables flag in pebble' clearly summarizes the main change, which is enabling the strictvariables flag in the Pebble template engine configuration.
Description check ✅ Passed The description 'enable strictvariables flag in pebble' is directly related to the changeset, matching the primary modification made to the ZipRecipeExecutor configuration.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ADFA-3668-strictvariables

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@davidschachterADFA davidschachterADFA merged commit 140716a into stage Apr 10, 2026
2 checks passed
@davidschachterADFA davidschachterADFA deleted the fix/ADFA-3668-strictvariables branch April 10, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants