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

OpenModelica / modelica-language-server / 33730512443
72%

Build:
DEFAULT BRANCH: main
Ran 03 Sep 2026 07:54AM UTC
Jobs 1
Files 14
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

03 Sep 2026 07:54AM UTC coverage: 72.321% (+0.4%) from 71.927%
33730512443

push

github

web-flow
Resolve documents in libraries the client never announced (#75)

Opening a file that belongs to a library the server has not been told about
left the file entirely unusable: no hover, no go-to-definition, not even for a
declaration in the same file. `Project.addDocument` can load a document that
declares no `within` clause as a standalone library, but a document inside a
package declares one, so it fell through to

    Failed to add document '...': not a part of any libraries.

This is what AnHeuermann reported on OpenModelica#15925: `spring` in
`Modelica.Blocks.Examples.PID_Controller` would not resolve until the MSL was
added by hand under Library Paths. Clients can avoid it by announcing
libraries first, but the server should not depend on that.

Load the enclosing library instead. `ModelicaLibrary.load` already finds the
real root by walking up from the directory it is given, using the `within`
depth of that directory's `package.mo`, so pointing it at the document's own
directory is enough.

That walk-up kept the name it was constructed with, which is the name of the
folder it started from rather than the library root: loading
'Modelica 4.1.0/Blocks' produced a library called `Blocks` rooted at
'Modelica 4.1.0', and nothing could resolve `Modelica.*` against it. Harmless
while libraries were only ever loaded from their root; the common case now, so
derive the name from the corrected root.

Also drop the emoji from the ERROR/WARNING log labels. They are sent to
clients as window/logMessage text, and OMEdit's Messages Browser renders them
with a font that has no colour-emoji glyph, so users see a replacement box.

Verified against the real Modelica 4.1.0 on disk, with nothing announced:
`spring` at Blocks/package.mo:56 resolves to Blocks/package.mo:34, having
discovered the library root and loaded 2552 documents in ~4 s. Without the
change the same call reports NOT RESOLVED.

One behaviour change worth noting for review: because updateDocument loads... (continued)

424 of 561 branches covered (75.58%)

Branch coverage included in aggregate %.

402 of 429 new or added lines in 3 files covered. (93.71%)

2573 of 3583 relevant lines covered (71.81%)

13.42 hits per line

Uncovered Changes

Lines Coverage ∆ File
20
92.22
-1.11% server/src/project/project.ts
7
93.45
2.31% server/src/project/library.ts
Jobs
ID Job ID Ran Files Coverage
1 33730512443.1 03 Sep 2026 07:54AM UTC 14
72.32
GitHub Action Run
Source Files on build 33730512443
  • Tree
  • List 14
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #33730512443
  • 7fb5dcdb on github
  • Prev Build on main (#33729880720)
  • Next Build on main (#33731605478)
  • 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