[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proposal for debugging/testing option
From: |
Kelly Dean |
Subject: |
Proposal for debugging/testing option |
Date: |
Fri, 20 Feb 2015 20:27:17 +0000 |
Stefan Monnier wrote:
> Based on my experience with emitting messages in similar oddball cases
> (i.e. making a variable buffer-local while it's globally let-bound), my
> guess is that it would catch a few very rare oddball cases indeed, but:
> 1- those oddball cases end up harmless.
> 2- there's no easy "fix" for those cases (because the let-binding and the
> makunbound happen in completely unrelated code which usually aren't
> used at the same time and what *really* should happen is at best
> unclear, or is otherwise exactly what happens with the current
> semantics you don't like).
Would it be ok to add an option to barf in those cases instead of just emitting
warning messages? Even if users won't use the option, it would be appropriate
during development and testing.
I.e. barf-if-probable-bug, with the possible values t, 'warn, and nil. With
'warn as the default.
Then, in the rare cases where it really is not a bug, the barf option can be
let-bound to nil (i.e. a runtime analog of the with-no-warnings wrapper), which
both suppresses the warning messages for known-correct usage and explicitly
indicates in the code that the case has been reviewed and determined to not be
a bug.
- Re: [PATCH] (Updated) Run hook when variable is set, (continued)
- Re: [PATCH] (Updated) Run hook when variable is set, Stefan Monnier, 2015/02/19
- [PATCH] (Updated) Run hook when variable is set, Kelly Dean, 2015/02/20
- Re: [PATCH] (Updated) Run hook when variable is set, Stefan Monnier, 2015/02/20
- Re: [PATCH] (Updated) Run hook when variable is set, Kelly Dean, 2015/02/21
- Re: [PATCH] (Updated) Run hook when variable is set, Stefan Monnier, 2015/02/21
- Re: [PATCH] (Updated) Run hook when variable is set, Kelly Dean, 2015/02/21
- Re: [PATCH] (Updated) Run hook when variable is set, Stephen J. Turnbull, 2015/02/22
- Re: [PATCH] (Updated) Run hook when variable is set, Stefan Monnier, 2015/02/22
- [PATCH] (Updated) Run hook when variable is set, Kelly Dean, 2015/02/22
- Re: [PATCH] (Updated) Run hook when variable is set, Stefan Monnier, 2015/02/22
- Proposal for debugging/testing option,
Kelly Dean <=
- Re: Proposal for debugging/testing option, Stefan Monnier, 2015/02/24
- Re: [PATCH] (Updated) Run hook when variable is set, Johan Bockgård, 2015/02/14
- Re: [PATCH] (Updated) Run hook when variable is set, Stefan Monnier, 2015/02/15
- Patches: inline vs. attachment, compressed vs. uncompressed. [was: Run hook when variable is set], Alan Mackenzie, 2015/02/15
- Re: [PATCH] (Updated) Run hook when variable is set, Kelly Dean, 2015/02/06
Re: [PATCH] Run hook when variable is set, Kelly Dean, 2015/02/02