zed icon indicating copy to clipboard operation
zed copied to clipboard

Breadcrumbs failing occasionally on swift land extensions

Open yaroslavyaroslav opened this issue 1 year ago • 5 comments

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?

Screenshot 2024-08-23 at 17 15 44

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

yaroslavyaroslav avatar Sep 05 '24 19:09 yaroslavyaroslav

@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).

yaroslavyaroslav avatar Sep 18 '24 09:09 yaroslavyaroslav

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?

notpeter avatar Jan 24 '25 17:01 notpeter

  1. open this very file in zed https://github.com/alex-pinkus/tree-sitter-swift/blob/main/test/outline/outline.swift
  2. put the cursor in the position as it is on the screenshot.
  3. Check the breadcrumbs, it will ignore the class scope showing just the var scope in the path. i.e. the path would be var textures while it should be SomeEnum: textures
  4. 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

Image

Zed: v0.170.2 (Zed) OS: macOS 15.2.0 Memory: 16 GiB Architecture: aarch64

yaroslavyaroslav avatar Jan 25 '25 15:01 yaroslavyaroslav

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!

github-actions[bot] avatar Jun 04 '25 07:06 github-actions[bot]

Yes, it still there

yaroslavyaroslav avatar Jun 04 '25 07:06 yaroslavyaroslav

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!

github-actions[bot] avatar Oct 08 '25 07:10 github-actions[bot]

Yes, it still persists, just checked it

yaroslavyaroslav avatar Oct 08 '25 11:10 yaroslavyaroslav