-
Notifications
You must be signed in to change notification settings - Fork 251
fix(amazonq): switch to ulong to avoid overflow when input is larger than 2gb #5558
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
Conversation
…than 2gb 2GB in bytes > INT_MAX so use ULong, which can handle 18 PB
Qodana Community for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
…ss fails to start" This reverts commit 93ca253.
@@ -353,5 +301,58 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En | |||
|
|||
companion object { | |||
private val logger = getLogger<ProjectContextProvider>() | |||
private val regex = Regex("""bin|build|node_modules|venv|\.venv|env|\.idea|\.conda""", RegexOption.IGNORE_CASE) |
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.
Not a blocker, but do we want to move this list to a common utils file
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.
everyone seems to have a different concept of what to ignore at the moment
} | ||
if (file.isFile) { | ||
allFiles.add(file) | ||
return false |
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.
Should this be true?
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.
files have no children to visit so it could go either way
2GB in bytes > INT_MAX
so use ULong, which can handle 18 PB
Types of changes
Description
Checklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.