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
Disable \requires #3879
Disable \requires #3879
Conversation
@zygoloid: Can we not ask for reviewers anymore? (I would have picked you and @jensmaurer, as the main macro-wranglers.) |
#3854 didn't move the macro. I thought this patch was suggested/done somewhere else, so I'm pointing this out so no one else loses time hunting it down. |
@JohelEGP: That's perfectly fine. I think the point of the present PR is to make it harder to accidentally reintroduce the bad words into the main standard. I'm somewhat sympathetic to that, though it's traded off against splattering even more local macro definitions into the regular text sources, which leaves me in two minds about this. It's a good proof that the "mandates" changes have landed, I suppose. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me. (I'd also be OK with \renewcommand
to something invalid after we're done rather than the Big Braced Block, but either way seems OK.)
Leaving it to @tkoeppe to complete his review and merge.
I don't like "something invalid"—unless we use |
If we want to be truly Well Behaved, we could define an environment to hold this command. But that really seems like overkill, and I'm OK with the braces as-is. |
You could also use \begingroup ... \endgroup so it doesn't look like a
spurious brace to a passing editor. (I'd probably add a comment mentioning
why we're putting everything in a group, too.)
|
I would shed no tear if we just lost the braces altogether. The main purpose of this change, as far as I can tell, is to not have the macro available in most of the standard so we don't accidentlaly use it; whether a tiny bit of Annex D gets to see it is largely irrelevant. |
I guess I should respond (this time) to clarify the purpose: it's that (not least because the correct |
Sure. I'm not really concerned with the public impression we cause with macros.tex. Yes, without braces the macro stays around for files included later, but happily, there isn't much specification content followin Annex D (anymore). So if it avoids trade-offs of unease about arbitrary-seeming braces or groups, I'd simply drop the braces. |
Another option would be to drop the grouping and add a |
That's a good idea. @opensdh: could you use that approach please? |
I assume you mean the |
If you want it to show an error instead of silently doing nothing, then you'd use: \makeatletter
\let\requires\@undefined
\makeatother |
@opensdh: ignoring the command seems unconcerning. What's the threat model you're trying to combat here? A DOS attack of |
I mentioned both I'm certain we've already spent more time talking about it than it could ever have saved anyone; sorry that I didn't realize it would attract so much attention. |
"Silently do nothing" is at least in principle a problem due to our process of asynchronous pull requests -- there are plenty of merges where no-one looks at the post-merge result and we rely on "build succeeds and It would presumably be trivial to check this from |
Please, no lone braces. What's the problem with simply defining the \requires only in the appendix? There is no useful use-case lexically following the appendices. |
I agree with Jens. In principle it's of course good to prevent misuse as noisily as possible, but practically, there's basically no potential for harm if the macro is defined before its first use (in Annex D) and then just left alive. I'd keep it simple. |
Press reload to see no braces. |
Now that Mandating is complete, we can prevent accidentally using
\requires
by relegating the macro itself to Annex D (in a form of meta-deprecation).