-
Notifications
You must be signed in to change notification settings - Fork 86
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
ajc
fails when aspect is annotated with @Deprecated
#316
Comments
Same with AspectJ |
Cannot reproduce. Please provide an MCVE. As you know, I do not use Mill, so please either a batch file for compiling and running the code or, ideally, a Maven project. |
So, this is likely some strange referencing issue, but here are the minimized source files: // example/AbstractAccessRightsAspect.aj
package example;
/**
* @deprecated Use {@link AccessRightsHelper} instead.
*/
public abstract aspect AbstractAccessRightsAspect {
} // example/AccessRightsAspect.aj
package example;
@Deprecated
public aspect AccessRightsAspect extends AbstractAccessRightsAspect {
} // example/AccessRightsHelper.java
package example;
public class AccessRightsHelper {
public void dump () {
System.err.println("Replacing Aspect: "+ AccessRightsAspect.aspectOf());
}
} Compilation fails with:
It compiles fine, if I either:
|
Here is the import mill._
import mill.scalalib._
import mill.define._
import $ivy.`de.tototec::de.tobiasroeser.mill.aspectj::0.5.0`
import de.tobiasroeser.mill.aspectj._
object main extends RootModule with AspectjModule {
def aspectjVersion = "1.9.22.1"
def ajcOptions = Seq("-17", "-proc:none")
}
@kriegaex Do you have some minimal Maven |
The problem is not the
But as soon as I change /**
* Use {@link AccessRightsHelper} instead.
*/ to /**
* @deprecated Use {@link AccessRightsHelper} instead.
*/ I can reproduce the problem:
One more thing I found out is that the problem only occurs in native syntax aspects, not in @AspectJ-style ones. |
Still, the JavaDoc |
I.e., it must be the interplay of both. Honestly, I never used the |
Please note my recent message to the aspectj-users and aspectj-announce mailing lists regarding my situation as an AspectJ maintainer. |
Since the Java
I'm in quite a same situation honestly. Maintaining a portion of tools and libraries and often at the price of not getting things done for my main freelance jobs. So, I totally understand your position. To be clear, I don't expect any commitment on your side to any bug I report, but reporting these bugs and investigating in reproducers, even if I already found workarounds in the originating projects, is just another way of contributing. I wish you the best and really hope that some of the well-paid commercial beneficiaries of the AspectJ ecosystem step up financially and recognize the value, you provide with your contributions and community work. |
I added a
@Deprecated
annotation to an aspect and saw the following compiler error. Once I removed the annotation, the aspect compiles again.The text was updated successfully, but these errors were encountered: