-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Suppress "load-only" warning for global options #1606
Conversation
663dce7
to
c4d2f3c
Compare
c4d2f3c
to
3bb02cb
Compare
@davidcarlisle Ping |
base/testfiles/github-1606.lvt
Outdated
\begin{filecontents*}[overwrite]{testpackage.sty} | ||
\ProvidesExplPackage{testpackage}{2025-02-04}{}{} | ||
\keys_define:nn { testpackage } | ||
{ testoption .code:n = { \def \testmacro { seen } } } |
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.
this doesn't test the load-only code, and if I add testoption .usage=load
then the duplicate load still produces a warning:
LaTeX Warning: Package "testpackage" has already been loaded: ignoring
(LaTeX) load-time option "testoption".
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.
Thanks - fixed
% \begin{macrocode} | ||
\cs_new_protected:Npn \@@_options_loaded:n #1 | ||
{ | ||
\tl_set:Ne \l_@@_tmpb_tl { \tl_to_str:N \@classoptionslist } |
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.
using classoptionlist here rather than one of the versions that's been filtered to drop the values (eg for unused option warnings) seems a bit suspect. If I change the 1606 test file to have
\documentclass[testoption=?]{article}
Then the warning comes back for duplicate loads
LaTeX Warning: Package "testpackage" has already been loaded: ignoring
(LaTeX) load-time option "testoption".
which doesn't seem quite right?
If I test in this PR
Then I get no warning about an ignored load option. But with |
OK, I'll think of a second generation plan |
No description provided.