Repository navigation
Conversation
…r discovery A file opened by its real path gets the settings of a workspace folder opened through a symlink, and `..` in a path no longer selects the settings of the folder it leaves. The nested configuration search only honours .gitignore when the root configuration does (vcs.enabled and vcs.useIgnoreFile). Document the remaining path edge cases.
This was referenced Oct 24, 2026
This branch has not been deployed
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.
Stacked on #921 → #915 → #908 → #902 → #895 → #881. Must merge after #881.
The path-matching edge cases from the release review (C19). Settings are picked by comparing a file's path with the workspace and nested folders as strings, which went wrong in three cases that are clearly bugs.
..picked the folder it leaves./repo/db1/../db2/a.sqlstarts with/repo/db1, so it gotdb1's settings (and database). The CLI produces such paths fromcheck db1/../db2/a.sql, and editors can too. Paths are now normalized lexically (./..removed, without touching the disk) before the settings lookup in the workspace and before the LSP picks the project.normalize_pathmoved frompgls_workspace::configurationtopgls_fsfor that.Symlinked workspace folders. With a folder opened as
/home/a/link(a symlink to/data/repo) and a file opened by its real path, e.g. from a "go to definition" or a terminal link, the file matched no folder and got the defaults of a file outside every folder (since #902). The workspace now remembers the real path of each project folder and maps paths below it back onto the folder; the LSP does the same when picking the project. On Windows the\\?\prefix thatcanonicalizeadds is stripped..gitignorewithvcs.enabled: false. The nested configuration search always honoured.gitignore, while the settings only use it withvcs.enabledandvcs.useIgnoreFile(and this repo's own config setsenabled: false). With VCS off, a config in a gitignored folder was silently not loaded, although the files there were checked.FindFilesgetsvcs_ignore_files, which the search sets the way the settings would;.ignorefiles are always honoured.Documented, not changed (
docs/configuration.md):canonicalizeper file and request./Users/a/Repoand/Users/a/repoare different folders to the server. Editors send the spelling of the workspace folder, so this only bites when paths are typed by hand.migrationsDirreplaces themigrationssettings too (nothing is inherited), so its files aren't migrations unless it setsmigrationsitself or extends the parent. This follows from the no-inheritance design of feat: apply the nearest configuration file to each file (nested configs) #881.Tests
pgls_workspace:files_below_the_real_path_of_a_symlinked_folder_use_its_settings(Unix), and..cases infiles_use_the_nearest_configuration_file.files_opened_by_their_real_path_belong_to_a_symlinked_folder(Unix).pgls_fs:honours_gitignore_files_only_if_asked.nested_configurations_ignore_gitignore_without_vcs.Risks
initdefault), discovery now walks gitignored folders such asbuild/ordist/. The entry limit from perf(workspace): bound nested configuration discovery #895 still bounds it; ignoring them infiles.ignoremakes it faster.