feat!: emit warning that StrictUndefined will be enabled by default in the future#2590
feat!: emit warning that StrictUndefined will be enabled by default in the future#2590mschoettle wants to merge 8 commits into
Conversation
This makes it possible to fail fast when there are undefined variables in templates. Also, it avoids having to define a custom extension to enable StrictUndefined. Closes copier-org#1522
Revert "fix existing tests"
…n the future BREAKING CHANGES: Existing templates will see a FutureWarning emitted.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2590 +/- ##
=======================================
Coverage 97.15% 97.16%
=======================================
Files 60 60
Lines 7101 7117 +16
=======================================
+ Hits 6899 6915 +16
Misses 202 202
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@sisp Before I put more effort into this. Is there any interest in having this change (even if it is not merged right away)? |
|
@mschoettle I think eventually we'll want to use |
|
Thanks for your efforts and offer to help advance #2482, @mschoettle! 🙏 The way I see it, #2482 is best addressed after a major refactoring that decouples prompting from generation better. I've been working towards it with as much time as I can dedicate, hopefully it will be ready soon-ish. 🤞 I anticipate that implementing this fix and several other enhancements will become much easier then. I realize this is a somewhat unsatisfying, somewhat vague reply, but I'm convinced the wait will be worth it. 💪 🙂 |
BREAKING CHANGES: Existing templates will see a FutureWarning emitted.
Follow-up to #2587 as a second phase towards enabling StrictUndefined by default.