-
Notifications
You must be signed in to change notification settings - Fork 93
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
SONARPY-2321 Fix quality gate issues #2145
SONARPY-2321 Fix quality gate issues #2145
Conversation
Quality Gate passedIssues Measures |
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.
Looks good, thanks for handling this!
About fullyQualifiedName
, I think we should ensure it's no longer Nullable
, but I'd recommend doing it in a separate ticket. Wdyt?
@@ -43,12 +43,12 @@ public class FunctionDescriptor implements Descriptor { | |||
private final TypeAnnotationDescriptor typeAnnotationDescriptor; | |||
|
|||
|
|||
public FunctionDescriptor(String name, String fullyQualifiedName, List<Parameter> parameters, boolean isAsynchronous, | |||
public FunctionDescriptor(String name, @Nullable String fullyQualifiedName, List<Parameter> parameters, boolean isAsynchronous, |
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.
After second look, I think fully qualified names for FunctionDescriptor
should never be null again.
In DescriptorsToProtobuf
, we're making null checks during deserialization from the cache because it used to be nullable (thus serialized with an empty value).
Due to our cacheVersion
checks, we'd disregard any cached value that is null, so we should be safe to remove this check.
Note that if we actually do that:
- It breaks
ClassDescriptorTest
which are based on a V1->Descriptor converison. - It is no longer consistent with the
descriptors.proto
model that says thatFunctionDescriptor#fullyQualifiedName
is an optional field.
Fixing this would significantly expand the scope of this PR, so I'd suggest creating a hardening ticket to ensure FunctionDescriptor#fullyQualifiedName
is not longer nullable and adapt the related tests there, wdyt?
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.
As discussed live, we leave the current PR as is and create two tickets:
- One to remove the nullability of
fullyqualifiedname
(SONARPY-2335) - One to remove the conversion logic from V1 symbol to descriptor (SONARPY-2336)
No description provided.