Skip to content

[bibtex] Refactor string pool - #1308

Merged
CraftSpider merged 5 commits into
tectonic-typesetting:masterfrom
CraftSpider:bibtex-strings
Jul 30, 2025
Merged

[bibtex] Refactor string pool#1308
CraftSpider merged 5 commits into
tectonic-typesetting:masterfrom
CraftSpider:bibtex-strings

Conversation

@CraftSpider

Copy link
Copy Markdown
Contributor

Encapsulates and converts to idiomatic Rust the StringPool.

- Other files no longer need access to internal fields
- Hash-related functions moved to HashData
- Cursor-based API should allow no-allocation writes to the string pool
@codecov

codecov Bot commented Jul 30, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.79339% with 183 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.16%. Comparing base (14aefdc) to head (3afa239).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
crates/engine_bibtex/src/lib.rs 62.68% 19 Missing and 56 partials ⚠️
crates/engine_bibtex/src/exec.rs 66.46% 49 Missing and 7 partials ⚠️
crates/engine_bibtex/src/pool.rs 85.36% 14 Missing and 4 partials ⚠️
crates/engine_bibtex/src/bibs.rs 47.05% 9 Missing ⚠️
crates/engine_bibtex/src/auxi.rs 25.00% 1 Missing and 5 partials ⚠️
crates/engine_bibtex/src/bst.rs 89.36% 4 Missing and 1 partial ⚠️
crates/engine_bibtex/src/cite.rs 66.66% 4 Missing ⚠️
crates/engine_bibtex/src/hash.rs 96.22% 4 Missing ⚠️
crates/engine_bibtex/src/global.rs 25.00% 3 Missing ⚠️
crates/engine_bibtex/src/scan.rs 91.30% 0 Missing and 2 partials ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1308      +/-   ##
==========================================
+ Coverage   28.12%   28.16%   +0.03%     
==========================================
  Files         266      267       +1     
  Lines      202442   202507      +65     
  Branches   202442   202507      +65     
==========================================
+ Hits        56936    57027      +91     
+ Misses      64147    64141       -6     
+ Partials    81359    81339      -20     
Components Coverage Δ
tectonic 50.89% <ø> (ø)
bridge_core 34.73% <ø> (ø)
bridge_flate 38.82% <ø> (ø)
bridge_fontconfig 83.06% <ø> (ø)
bridge_freetype2 92.00% <ø> (ø)
bridge_graphite2 ∅ <ø> (∅)
bridge_harfbuzz ∅ <ø> (∅)
bridge_icu ∅ <ø> (∅)
bridge_png 100.00% <ø> (ø)
bundles 34.78% <ø> (ø)
cfg_support 94.84% <ø> (ø)
dep_support 0.00% <ø> (ø)
docmodel 84.09% <ø> (ø)
engine_bibtex 65.11% <74.79%> (+0.78%) ⬆️
engine_spx2html 0.00% <ø> (ø)
engine_xdvipdfmx 55.58% <ø> (ø)
engine_xetex 35.28% <ø> (ø)
errors 47.61% <ø> (ø)
geturl 27.16% <ø> (ø)
io_base 76.04% <ø> (ø)
pdf_io 14.31% <ø> (-0.01%) ⬇️
status_base 71.76% <ø> (ø)
xdv 0.00% <ø> (ø)
xetex_format 22.80% <ø> (ø)
xetex_layout 42.81% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CraftSpider

CraftSpider commented Jul 30, 2025

Copy link
Copy Markdown
Contributor Author

This passes tectonic-on-arXiv, so no changes. There's a little fib in the logs now - they claim to have a max strings, but this change uncaps the StringPool. It now grows more dynamically, meaning max strings is no longer meaningful. But the goal is byte-for-byte compat, so for now, we keep that log the same.

(I don't think allowing more strings breaks compat, as it would allow strictly more things to work. Making something not an error isn't breaking, as no one could have been writing something that worked with it before anyways.)

@CraftSpider
CraftSpider merged commit 974fa44 into tectonic-typesetting:master Jul 30, 2025
29 checks passed
@CraftSpider
CraftSpider deleted the bibtex-strings branch August 12, 2025 18:44
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

Successfully merging this pull request may close these issues.

1 participant