SpontanCombust / witcherscript-ide

Language Server implementation for WitcherScript - Witcher 3's scripting language.
https://spontancombust.github.io/witcherscript-ide/
Apache License 2.0
10 stars 0 forks source link

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

Open SpontanCombust opened 2 months ago

SpontanCombust commented 2 months ago

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 commented 1 month ago

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.