dense-analysis / dense-analysis/ale
Newly merged toml support is broken
- Dominant language
- Vim Script
- Stars
- 14k
- Forks
- 1.5k
- Avg merge
- 17h 49m
- Merged PRs (30d)
- 1
Description
## Information
**VIM version**
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jul 19 2025 02:13:20)
Included patches: 1-1566
Operating System: `Linux 6.12.41-0-lts #1-Alpine SMP PREEMPT_DYNAMIC 2025-08-07 06:15:54`
## What went wrong
It seems pull request #5022 was merged a bit too speedily without sufficient quality assurance. I was meaning to comment on it, but instead focused on the prior PR #4975 also by @mathstuf.
## Reproducing the bug
1. Create a new project directory.
`cd $( mktemp -d /tmp/ale_XXXXXX )`
2. Initialize a Rust project in it.
`cargo init`
3. Edit Cargo.toml.
`gvim Cargo.toml`
4. Change the edition to an invalid value.
`:.,$s/\(edition = "202\)./\13/`
Here we should expect an error message, but none occurs. Instead there are errors in `:ALEInfo` about the language server not starting.
### :ALEInfo
commit: d6f1a47
Applying the following patch ought to solve this specific issue:
```diff
diff --git a/ale_linters/toml/tombi.vim b/ale_linters/toml/tombi.vim
index 59c8da40..a43f0455 100644
--- a/ale_linters/toml/tombi.vim
+++ b/ale_linters/toml/tombi.vim
@@ -27,7 +27,7 @@ function! ale_linters#toml#tombi#GetProjectRoot(buffer) abort
endif
" Try to find nearest `git` directory
- let l:gitdir = ale#path#FindNearestFile(a:buffer, '.git')
+ let l:gitdir = ale#path#FindNearestDirectory(a:buffer, '.git')
if !empty(l:gitdir)
return fnamemodify(l:gitdir . '/', ':p:h:h')
```
Since no one did a full review of #5022 there might be other issues. Thus this issue is primary a question to @mathstuf whether you could please open a new PR based on the above patch?
Contributor guide
Assessment
This issue has not been assessed yet.