question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Non-public markers aren't handled correctly for properties

See original GitHub issue

When 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:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
qwwdfsadcommented, May 16, 2022

Unfortunately, we’re overwhelmed with other work right now, so we can’t provide ETA for the fix. PRs will be timely reviewed though

0reactions
qwwdfsadcommented, May 17, 2022

Merged into master, will be fixed in the next release

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found