Skip to content
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

Move declaration check out and do it in a separate step #529

Closed
lvjr opened this issue Nov 17, 2024 · 11 comments
Closed

Move declaration check out and do it in a separate step #529

lvjr opened this issue Nov 17, 2024 · 11 comments

Comments

@lvjr
Copy link
Owner

lvjr commented Nov 17, 2024

In fixing #22, \debug_on:n { check-declarations } was added to table-001.tex. But it brings a problem that the test will fail whenever I add a new variable. This is not that good. Maybe we need to move declaration check out and do it in a separate step.

@lvjr
Copy link
Owner Author

lvjr commented Nov 17, 2024

Or to find a way to remove these info lines from table-001.tlg file.

\l__tblr_a_int=\count...
\l__tblr_c_int=\count...
\l__tblr_r_int=\count...
\l__tblr_d_dim=\dimen...
\l__tblr_h_dim=\dimen...
\l__tblr_o_dim=\dimen...
\l__tblr_p_dim=\dimen...
\l__tblr_q_dim=\dimen...
\l__tblr_r_dim=\dimen...
\l__tblr_s_dim=\dimen...
\l__tblr_t_dim=\dimen...
\l__tblr_v_dim=\dimen...
\l__tblr_w_dim=\dimen...
\l__tblr_a_box=\box...
\l__tblr_b_box=\box...
\l__tblr_c_box=\box...
\l__tblr_d_box=\box...
\g__tblr_table_count_int=\count...
\c@rownum=\count...
\c@colnum=\count...
\c@rowcount=\count...
\c@colcount=\count...
\abovesep=\dimen...
\belowsep=\dimen...
\leftsep=\dimen...
\rightsep=\dimen...
\g_tblr_level_int=\count...
\g__tblr_data_row_key_count_int=\count...
\g__tblr_data_column_key_count_int=\count...
\g__tblr_data_cell_key_count_int=\count...
\g__tblr_array_int=\count...
\l__tblr_key_count_int=\count...
\l__tblr_key_quotient_int=\count...
\l__tblr_key_quotient_two_int=\count...
\l__tblr_key_remainder_int=\count...
\g__tblr_data_str_value_count_int=\count...
\rulewidth=\dimen...
\l__tblr_strut_dp_dim=\dimen...
\l__tblr_strut_ht_dim=\dimen...
\g__tblr_cell_wd_dim=\dimen...
\g__tblr_cell_ht_dim=\dimen...
\g__tblr_cell_head_dim=\dimen...
\g__tblr_cell_foot_dim=\dimen...
\l__tblr_column_target_dim=\dimen...
\l__tblr_caption_box=\box...
\l__tblr_caption_left_box=\box...
\l__tblr_row_head_box=\box...
\l__tblr_row_foot_box=\box...
\l__tblr_row_head_foot_dim=\dimen...
\tablewidth=\dimen...
\l__tblr_table_firsthead_box=\box...
\l__tblr_table_middlehead_box=\box...
\l__tblr_table_lasthead_box=\box...
\l__tblr_table_firstfoot_box=\box...
\l__tblr_table_middlefoot_box=\box...
\l__tblr_table_lastfoot_box=\box...
\l__tblr_remain_height_dim=\dimen...
\l__tblr_long_from_int=\count...
\l__tblr_long_to_int=\count...
\l__tblr_curr_i_int=\count...
\l__tblr_prev_i_int=\count...
\l__tblr_table_page_int=\count...
\l__tblr_table_head_box=\box...
\l__tblr_table_foot_box=\box...
\l__tblr_table_head_foot_dim=\dimen...
\l__tblr_table_head_body_foot_dim=\dimen...
\l__tblr_table_box=\box...
\l__tblr_table_hlines_box=\box...
\l__tblr_hline_box=\box...
\l__tblr_row_box=\box...
\l__tblr_col_o_wd_dim=\dimen...
\l__tblr_col_b_wd_dim=\dimen...
\l__tblr_hline_leftskip_dim=\dimen...
\l__tblr_hline_rightskip_dim=\dimen...
\l__tblr_row_ht_dim=\dimen...
\l__tblr_row_dp_dim=\dimen...
\l__tblr_row_abovesep_dim=\dimen...
\l__tblr_row_belowsep_dim=\dimen...
\l__tblr_row_vlines_box=\box...
\l__tblr_vline_box=\box...
\l__tblr_cell_box=\box...
\l__tblr_row_upper_dim=\dimen...
\l__tblr_row_lower_dim=\dimen...
\l__tblr_row_vpace_dim=\dimen...
\l__tblr_vline_aboveskip_dim=\dimen...
\l__tblr_vline_belowskip_dim=\dimen...
\l__tblr_cell_wd_dim=\dimen...
\l__tblr_cell_ht_dim=\dimen...
\l__tblr_diag_box=\box...

@muzimuzhi
Copy link
Collaborator

But it brings a problem that the test will fail whenever I add a new variable.

Only registers are accounted. Tl-based variables don't add log lines.

So the question is, would the registers in-use be relatively stable?

@lvjr
Copy link
Owner Author

lvjr commented Nov 17, 2024

You can't expect private registers to be stable. And even shifting the definition of a public register would make the test fail.

@lvjr
Copy link
Owner Author

lvjr commented Nov 17, 2024

I decide to move \debug_on:n { check-declarations } to manual.sty. In this way we can still catch the errors before new releases.

Also we may add lualatex manual-0.tex to texlive.yml. It seems pgf builds its manual in regression tests too.

@lvjr
Copy link
Owner Author

lvjr commented Nov 17, 2024

By the way, I found two more experimental public variables \rulewidth and \tablewidth in the above log file and have added them to issue #527.

@lvjr
Copy link
Owner Author

lvjr commented Nov 18, 2024

@muzimuzhi I didn't add lualatex manual-0.tex to texlive.yml. Not sure whether or not you like it, so I leave it to you.

@muzimuzhi
Copy link
Collaborator

It seems pgf builds its manual in regression tests too.

pgf doesn't have comprehensive test suite(s), so it compiles its example-rich manual as a (temporary) way to do regression tests. See pgf-tikz/pgf#1116 for its future plan.

Not sure whether or not you like it, so I leave it to you.

No strong opinion here. Feel free.

@muzimuzhi
Copy link
Collaborator

Note that \debug_on:n (or \sys_load_debug:) loads l3debug.def which wraps most l3kernel functions. This wrapping cannot be reverted by \debug_off:n so the patched l3kernel functions are permanently made a bit slower.

This may slow down compilation of the package manual

Compiling manual as part of the regression test is similar to setting recordstatus = true for l3build tests (also mentioned in #525 (comment)).

With recordstatus = true, lines like

***************
Compilation 1 of test file completed with exit status 0

will be appended to .tlg files.

One drawback is that l3build doesn't support per-testfile configs, so we cannot turn on recordstatus for a single test file without creating a new test set.

@lvjr
Copy link
Owner Author

lvjr commented Nov 18, 2024

Note that \debug_on:n (or \sys_load_debug:) loads l3debug.def which wraps most l3kernel functions. This wrapping cannot be reverted by \debug_off:n so the patched l3kernel functions are permanently made a bit slower.

Then I think it is a l3debug bug.

@lvjr
Copy link
Owner Author

lvjr commented Nov 19, 2024

As a workaround of the l3debug bug, I decide to only check declarations in single-chapter compilation.

@lvjr
Copy link
Owner Author

lvjr commented Nov 19, 2024

A future plan is to make codehigh run faster with LuaTeX (it is possible if we use pure Lua).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants