Non-public markers aren't handled correctly for properties
See original GitHub issueWhen declaring an opt-in annotation and adding that annotation to the nonPublicMarkers
configuration, properties that have the annotation present are not correctly excluded from the api dump.
Example annotation:
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
annotation class MyInternalApi
A function like this will not show up in the dump (correctly):
@MyInternalApi
fun internalFun() {}
However, this property will:
@MyInternalApi
var internalVar = 0
… in the form of a getter and a setter:
public static final fun getInternalVar ()I
public static final fun setInternalVar (I)V
A workaround that removes these from the API dump is annotating the getter and setter directly, like so:
var otherInternalVar = 0
@MyInternalApi get
@MyInternalApi set
However, annotating the getter like that doesn’t trigger warnings at the call site of the property, so you really need three annotations on each property to satisfy both the plugin and inspections:
@MyInternalApi
var combinedInternalVar = 0
@MyInternalApi get
@MyInternalApi set
Project with examples and reproducing the issue can be found here.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Private Property: Please Do Not Pick the Fruit Garden Marker
This item was clearly made with love by the owners. Theo contacted me several times to make sure they're making exactly what I...
Read more >[Vue warn]: Property or method "markers" is not defined on the ...
I can't find the problem, both the names in the variable and the code are spelled correctly and they are all in the...
Read more >What You Need to Know About the Markers on the Water
These Aids are used to mark fairways, mid-channels, and offshore approach points.
Read more >What Can You Do About a Boundary Dispute With a Neighbor?
Fact-checking and negotiation are often important steps before considering suing a neighbor over property-line disagreements.
Read more >Property Line Disputes: What Are They? - Rocket Mortgage
Disputes over boundaries between properties might pop up among homeowners. Read our article about types of property line disputes and how to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Unfortunately, we’re overwhelmed with other work right now, so we can’t provide ETA for the fix. PRs will be timely reviewed though
Merged into master, will be fixed in the next release