Skip to content

Conversation

@leigaol
Copy link
Contributor

@leigaol leigaol commented Oct 16, 2024

Types of changes

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

Description

When the project root is removed as the module but src folders are promoted to the modules level, the @workspace indexing cannot properly resolve the project root folder, causing indexing to only apply to a subset of the workspace.

The guessProjectDir function does not work as expected, it resolves to one of the src folders. We should use basePath or equavalent.

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.
  • 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.

@leigaol leigaol requested review from a team as code owners October 16, 2024 21:26
@leigaol leigaol marked this pull request as draft October 16, 2024 21:26
@rli rli changed the title fix(amazonq): Fix bug for @workspace cannot properly locate certain folders for certain project setup fix(amazonq): Fix bug for @workspace cannot properly locate certain folders for certain project setup Oct 16, 2024
@leigaol leigaol marked this pull request as ready for review October 16, 2024 23:24
var currentTotalFileSize = 0L
val featureDevSessionContext = FeatureDevSessionContext(project)
val allFiles = mutableListOf<VirtualFile>()
project.guessProjectDir()?.let {
Copy link
Contributor

Choose a reason for hiding this comment

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

probably need tests

Copy link
Contributor Author

@leigaol leigaol Oct 17, 2024

Choose a reason for hiding this comment

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

We are making a new major LSP release in 1-2 weeks. Tests will be added as part of below PRs

#4970
#4971
#4972
#4978
#4976

@leigaol leigaol merged commit 9796f7e into aws:main Oct 17, 2024
12 of 13 checks passed
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