Skip to content
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

Symbol indexing requires .target or .executableTarget which some packages don't contain #1944

Open
MahdiBM opened this issue Jan 22, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@MahdiBM
Copy link
Contributor

MahdiBM commented Jan 22, 2025

Swift version

6.0.3 release

Platform

macOS 15.2

Editor

Cursor

Description

From #1896 (comment):

this [the symbol-not-indexed problem] is happening again, but this time I have a simple repro.

Create a new package plugin:

swift package init --type command-plugin --disable-xctest --enable-swift-testing

Go to the file in the Plugins folder. Observe context's type is not indexed and all:

Image

This is with "backgroundPreparationMode": "enabled".

@ahoppen commented (#1896 (comment)):

That’s a different issue. It’s because you the package isn’t buildable in this state either. If you try to build, you get

error: The package does not contain a buildable target.
Add at least one `.target` or `.executableTarget` to your `Package.swift`.

Steps to Reproduce

See above.

Logging

No response

@MahdiBM MahdiBM added the bug Something isn't working label Jan 22, 2025
@ahoppen
Copy link
Member

ahoppen commented Jan 22, 2025

Synced to Apple’s issue tracker as rdar://143385183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants