Skip to content

Use the build folder as an underlay of the index build folder #1270

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

Open
ahoppen opened this issue May 9, 2024 · 3 comments
Open

Use the build folder as an underlay of the index build folder #1270

ahoppen opened this issue May 9, 2024 · 3 comments

Comments

@ahoppen
Copy link
Member

ahoppen commented May 9, 2024

The current design for indexing makes the index build completely independent of the “real” build. We need do decide whether we want to continue using the build folder as an underlay for the index build folder. This could solve problems where the index build fails to build one of the modules / whatever. Tricky questions are:

  • The user might specify additional build parameters like -Xswiftc or environment variables that modify the evaluation of Package.swift on the command line, which means that the build folder uses a different configuration than the index build folder
  • The user might not even build into .build (by specifying --scratch-dir) which means that we don’t even know where the build folder is, in general.

rdar://127476264

@adam-fowler
Copy link
Contributor

If the user adds build arguments in VSCode I pass these onto SourceKit-LSP already.

@adam-fowler
Copy link
Contributor

I'd have to double check scratch folder though. Is it possible to pass this onto SKLSP

@samdeane
Copy link

samdeane commented Oct 11, 2024

Even if the index build remains independent, it would be useful if the default location was inside .build, as it would generally be picked up by existing .gitignore rules.

Eg default to something like .build/index/ instead of .index-build.

I've turned this setting on for the vscode extension in various projects and then wondered why git is telling me I have 2000+ changes all of a sudden...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants