zed
zed copied to clipboard
Breadcrumbs failing occasionally on swift land extensions
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
This was initially created here https://github.com/alex-pinkus/tree-sitter-swift/issues/429. but I guess it's just zed flaw.
While the outlines presents all layers solid in all tested cases. The breadcrumbs in zed editor fails to provide the full path some times. For instance it'll fail to do so if to uncomment the very last extension (I believe extension itself are the key thing here).
Here's the same issue occurred in my prod code. Any ideas why this could happens and how to fix it?
Environment
Zed: v0.150.4 (Zed) OS: macOS 15.0.0 Memory: 16 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
Source to reproduce the issue could be found here https://github.com/alex-pinkus/tree-sitter-swift/blob/main/test/outline/outline.swift
If last three lines commented breadcrumbs working well, but when it's not it fails to present type scope to the rest of the file.
If applicable, attach your Zed.log file to this issue.
Zed.log
@Moshyfawn I'd disagree that this issue got anything to do with language server, if it is a zed's bug it's a bug with handling tree-sitter grammars within the breadcrumbs code only (outline provides correct outline of the very same code).
Can you provide an self contained set of steps to reproduce this issue (e.g. put this content into this file, save, comment out this line and X happens, but I expect Y should happen) so we can investigate further?
- open this very file in zed https://github.com/alex-pinkus/tree-sitter-swift/blob/main/test/outline/outline.swift
- put the cursor in the position as it is on the screenshot.
- Check the breadcrumbs, it will ignore the class scope showing just the var scope in the path. i.e. the path would be
var textureswhile it should beSomeEnum: textures - bonus: comment out the extension with the "// breaks breadcrumbs" comment (in the very end of the file) and the path from the point 2 would be just fine, i.e.
SomeEnum: textures.
@notpeter
Zed: v0.170.2 (Zed) OS: macOS 15.2.0 Memory: 16 GiB Architecture: aarch64
Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 7 days. Thanks for your help!
Yes, it still there
Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 7 days. Thanks for your help!
Yes, it still persists, just checked it