Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Conversation

@oppiliappan
Copy link
Contributor

imports are both definitions (the introduction of a name to a syntax tree) and references (they refere to a name outside this syntax tree).

this should help improve cross-file navigation using the following heuristics:

  • the definition of a name can exclude imports in cross-file navigation by default
  • if no definition exists for a name across the entire repo, this name is an externally definied name, we can mark its import node in the same syntax-tree (or file) as its definition node

`import`s are both definitions (the introduction of a name to a syntax
tree) and references (they refere to a name outside this syntax tree).

this should help improve cross-file navigation using the following
heuristics:

- the definition of a name can exclude imports in cross-file navigation
  by default
- if no definition exists for a name across the entire repo, this name
  is an externally definied name, we can mark its import node in the
  same syntax-tree (or file) as its definition node
@oppiliappan oppiliappan marked this pull request as draft May 15, 2023 11:51
@oppiliappan oppiliappan marked this pull request as ready for review May 16, 2023 10:24
@oppiliappan oppiliappan requested a review from ggordonhall May 16, 2023 10:24
@oppiliappan oppiliappan marked this pull request as draft May 17, 2023 12:00
@oppiliappan oppiliappan marked this pull request as ready for review May 19, 2023 08:37
Copy link
Contributor

@ggordonhall ggordonhall left a comment

Choose a reason for hiding this comment

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

On the whole this works well. There are still some cases that we need to think about, but can take these on in future PRs.

@oppiliappan oppiliappan merged commit 34f9dd4 into main May 19, 2023
@oppiliappan oppiliappan deleted the scope-res-imports branch May 19, 2023 13:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants