Skip to content

Index PhyslibAlpha and QuantumInfo, not just Physlib - #28

Merged
Gabrielebattimelli merged 1 commit into
mainfrom
fix/index-all-namespaces
Aug 26, 2026
Merged

Index PhyslibAlpha and QuantumInfo, not just Physlib#28
Gabrielebattimelli merged 1 commit into
mainfrom
fix/index-all-namespaces

Conversation

@Gabrielebattimelli

Copy link
Copy Markdown
Member

Why

PhysLib's lakefile declares three Lean libraries:

[[lean_lib]] name = "Physlib"
[[lean_lib]] name = "PhyslibAlpha"
[[lean_lib]] name = "QuantumInfo"

MODULE_NAMES only listed Physlib, so roughly 130 of ~620 source files (~47 in PhyslibAlpha, ~84 in QuantumInfo) were never indexed and have never appeared in search.

Note: the recent runs are not failing — the last 7 scheduled runs all succeeded. The pipeline was healthy; it was just indexing a subset of the library.

What

Two changes, because jixia analyses .olean files rather than sources:

  1. Index all three namespacesMODULE_NAMES: Physlib,PhyslibAlpha,QuantumInfo
  2. Build all three. PhyslibAlpha is absent from the lakefile's defaultTargets, so plain lake build never compiled it — jixia cannot analyse what lake never built. The build step now passes MODULE_NAMES to lake explicitly. Timeout raised 90 → 120 min for the extra libraries on a cold cache.
  3. Assert per-namespace module counts after the load. A library that fails to build yields no modules rather than an error, so a namespace can vanish from the index silently — exactly how PhyslibAlpha stayed missing while every run reported success.

Verified

  • YAML and the embedded Python parse
  • parse_name('PhyslibAlpha.Foo')['PhyslibAlpha', 'Foo'], confirming name->>0 extracts the namespace as the new check assumes

Expect

The first run will be long — it builds two additional libraries and indexes ~130 new files through informalize and embedding.

PhysLib's lakefile declares three Lean libraries -- Physlib, PhyslibAlpha and
QuantumInfo -- but MODULE_NAMES only listed Physlib, so roughly 130 of its
~620 source files were never indexed and never appeared in search.

Two changes are needed, because jixia analyses .olean files rather than
sources: index all three namespaces, and build all three. PhyslibAlpha is
absent from the lakefile's defaultTargets, so plain 'lake build' never
compiled it -- pass MODULE_NAMES to lake explicitly. Raise the build timeout
to 120 min to cover the extra libraries on a cold cache.

Also assert per-namespace module counts after the load. A library that fails
to build yields no modules rather than an error, so without this check a
namespace can disappear from the index silently -- which is exactly how
PhyslibAlpha stayed missing while every run reported success.
@Gabrielebattimelli
Gabrielebattimelli merged commit db16111 into main Aug 26, 2026
1 check passed
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