• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OpenModelica / modelica-language-server / 35618359654
84%

Build:
DEFAULT BRANCH: main
Ran 21 Sep 2026 03:34PM UTC
Jobs 1
Files 15
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Sep 2026 03:21PM UTC coverage: 77.951% (+0.7%) from 77.223%
35618359654

push

github

web-flow
Load library documents lazily instead of eagerly parsing every file (#83)

* Load library documents lazily instead of eagerly parsing every file

ModelicaLibrary.load() parsed and permanently retained a web-tree-sitter
syntax tree for every .mo file in every configured MODELICAPATH library at
startup. For a library the size of Buildings (thousands of files) this
exhausts the wasm parser's linear memory before the scan finishes, aborting
the whole process; reproduced with the real Buildings/MSL libraries, where
the second large library dies mid-scan and every library after that fails
instantly, matching OpenModelica/OpenModelica#16802 exactly.

Only the library root (package.mo) is now parsed eagerly, to register the
library's name/path. Individual documents are parsed on first reference,
via ModelicaLibrary.getOrLoadDocument, from both the async document-loading
path (ModelicaProject) and the synchronous symbol-resolution path
(resolveReference.ts, which already computed exact file paths and just did
a bare Map lookup rather than falling back to disk).

Also fixes several places that discarded or replaced a Tree without calling
tree.delete(): ModelicaDocument.update() on both the whole-document and
incremental-edit paths, ModelicaProject.removeDocument/removeLibrariesUnder,
and a discarded standalone-library guess in ModelicaProject.addDocument.
web-tree-sitter trees are backed by wasm linear memory that JS garbage
collection does not reclaim.

Fixes OpenModelica/OpenModelica#16802

* Document the library-loading and wasm memory-management design

Write up, in the server README, why library documents are loaded lazily
and the tree.delete() disposal contract decided while fixing #16802, so
it's not just implicit in the diff.

* Coordinate concurrent document loads and fix a TreeCursor leak

Lazy library loading (previous commit) made cold document loads routine
instead of rare, which turns a latent race in the cache-population paths
into a live one: Mo... (continued)

470 of 619 branches covered (75.93%)

Branch coverage included in aggregate %.

210 of 218 new or added lines in 5 files covered. (96.33%)

1 existing line in 1 file now uncovered.

3030 of 3871 relevant lines covered (78.27%)

13.08 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
90.94
-0.34% server/src/project/document.ts
1
94.59
1.14% server/src/project/library.ts

Coverage Regressions

Lines Coverage ∆ File
1
94.59
1.14% server/src/project/library.ts
Jobs
ID Job ID Ran Files Coverage
1 35618359654.1 21 Sep 2026 03:34PM UTC 15
77.95
GitHub Action Run
Source Files on build 35618359654
  • Tree
  • List 15
  • Changed 5
  • Source Changed 5
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35618359654
  • 5742409f on github
  • Prev Build on main (#34963154675)
  • Next Build on main (#35621683845)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc