[latex3-commits] [git/LaTeX3-latex3-latex3] master: Add dependency checking for l3backend (ea1f2cf56)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Aug 20 19:09:56 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/ea1f2cf56500e220d60dd2bf822acc7c1dba4003

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

commit ea1f2cf56500e220d60dd2bf822acc7c1dba4003
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date:   Mon Aug 3 00:33:36 2020 -0300

    Add dependency checking for l3backend


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

ea1f2cf56500e220d60dd2bf822acc7c1dba4003
 l3backend/l3backend-basics.dtx | 38 +++++++++++++++++++++++++++++++++-----
 1 file changed, 33 insertions(+), 5 deletions(-)

diff --git a/l3backend/l3backend-basics.dtx b/l3backend/l3backend-basics.dtx
index 209b2a648..d7cf96f15 100644
--- a/l3backend/l3backend-basics.dtx
+++ b/l3backend/l3backend-basics.dtx
@@ -69,27 +69,55 @@
 % place in the files.
 %    \begin{macrocode}
 %<*package>
+\def\ExplBackendFileDate{2020-06-29}
 \ProvidesExplFile
 %<*dvipdfmx>
-  {l3backend-dvipdfmx.def}{2020-08-07}{}
+  {l3backend-dvipdfmx.def}{\ExplBackendFileDate}{}
   {L3 backend support: dvipdfmx}
 %</dvipdfmx>
 %<*dvips>
-  {l3backend-dvips.def}{2020-08-07}{}
+  {l3backend-dvips.def}{\ExplBackendFileDate}{}
   {L3 backend support: dvips}
 %</dvips>
 %<*dvisvgm>
-  {l3backend-dvisvgm.def}{2020-08-07}{}
+  {l3backend-dvisvgm.def}{\ExplBackendFileDate}{}
   {L3 backend support: dvisvgm}
 %</dvisvgm>
 %<*pdfmode>
-  {l3backend-pdfmode.def}{2020-08-07}{}
+  {l3backend-pdfmode.def}{\ExplBackendFileDate}{}
   {L3 backend support: PDF mode}
 %</pdfmode>
 %<*xdvipdfmx>
-  {l3backend-xdvipdfmx.def}{2020-08-07}{}
+  {l3backend-xdvipdfmx.def}{\ExplBackendFileDate}{}
   {L3 backend support: xdvipdfmx}
 %</xdvipdfmx>
+%    \end{macrocode}
+%
+%   Check if the loaded kernel is at least enough to load this file.
+%   The kernel date has to be at least equal to \cs{ExplBackendFileDate}
+%   or later.  If \cs{__kernel_dependency_version_check:Nn} doesn't
+%   exist we're loading in an older kernel, so it's an error anyway.
+%   With time, this test should vanish and only the dependency check
+%   should remain.
+%    \begin{macrocode}
+\cs_if_exist:NTF \__kernel_dependency_version_check:Nn
+  {
+    \__kernel_dependency_version_check:Nn \ExplBackendFileDate
+%<dvipdfmx>      {l3backend-dvipdfmx.def}
+%<dvips>      {l3backend-dvips.def}
+%<dvisvgm>      {l3backend-dvisvgm.def}
+%<pdfmode>      {l3backend-pdfmode.def}
+%<xdvipdfmx>      {l3backend-xdvipdfmx.def}
+  }
+  {
+    \cs_if_exist_use:cF { @latex at error } { \errmessage }
+      {
+        Mismatched~LaTeX~support~files~detected. \MessageBreak
+        Loading~aborted!
+      }
+      { \use:c { @ehd } }
+    \tex_endinput:D
+  }
 %</package>
 %    \end{macrocode}
 %





More information about the latex3-commits mailing list.