[latex3-commits] [git/LaTeX3-latex3-latex2e] gh406: Add expl3 patch to \@(push|pop)filename when rolling back (fixes #406) (05c68e87)

PhelypeOleinik phelype.oleinik at latex-project.org
Thu Oct 8 19:46:18 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : gh406
Link       : https://github.com/latex3/latex2e/commit/05c68e8756e6f5ec152fe8ef8a518686c5a2edb8

>---------------------------------------------------------------

commit 05c68e8756e6f5ec152fe8ef8a518686c5a2edb8
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Thu Oct 8 14:46:18 2020 -0300

    Add expl3 patch to \@(push|pop)filename when rolling back (fixes #406)


>---------------------------------------------------------------

05c68e8756e6f5ec152fe8ef8a518686c5a2edb8
 base/changes.txt                                   |  5 ++++
 base/ltclass.dtx                                   | 30 ++++++++++++++++++-
 base/testfiles/github-0406.lvt                     | 35 ++++++++++++++++++++++
 base/testfiles/github-0406.tlg                     | 17 +++++++++++
 .../tlb-latexrelease-rollback-003-often.luatex.tlg |  4 +++
 .../tlb-latexrelease-rollback-003-often.tlg        |  4 +++
 .../tlb-latexrelease-rollback-003-often.xetex.tlg  |  4 +++
 base/testfiles/tlb-rollback-004-often.luatex.tlg   |  6 ++--
 base/testfiles/tlb-rollback-004-often.tlg          |  6 ++--
 base/testfiles/tlb-rollback-004-often.xetex.tlg    |  6 ++--
 10 files changed, 110 insertions(+), 7 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 5a2c6693..36a22af1 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -14,6 +14,11 @@ All changes above are only part of the development branch for the next release.
 # 2020-10-01 PL 1 Release
 #########################
 
+2020-10-08  Phelype Oleinik  <phelype.oleinik at latex-project.org>
+
+	* ltclass.dtx:
+	Fix loading expl3-based package after rollback to 2020-02-02 (gh/406).
+
 2020-10-08  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* ltfssini.dtx: removed redundant code and fixed a misspelling
diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index bc650054..e771044e 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltclass.dtx}
-             [2020/10/01 v1.3r LaTeX Kernel (Class & Package Interface)]
+             [2020/10/08 v1.3s LaTeX Kernel (Class & Package Interface)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltclass.dtx}
@@ -561,6 +561,7 @@
 % |#4| Rest of the stack.
 % \changes{v1.3l}{2020/06/05}{Added \cs{@expl at push@filename@@}
 %          and \cs{@expl at push@filename at aux@@}}
+% \changes{v1.3s}{2020/10/08}{Added missing 2020/02/02 \cs{IncludeInRelease}}
 %    \begin{macrocode}
 %</2ekernel>
 %<*2ekernel|latexrelease>
@@ -586,6 +587,27 @@
     \@currnamestack}%
   \@expl at push@filename at aux@@}
 %<latexrelease>\EndIncludeInRelease
