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

[FEATURE] Allow annotations for symbols from the same package #49

Open
SpontanCombust opened this issue Aug 5, 2024 · 1 comment
Open
Labels
feature New feature or request

Comments

@SpontanCombust
Copy link
Owner

SpontanCombust commented Aug 5, 2024

Is your feature request related to a problem? Please describe.
Annotating functions defined in the same package with @wrapMethod or @replaceMethod generates a warning that WIDE does not support this kind of action (same-content-annotation). This can confuse developers into thinking this is completely impossible when it's just the fault of incomplete WIDE implementation.

Describe the solution you'd like
It would be better if this sort of action was possible and did not generate any warnings. Repeated use of the same annotatated code can still be an error.

Possible implementation: there should be a new symbol path component type that would distinguish regular functions from the annotated ones that do not add anything new. Now we have (T)ypes, (D)ata and (C)allables. The new type could be (A)nnotations or (R)eplacers.

Describe alternatives you've considered
If it's impossible it should at least say the warning can b ignored.

@SpontanCombust SpontanCombust added the feature New feature or request label Aug 5, 2024
SpontanCombust added a commit that referenced this issue Aug 21, 2024
Methods made with `@wrapMethod` and `@replaceMethod` now have path suffixes that distinguish them from regular methods.
This distinciton allows for situations where annotations are made for types in the same package #49
Removed the `SameContentAnnotation` error and all associated with it.
@SpontanCombust
Copy link
Owner Author

Settled for an implementation where wrapping and replacing functions simply get suffixes after the name component in the symbol path.
For example Foo:T/Bar@wrapped:C is a symbol path for a Bar method of Foo made with @wrapMethod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
Status: Testing Needed
Development

No branches or pull requests

1 participant