You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ordering is not a goal for consistency between KSP1 and KSP2, we do try out best to preserve same ordering between 2 implementations, if this ordering inconsistency is an issue for your implementation, we can try to fix it.
Ah, thanks! I reported this because one of XProcessing's tests is failing, but while trying to find out whether the ordering is important I found that our function that wraps getSymbolsWithAnnotation is returning a Set already so the ordering shouldn't matter. Let me fix our test. Sorry for the noise. 🙏
XRoundEnvTest.getAnnotatedParamElements()
KSP2 doesn't guarantee the ordering of results from `Resolver.getSymbolsWithAnnotation()`[1] and our wrapper `XRoundEnv.getElementsAnnotatedWith()` is returning a `Set` anyway so we remove the ordering check in our test in this CL.
[1] google/ksp#1719
Test: XRoundEnvTest
Change-Id: Ib7865860214b76207c250b1d0ab257ef1cd4c2dd
Not sure if it's intended or a known issue but I couldn't find any doc explaining this.
Using
Resolver.getSymbolsWithAnnotation()
to get symbols annotated withTopLevelAnnotation
on this code:returns
[p0, methodParam, ctorProperty, ctorParam]
in KSP 2 but was[ctorProperty, ctorParam, p0, methodParam]
in KSP 1This can also be reproduced with
testGetSymbolsFromAnnotation()
in the KSP project, which is disabled inKSPAATest.kt
.Tested with 42217b8 and
2.0.0-Beta3-1.0.18-20240207.110119-15
.The text was updated successfully, but these errors were encountered: