Skip to content

Reprioritize the analysis search path #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 20, 2025
Merged

Reprioritize the analysis search path #330

merged 2 commits into from
Jan 20, 2025

Conversation

cirras
Copy link
Collaborator

@cirras cirras commented Jan 13, 2025

This PR includes the browsing path in the search path, makes changes to the order of paths during SearchPath creation, and changes up the order of the unit data processing in the SymbolTableBuilder.

The new search path priority is (highest to lowest):

  • sonar.sources
  • DCCReference
  • DCC_UnitSearchPath
  • Debugger_DebugSourcePath
  • DelphiLibraryPath
  • DelphiTranslatedLibraryPath
  • DelphiBrowsingPath
  • Standard library

This change enables behaviors like:

  • shadowing standard library units with a unit on DCC_UnitSearchPath
  • shadowing DCC_UnitSearchPath units with a DCCReference unit

These cases are somewhat unusual, but they are possible in Delphi.

@cirras cirras requested a review from fourls January 13, 2025 04:22
@cirras cirras force-pushed the search-path-priority branch from 975c98e to f7ce4ed Compare January 13, 2025 04:28
This change enables behaviors like:
- shadowing standard library units with a unit on `DCC_UnitSearchPath`
- shadowing `DCC_UnitSearchPath` units with a `DCCReference` unit

These cases are somewhat unusual, but they are possible in Delphi.
@cirras cirras force-pushed the search-path-priority branch from f7ce4ed to 075807c Compare January 13, 2025 06:20
Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

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

Looks good! Just have a couple of questions.

@cirras cirras force-pushed the search-path-priority branch from 075807c to 094b175 Compare January 17, 2025 05:15
@cirras cirras requested a review from fourls January 17, 2025 05:16
@cirras cirras force-pushed the search-path-priority branch 2 times, most recently from 29243ea to 1dbe3a8 Compare January 19, 2025 22:28
Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

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

Looks good, just one nitpick.

@cirras cirras force-pushed the search-path-priority branch from 1dbe3a8 to 7229927 Compare January 20, 2025 02:28
@cirras cirras requested a review from fourls January 20, 2025 02:33
Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

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

Looks good!

@cirras cirras merged commit b692609 into master Jan 20, 2025
4 checks passed
@cirras cirras deleted the search-path-priority branch January 20, 2025 03:18
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.

2 participants