Skip to content

Fix resolving symbols standalone files#54

Merged
AnHeuermann merged 2 commits into
OpenModelica:mainfrom
AnHeuermann:fix-resolve
Jun 22, 2026
Merged

Fix resolving symbols standalone files#54
AnHeuermann merged 2 commits into
OpenModelica:mainfrom
AnHeuermann:fix-resolve

Conversation

@AnHeuermann

@AnHeuermann AnHeuermann commented Jun 22, 2026

Copy link
Copy Markdown
Member

Issue

Resolving symbols failed when the workspace contained a standalone file
whose class name differed from its filename, or multiple libraries
sharing the same top-level name.

Changes

Fix reference resolution for standalone files and same-named libraries

  • analyzer.ts: resolve nested library entries against libraryPath
    instead of the process CWD, so nested packages are discovered
    consistently.
  • resolveReference.ts: iterate over all libraries matching the first
    symbol instead of only the first find match, so resolution doesn't
    give up when a same-named library lacks the symbol.
  • project.ts: register standalone documents under their declared class
    name (not the filename) so they can be resolved by class name.
  • library.ts: allow a library's name to be reassigned via rename().
  • Update all OSMC copyright claims

AnHeuermann and others added 2 commits June 22, 2026 14:08
Resolving symbols failed when the workspace contained a standalone file
whose class name differed from its filename, or multiple libraries
sharing the same top-level name.

- analyzer.ts: resolve nested library entries against `libraryPath`
  instead of the process CWD, so nested packages are discovered
  consistently.
- resolveReference.ts: iterate over all libraries matching the first
  symbol instead of only the first `find` match, so resolution doesn't
  give up when a same-named library lacks the symbol.
- project.ts: register standalone documents under their declared class
  name (not the filename) so they can be resolved by class name.
- library.ts: allow a library's name to be reassigned via `rename()`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@AnHeuermann AnHeuermann self-assigned this Jun 22, 2026
@AnHeuermann AnHeuermann enabled auto-merge (squash) June 22, 2026 12:12
@AnHeuermann AnHeuermann merged commit 620a967 into OpenModelica:main Jun 22, 2026
3 checks passed
@AnHeuermann AnHeuermann deleted the fix-resolve branch June 22, 2026 12:13
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