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

Auto select active folder feature not working with project having same starting names #4146

Open
MNASTM opened this issue Oct 29, 2024 · 5 comments
Labels
bug a bug in the product Feature: UI help wanted we currently are not planning work on this and would like help from the open source community
Milestone

Comments

@MNASTM
Copy link

MNASTM commented Oct 29, 2024

Brief Issue Summary

Considering user is NOT working with multi root workspaces, but with the single folder structure:

MyFolder
├── .vscode
├── MyProjectA
├── MyProjectABC

the .vscode/.settings.json contains:

{
"cmake.sourceDirectory": ["<pathTo>/MyFolder/MyProjectA","<pathTo>/MyFolder/MyProjectABC"],
}

In this case, the Automatic select active folder feature is not working and always stays on MyProjectA, I assume because:

<pathTo>/MyFolder/MyProjectABC/src/main.c starts with <pathTo>/MyFolder/MyProjectA so it thinks it belongs to MyProjectA

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

@MNASTM
Copy link
Author

MNASTM commented Oct 29, 2024

Issue spotted I think:

return file.startsWith(parent);

Small test adding a trailing path separator of the parent project path to avoid partial match looks to fix the issue.

I can create a PR if that's fine :)

@gcampbell-msft
Copy link
Collaborator

@MNASTM That would be great! We're always happy to take community contributions.

@gcampbell-msft gcampbell-msft added bug a bug in the product help wanted we currently are not planning work on this and would like help from the open source community and removed triage labels Oct 29, 2024
@gcampbell-msft gcampbell-msft added this to the On Deck milestone Oct 29, 2024
@gcampbell-msft gcampbell-msft moved this from Blocked to Pending Prioritization in CMake Tools Oct 29, 2024
@MNASTM
Copy link
Author

MNASTM commented Oct 29, 2024

I am not able to push my branch:

Permission to microsoft/vscode-cmake-tools.git denied to MNASTM fatal: unable to access 'https://github.com/microsoft/vscode-cmake-tools.git/': The requested URL returned error: 403

Either I am missing something from this project or I have a conflicting configuration with my compagnie organization. Please let me know if something is required from your side?

@gcampbell-msft
Copy link
Collaborator

@MNASTM I believe the issue is that the preferred way to make PR's into our repo is by creating a personal fork of the repository and then creating a PR from that. You can see examples of PRs from other contributors in the currently active PRs, here is an example as well: #4129

MNASTM added a commit to MNASTM/vscode-cmake-tools that referenced this issue Oct 30, 2024
@MNASTM
Copy link
Author

MNASTM commented Oct 30, 2024

@MNASTM I believe the issue is that the preferred way to make PR's into our repo is by creating a personal fork of the repository and then creating a PR from that. You can see examples of PRs from other contributors in the currently active PRs, here is an example as well: #4129

My bad, thx!

MNASTM added a commit to MNASTM/vscode-cmake-tools that referenced this issue Oct 30, 2024
Contributed by STMicroelectronics
Signed-off-by: Matthieu NAUD<[email protected]>
MNASTM added a commit to MNASTM/vscode-cmake-tools that referenced this issue Nov 4, 2024
Contributed by STMicroelectronics
Signed-off-by: Matthieu NAUD<[email protected]>
MNASTM added a commit to MNASTM/vscode-cmake-tools that referenced this issue Nov 4, 2024
Contributed by STMicroelectronics
Signed-off-by: Matthieu NAUD<[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the product Feature: UI help wanted we currently are not planning work on this and would like help from the open source community
Projects
Status: Pending Prioritization
Development

No branches or pull requests

2 participants