Skip to content

Conversation

@ctidd
Copy link
Contributor

@ctidd ctidd commented Mar 19, 2025

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Problem 1: Incorrectly filtering out directories in additionalGlobalIgnoreRulesForStrictSources due to missing null check on file extension. Fixed and added tests.

Problem 2: Because we start traversal at the content roots, but filter out any content not within the selection root, we were incorrectly stopping traversal when the selection root is nested within any content root. In this case, we were exiting without traversing to find the selectedRoot. Fixed and added tests.

Problem 3: Add support for DevFile (as normally supported, when at workspace root) when workspace root is not a content root. Fixes excluding the DevFile when it's not in a content root.

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • [N/A] I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ctidd ctidd requested review from a team as code owners March 19, 2025 06:33
Comment on lines 105 to 126
// Because we traverse from the content root, ensure we continue traverse toward the selection root:
// (Handles when selection root is inside a content root)
if (VfsUtil.isAncestor(file, selectionRoot, false)) {
return true
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the actual change in this file. The rest of the change is inlining shouldIncludeInZipFile logic into the VirtualFileVisitor. I started out with a change to expose an enum (i.e. CONTINUE in addition to INCLUDE and EXCLUDE) instead of a boolean, but found it was clearer to inline the logic.

@ctidd ctidd force-pushed the ctidd/fix-exclude branch from 6417c7a to be08169 Compare March 19, 2025 06:48
@ctidd ctidd force-pushed the ctidd/fix-exclude branch from be08169 to 79abd2e Compare March 19, 2025 06:54
@rli rli merged commit d78ec32 into aws:main Mar 19, 2025
12 of 14 checks passed
leigaol pushed a commit to leigaol/aws-toolkit-jetbrains that referenced this pull request Mar 20, 2025
…m workspace. (aws#5482)

**Problem 1:** Incorrectly filtering out directories in `additionalGlobalIgnoreRulesForStrictSources` due to missing null check on file extension. Fixed and added tests.

**Problem 2:** Because we start traversal at the content roots, but filter out any content not within the selection root, we were incorrectly stopping traversal when the selection root is nested within any content root. In this case, we were exiting without traversing to find the `selectedRoot`. Fixed and added tests.

**Problem 3:** Add support for DevFile (as normally supported, when at workspace root) when workspace root is not a content root. Fixes excluding the DevFile when it's not in a content root.
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.

4 participants