Skip to content

Using 'toolsets' in config.json seems to require absolute file path (should work with relative too) #2148

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

Closed
kubamracek opened this issue May 12, 2025 · 1 comment · Fixed by #2150
Labels
bug Something isn't working

Comments

@kubamracek
Copy link

kubamracek commented May 12, 2025

Swift version

main-snapshot-2025-04-12 (per swiftly)

Platform

macOS

Editor

Sublime Text, Zed

Description

For Embedded Swift, we use toolset.json a lot. If I reference it from .sourcekit-lsp/config.json with an absolute path, it gets picked up correctly:

{
  "swiftPM": {
    "configuration": "release",
    "triple": "armv7em-none-none-eabi",
    "toolsets": ["/Users/kuba/Documents/swift-embedded-examples/stm32-lvgl/toolset.json"]
  }
}
--> ✅

But absolute paths are problematic to share between multiple people. I tried all possible "../", "../../" combinations of relative paths, and they don't seem to work:

{
  "swiftPM": {
    "configuration": "release",
    "triple": "armv7em-none-none-eabi",
    "toolsets": ["../toolset.json"]
  }
}
--> ❌

Steps to Reproduce

No response

Logging

No response

@kubamracek kubamracek added the bug Something isn't working label May 12, 2025
@bnbarham
Copy link
Contributor

We only added toolsets to the config here fairly recently with:

customToolsets: options.swiftPMOrDefault.toolsets?.map { try AbsolutePath(validating: $0) } ?? []

I'll have a look to see how --toolset ends up being passed through. We might just be a little over eager with the AbsolutePath here.

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

Successfully merging a pull request may close this issue.

2 participants