Skip to content

Conversation

plemarquand
Copy link
Contributor

@plemarquand plemarquand commented Sep 29, 2025

Description

A .bsp folder was considered a valid workspace folder, but the extension activation events in the package.json were not configured to search for it, meaning another valid file/folder for activation had to be present. If that was the case, then the .bsp folder would be discovered correctly, but not if it was the only file/folder in the folder that would activate the extension.

Add it to the list of valid activation file types. Also clean up this code path a bit, ignoring common folders we shouldn't search for projects.

Tasks

  • Required tests have been written
  • Documentation has been updated
  • Added an entry to CHANGELOG.md if applicable

@plemarquand
Copy link
Contributor Author

This can be verified with a project like https://github.com/spotify/sourcekit-bazel-bsp/tree/main/Example

@plemarquand plemarquand closed this Oct 2, 2025
@plemarquand plemarquand reopened this Oct 2, 2025
@plemarquand
Copy link
Contributor Author

This can be verified with a project like https://github.com/spotify/sourcekit-bazel-bsp/tree/main/Example

}

await globDirectory(folder, { onlyDirectories: true }).then(async entries => {
const skipFolders = new Set<string>([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably should make this list a setting to allow excluding others and maybe user may want to add one of these folder. I'm thinking maybe bazel could generate a package for them possibly...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I'll make the change

"bazel-out",
"bazel-bin"
],
"markdownDescription": "A list of glob patterns to ignore when searching sub-folders for Swift Packages. The `swift.searchSubfoldersForPackages` must be `true` for this setting to have an effect. Always use forward-slashes in glob expressions regardless of platform. This is combined with VS Code's default `files.exclude` setting.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually a glob pattern though? Seems like we just look at the basename of the folder and then skip if it matches something in this list?

Also wondering if the "default" could be removed from "This is combined with VS Code's default files.exclude setting.", and just say "This is combined with VS Code's files.exclude setting." to make it clearer?

A .bsp folder was considered a valid workspace folder, but the extension
acitvation events in the package.json were not configured to search for
it, meaning another valid file/folder for activation had to be present.
If that was the case, then the .bsp folder would be discovered
correctly, but not if it was the only file/folder in the folder that
would activate the extension.

Add it to the list of valid activation file types. Also clean up this
code path a bit, ignoring common folders we shouldn't search for
projects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants