Load package dependencies of interfaces#367
Open
jeet-dekivadia wants to merge 3 commits into
Open
Conversation
Signed-off-by: Jeet Dekivadia <jeet.university@gmail.com>
AndrewNolte
reviewed
Jun 1, 2026
| } | ||
| } | ||
| // Interfaces and modules can add package dependencies of their own. | ||
| treesToProcess.push(newdoc->getSyntaxTree()); |
Collaborator
There was a problem hiding this comment.
This will result in a whole design being loaded in shallow compilation; we don't want this.
Contributor
Author
There was a problem hiding this comment.
Thanks for catching this. I narrowed the queue so discovered packages and interfaces are inspected recursively, while discovered modules are still added as shallow dependencies but are not queued. That keeps the interface-imported package case working without following the design hierarchy. I reran the Linux configure, build, CTest, and system-test lane successfully.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Correctness
The originating tree is always inspected. Discovered documents are always added to the shallow dependency set, but only package and interface syntax trees are queued for another discovery step. For the regression graph, the walk reaches
interface_consumer -> transitive_if -> transitive_pkg. A module discovered beneath another file is not queued, so the loader does not recursively follow the design hierarchy.Fixes #349
Remote Linux validation
git diff --checkuv run pre-commit run --all-filescmake --preset clang-release -DSLANG_CI_BUILD=ONcmake --build build/clang-release -j2ctest --test-dir build/clang-release --output-on-failure --no-tests=error -j2uv venvsource .venv/bin/activateuv syncpytest tests/system/ --binary build/clang-release/bin/slang-server