-
Notifications
You must be signed in to change notification settings - Fork 335
[VSC-1578] Modify Event Activation for file types #1568
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
47b3ff4
feat: Modify Event Activation for file types
radurentea 88531ed
fix: If idf project is detected, activate
radurentea 159ba4c
fix: Ignore *.code-profile for linting
radurentea 89c2708
fix: activation for folder without CMakeLists.txt file
radurentea 254747e
Improve ESP-IDF project detection and update messages
radurentea 8de3a7c
feat: optimize extension activation for multi-workspace ESP-IDF projects
radurentea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ get_serial_list.py | |
| *.vsix | ||
| export.ps1 | ||
| export.bat | ||
| *.code-profile | ||
|
|
||
| #dirs | ||
| .vscode | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need
node_modules? Isn't it from JavaScript Typescript projects ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build folder is also used in CMake project or many other kind of projects. The next validation is only for CMakeLists.txt so I'm just wondering why other files are needed here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The vscode.workspace.findFiles expects as a second argument an exclusion pattern. I just thought it would be good to ignore searching in file such as "node_modules" and "build", if they are present in the opened workspace.
This was the exact thing I wanted to discuss about this new implementation: I can remove the "node_modules" if you think it's unnecessary or add these exclusion patterns for other languages as well, to increase performance of
vscode.workspace.findFilesThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see.
Remember that the extension is activated either by running command or
"workspaceContains:**/CMakeLists.txt"Later you can use loop of all workspaceFolders with a relative pattern per workspace folder validation for root only:
The content you are validating is for ESP-IDF root CMakeLists.txt only, so no need to check additional places.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed the implementation once again based on our discussion only needing the CMakeLists.txt from root level. There is no need to use workspace.findFiles() anymore. I've left more details in the commit description