-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
refactor!: deprecate util.root_pattern #3569
Conversation
I couldn't come up with a good way to replicate the functionality provided by |
23b1228
to
33a5cb3
Compare
6b02073
to
1a34a23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before merging this, let's wait a ~day to see if master is stable enough to tag a release.
Also: hoping that once we bump the minimum Nvim to 0.10, we can migrate these cases to vim.fs.root
. If vim.fs.root
doesn't work then we need to find out what it's missing ASAP :)
Looking more closely: I think I'll add this info to the commit message as well. |
1a34a23
to
d95c5d9
Compare
The primary (and potentially breaking) change is that `util.root_pattern` traverses once per provided file pattern, while `vim.fs.find` only traverses once. This means that the search will no longer be prioritized by file order, which may break user configurations who unkowingly rely on this behavior. This will also be breaking for language servers that rely on code dependencies that is archived but still needs to be read. More context: neovim#1687. Work on neovim#2079.
d95c5d9
to
3065004
Compare
Er, that's very much intentional: #2885 Changing it to "random" would be even worse than reverting that PR.
There was quite a lot of user input, and PRs, on this topic (unless I'm mistaken about #2885 being related). Related?: |
What about the following?
This approach seems like the simplest way to move forward, but I understand if you're hesitant to add more options to Edit: in the meantime, this problem can be worked around by doing multiple calls to |
Those SGTM.
Maybe we should keep |
Oof. I understand. Closing for now until there's a solution in core as described in #3569 (comment). |
The primary (and potentially breaking) change is that
util.root_pattern
traverses once per provided file pattern, whilevim.fs.find
only traverses once. This means that the search will nolonger be prioritized by file order, which may break user configurations
who unkowingly rely on this behavior.
This will also be breaking for language servers that rely on code
dependencies that is archived but still needs to be read. More context:
#1687.
Work on #2079.