Skip to content
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

Fix conversion of platforms for 'Internal' annotation #1612

Conversation

pwrobeldev
Copy link
Contributor

The conversion of platforms for 'Internal' annotation was invalid
when they were specified without quotation marks. In such a case
the converter set internal visibility for all platforms.

This change adjusts the converter as well as the output of smoke
tests to show that the behavior is correct now.

In the case of internal attribute platforms can be specified
inside the annotation. However, when quotation marks are not
present for each listed platform, then the behavior of converter
is invalid.

This change adds omitted files for smoke tests.
Please note, that the visibility for mentioned types is as follows:
 - JavaInternalClassRev -- shall be internal only for Java, but
                           it is internal also in Swift and Dart.
 - SwiftInternalClassRev -- shall be internal only for Swift, but
                            it is internal also in Java and Dart.
 - DartInternalClassRev -- shall be internal only for Dart, but
                           it is internal also in Swift and Java.

In next patches the logic will be fixed. The mentioned files will
be used to show that the behavior has been adjusted.

Signed-off-by: Patryk Wrobel <[email protected]>
The conversion of platforms for 'Internal' annotation was invalid
when they were specified without quotation marks. In such a case
the converter set internal visibility for all platforms.

This change adjusts the converter as well as the output of smoke
tests to show that the behavior is correct now.

Signed-off-by: Patryk Wrobel <[email protected]>
@pwrobeldev
Copy link
Contributor Author

For the first commit, which shows the invalid behavior please see the following input:

@Internal(Java)
class JavaInternalClassRev {}

@Internal(Swift)
class SwiftInternalClassRev {}

@Internal(Dart)
class DartInternalClassRev {}

@Internal(Java, Swift)
class JavaSwiftInternalClass {}

Even though platforms are specified, the behavior without fix was incorrect -- the classes were internal for all platforms.

With the fix they are internal only for the specified platforms.

@pwrobeldev pwrobeldev merged commit 5e93c4b into master Nov 5, 2024
17 checks passed
@pwrobeldev pwrobeldev deleted the pwrobeldev/fix-parsing-of-platforms-passed-to-internal-annotation branch November 5, 2024 09:27
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.

2 participants