+%    \end{macrocode}
+%
+%   The following version of \cs{@pushfilename} didn't formally exist in
+%   this file, but in the 2020/02/02 release, \pkg{expl3} was preloaded
+%   and it patched \cs{@pushfilename} (and \cs{@popfilename}) by adding
+%   some hooks in there.  But rolling back to 2020/02/02, \pkg{expl3}
+%   doesn't patch these macros again, so rolling back has to take those
+%   hooks into account.  Same goes for \cs{@popfilename}.
+%    \begin{macrocode}
+%<latexrelease>
+%<latexrelease>\IncludeInRelease{2020/02/02}{\@pushfilename}%
+%<latexrelease>  {Add \@expl at push@filename@@}%
+%<latexrelease>\def\@pushfilename{%
+%<latexrelease>  \@expl at push@filename@@
+%<latexrelease>  \xdef\@currnamestack{%
+%<latexrelease>    {\@currname}%
+%<latexrelease>    {\@currext}%
+%<latexrelease>    {\the\catcode`\@}%
+%<latexrelease>    \@currnamestack}%
+%<latexrelease>    \@expl at push@filename at aux@@}
+%<latexrelease>\EndIncludeInRelease
 %<latexrelease>
 %<latexrelease>\IncludeInRelease{0000/00/00}{\@pushfilename}%
 %<latexrelease>  {Add \@expl at push@filename@@ and \@expl at push@filename at aux@@}%
@@ -613,6 +635,12 @@
   \@expl at pop@filename@@}
 %<latexrelease>\EndIncludeInRelease
 %<latexrelease>
+%<latexrelease>\IncludeInRelease{2020/02/02}{\@popfilename}%
+%<latexrelease>  {Add \@expl at push@filename@@}%
+%<latexrelease>\def\@popfilename{\expandafter\@p at pfilename\@currnamestack\@nil
+%<latexrelease>  \@expl at pop@filename@@}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>
 %<latexrelease>\IncludeInRelease{0000/00/00}{\@popfilename}%
 %<latexrelease>  {Add \@expl at push@filename@@ and \@expl at push@filename at aux@@}%
 %<latexrelease>\def\@popfilename{\expandafter\@p at pfilename\@currnamestack\@nil}
diff --git a/base/testfiles/github-0406.lvt b/base/testfiles/github-0406.lvt
new file mode 100644
index 00000000..30cf538d
--- /dev/null
+++ b/base/testfiles/github-0406.lvt
@@ -0,0 +1,35 @@
+
+\begin{filecontents}{testpack.sty}
+\ProvidesExplPackage {testpack} {2020-10-08} {0.1}
+  {A package for testing}
+\end{filecontents}
+
+
+\documentclass{article}
+
+\input{test2e}
+\START
+\OMIT
+
+\def\test#1{
+\expandafter\let\csname ver at latexrelease.sty\endcsname\relax
+\expandafter\let\csname ver at testpack.sty\endcsname\relax
+\RequirePackage[#1]{latexrelease}
+
+\TIMO
+\typeout{\the\catcode`\ }
+\RequirePackage{testpack}
+\typeout{\the\catcode`\ }
+\OMIT
+
+\ExplSyntaxOff
+}
+
+\test{2020-02-02} % expl3 preloaded
+
+\test{2019-10-01} % no expl3
+
+\test{2018-12-01}
+
+\TIMO
+\END
diff --git a/base/testfiles/github-0406.tlg b/base/testfiles/github-0406.tlg
new file mode 100644
index 00000000..ba7e7ffa
--- /dev/null
+++ b/base/testfiles/github-0406.tlg
@@ -0,0 +1,17 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+10
+(testpack.sty
+Package: testpack ....-..-.. v... A package for testing
+)
+10
+10
+(testpack.sty
+Package: testpack ....-..-.. v... A package for testing
+)
+10
+10
+(testpack.sty
+Package: testpack ....-..-.. v... A package for testing
+)
+10
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
index 4fe41645..e1262657 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
@@ -225,8 +225,10 @@ Applying: [....-..-..] negative height floats on input line ....
 Skipping: [....-..-..] 2 column marks on input line ....
 Applying: [....-..-..] 2 column marks on input line ....
 Skipping: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
+Skipping: [....-..-..] Add \@expl at push@filename@@  on input line ....
 Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Add \@expl at pop@filename@@  on input line ....
+Skipping: [....-..-..] Add \@expl at push@filename@@  on input line ....
 Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Test format date on input line ....
 Applying: [....-..-..] Test format date on input line ....
@@ -716,8 +718,10 @@ Already applied: [....-..-..] negative height floats on input line ....
 Applying: [....-..-..] 2 column marks on input line ....
 Already applied: [....-..-..] 2 column marks on input line ....
 Skipping: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
+Skipping: [....-..-..] Add \@expl at push@filename@@  on input line ....
 Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Add \@expl at pop@filename@@  on input line ....
+Skipping: [....-..-..] Add \@expl at push@filename@@  on input line ....
 Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Test format date on input line ....
 Applying: [....-..-..] Test format date on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
index e51b03dd..bc2ef53f 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
@@ -223,8 +223,10 @@ Applying: [....-..-..] negative height floats on input line ....
 Skipping: [....-..-..] 2 column marks on input line ....
 Applying: [....-..-..] 2 column marks on input line ....
 Skipping: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
+Skipping: [....-..-..] Add \@expl at push@filename@@  on input line ....
 Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Add \@expl at pop@filename@@  on input line ....
+Skipping: [....-..-..] Add \@expl at push@filename@@  on input line ....
 Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Test format date on input line ....
 Applying: [....-..-..] Test format date on input line ....
@@ -708,8 +710,10 @@ Already applied: [....-..-..] negative height floats on input line ....
 Applying: [....-..-..] 2 column marks on input line ....
 Already applied: [....-..-..] 2 column marks on input line ....
 Skipping: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
+Skipping: [....-..-..] Add \@expl at push@filename@@  on input line ....
 Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Add \@expl at pop@filename@@  on input line ....
+Skipping: [....-..-..] Add \@expl at push@filename@@  on input line ....
 Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Test format date on input line ....
 Applying: [....-..-..] Test format date on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
index 3cd8c217..73d794c5 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
@@ -223,8 +223,10 @@ Applying: [....-..-..] negative height floats on input line ....
 Skipping: [....-..-..] 2 column marks on input line ....
 Applying: [....-..-..] 2 column marks on input line ....
 Skipping: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
+Skipping: [....-..-..] Add \@expl at push@filename@@  on input line ....
 Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Add \@expl at pop@filename@@  on input line ....
+Skipping: [....-..-..] Add \@expl at push@filename@@  on input line ....
 Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Test format date on input line ....
 Applying: [....-..-..] Test format date on input line ....
@@ -717,8 +719,10 @@ Already applied: [....-..-..] negative height floats on input line ....
 Applying: [....-..-..] 2 column marks on input line ....
 Already applied: [....-..-..] 2 column marks on input line ....
 Skipping: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
+Skipping: [....-..-..] Add \@expl at push@filename@@  on input line ....
 Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Add \@expl at pop@filename@@  on input line ....
+Skipping: [....-..-..] Add \@expl at push@filename@@  on input line ....
 Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Test format date on input line ....
 Applying: [....-..-..] Test format date on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.luatex.tlg b/base/testfiles/tlb-rollback-004-often.luatex.tlg
index e6a5f57c..3bbff5ed 100644
--- a/base/testfiles/tlb-rollback-004-often.luatex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.luatex.tlg
@@ -314,9 +314,11 @@ Already applied: [....-..-..] negative height floats on input line ....
 Applying: [....-..-..] 2 column marks on input line ....
 Already applied: [....-..-..] 2 column marks on input line ....
 Skipping: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
-Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
+Applying: [....-..-..] Add \@expl at push@filename@@  on input line ....
+Already applied: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Add \@expl at pop@filename@@  on input line ....
-Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
+Applying: [....-..-..] Add \@expl at push@filename@@  on input line ....
+Already applied: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Test format date on input line ....
 Applying: [....-..-..] Test format date on input line ....
 Applying: [....-..-..] Guard against bad input on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.tlg b/base/testfiles/tlb-rollback-004-often.tlg
index 2440cc2d..f367ea1d 100644
--- a/base/testfiles/tlb-rollback-004-often.tlg
+++ b/base/testfiles/tlb-rollback-004-often.tlg
@@ -312,9 +312,11 @@ Already applied: [....-..-..] negative height floats on input line ....
 Applying: [....-..-..] 2 column marks on input line ....
 Already applied: [....-..-..] 2 column marks on input line ....
 Skipping: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
-Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
+Applying: [....-..-..] Add \@expl at push@filename@@  on input line ....
+Already applied: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Add \@expl at pop@filename@@  on input line ....
-Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
+Applying: [....-..-..] Add \@expl at push@filename@@  on input line ....
+Already applied: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Test format date on input line ....
 Applying: [....-..-..] Test format date on input line ....
 Applying: [....-..-..] Guard against bad input on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.xetex.tlg b/base/testfiles/tlb-rollback-004-often.xetex.tlg
index dcd9316f..e6b5920e 100644
--- a/base/testfiles/tlb-rollback-004-often.xetex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.xetex.tlg
@@ -312,9 +312,11 @@ Already applied: [....-..-..] negative height floats on input line ....
 Applying: [....-..-..] 2 column marks on input line ....
 Already applied: [....-..-..] 2 column marks on input line ....
 Skipping: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
-Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
+Applying: [....-..-..] Add \@expl at push@filename@@  on input line ....
+Already applied: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Add \@expl at pop@filename@@  on input line ....
-Applying: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
+Applying: [....-..-..] Add \@expl at push@filename@@  on input line ....
+Already applied: [....-..-..] Add \@expl at push@filename@@ and \@expl at push@filename at aux@@  on input line ....
 Skipping: [....-..-..] Test format date on input line ....
 Applying: [....-..-..] Test format date on input line ....
 Applying: [....-..-..] Guard against bad input on input line ....





More information about the latex3-commits mailing list.