Replies: 7 comments 3 replies
-
I think a sense of what you are imagining would help to give an answer! |
Beta Was this translation helpful? Give feedback.
-
In broad terms, I just thought I'd go over the organization of the code and possibly do the following.
My question is more about accepting or rejecting this type of changes. In the end, all this remains a matter of taste... :-) |
Beta Was this translation helpful? Give feedback.
-
Here is a very small example extracting from https://github.com/latex3/l3build/blob/main/l3build-check.lua#L106 . Let's consider this chunk of code. -- TeX90/XeTeX knows only the smaller set of dimension units
line = gsub(line,
"cm, mm, dd, cc, bp, or sp",
"cm, mm, dd, cc, nd, nc, bp, or sp")
-- On the other hand, (u)pTeX has some new units!
line = gsub(line,
"em, ex, zw, zh, in, pt, pc,",
"em, ex, in, pt, pc,")
line = gsub(line,
"cm, mm, dd, cc, bp, H, Q, or sp;",
"cm, mm, dd, cc, nd, nc, bp, or sp;")
-- Normalise a case where fixing a TeX bug changes the message text
line = gsub(line, "\\csname\\endcsname ", "\\csname\\endcsname")
-- Zap "on line <num>" and replace with "on line ..."
-- Two similar cases, Lua patterns mean we need to do them separately
line = gsub(line, "on line %d*", "on line ...")
line = gsub(line, "on input line %d*", "on input line ...") A loop over a dedicated "config" table can simplify these lines which all do a |
Beta Was this translation helpful? Give feedback.
-
I will do it in June at the same time I will implement a YAML option. |
Beta Was this translation helpful? Give feedback.
-
Certainly, it's definitely possible to propose another architecture for the Lua code to try and factorize it. It's always a good idea to explore different approaches and see if there's a more efficient or organized way to structure the code. Do you have any specific ideas or approaches in mind for how you would like to factorize the code? |
Beta Was this translation helpful? Give feedback.
-
Without having read the code in detail, I have nothing concrete to propose, but it would be necessary to see if the articulation of the source files, and the use of modules, would not allow by isolating the functionalities to make the code easier to maintain. I'll come back with concrete information via a request in June. |
Beta Was this translation helpful? Give feedback.
-
There is a package https://github.com/api7/lua-tinyyaml that could be used to implement the YAML file option. Is it a good idea? |
Beta Was this translation helpful? Give feedback.
-
Could it be possible to propose another architecture for the Lua code? I would like to try to factorize the code, if it is possible. :-)
Beta Was this translation helpful? Give feedback.
All reactions