Skip to content

conflicting assignment fixes - #248

Merged
JonatanWaern merged 3 commits into
mainfrom
conflicting-assignment-fixes
Nov 2, 2026
Merged

JonatanWaern merged 3 commits into
mainfrom
conflicting-assignment-fixes

Conversation

@JonatanWaern

Copy link
Copy Markdown
Contributor
  • Do not conflict assignments with themselves when their conditions differ
  • Merge equivalent externs

@JonatanWaern
JonatanWaern force-pushed the conflicting-assignment-fixes branch from 82be50f to d1b0e72 Compare November 2, 2026 08:49
Signed-off-by: Jonatan Waern <jonatan.waern@intel.com>
Signed-off-by: Jonatan Waern <jonatan.waern@intel.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Repeated extern declarations can deadlock device analysis, while per-declaration symbol storage also causes duplicate navigation results.

2 open issues
What changed in this PR

This PR updates DML language-server analysis to avoid parameter self-conflicts across conditional paths and merge repeated extern declarations into shared symbols.

Changes:

  • Compare distinct parameter assignments while preserving conditional reachability.
  • Merge extern declarations and retain their navigation locations, with type-equivalence checking explicitly deferred.
  • Add regression fixtures, lookup tests, and changelog entries.
File Description
tests/​test_files/​repeated_externs.dml Covers repeated extern navigation and extern/session collisions.
tests/​test_files/​repeated_extern_import.dml Supplies imported extern declarations for merging tests.
tests/​test_files/​conditional_parameter_paths.dml Covers shared assignments, exclusive branches, and genuine conflicts.
tests/​lsp_lookup_tests.rs Adds extern lookup and conditional parameter diagnostic tests.
src/​analysis/​templating/​objects.rs Groups extern declarations and revises parameter conflict detection.
src/​analysis/​mod.rs Maps merged extern declarations to shared symbols.
CHANGELOG.md Documents both behavior changes and deferred extern type checking.

Review effort: Balanced

Comment thread src/analysis/mod.rs Resolved
Comment thread src/analysis/mod.rs Resolved
Used to be one symbol per merged decl, now one symbol contains all merged decls as possible decl spans

Signed-off-by: Jonatan Waern <jonatan.waern@intel.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Extern collisions suppress diagnostics for incompatible declarations, and location-only indexing can mix declarations and references across scopes.

2 open issues
2 resolved since last review

Review effort: Balanced

Comment thread src/analysis/mod.rs Resolved
Comment thread src/analysis/templating/objects.rs Resolved
@JonatanWaern
JonatanWaern merged commit 4d8cede into main Nov 2, 2026
5 checks 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.

3 participants