This is Bugzilla
Bugzilla Version 2.22.1-debian2
View Bug Activity | Format For Printing | XML | Clone This Bug
Abc compiler sends an error when a type is not found in some pointcuts, where ajc would just emit a warning. If your system has only the following aspects, for example: public aspect MyAspect { pointcut foo() : this(AClass); } Since AClass does not exist in the system, abc throws a "Could not find advice formal or type "AClass"", while ajc just gives a warning. Although, as discussed in the mailing list, this behavior is acceptable and even makes more sense (because AClass is a type that does not exist), it would be nice to have a compiler flag that transforms this error into a warning, so that ajc compatibility can be kept.
Created an attachment (id=16) [details] proposed patch proposed patch, verifying against the test harness...
(From update of attachment 16 [details]) does not work
The proposed patch does not work for the following reason. When converting the error to a warning message, this means that abc tries to proceed compilation as usual. This however means that we end up with ambiguous type nodes in the AST (naturally, because the type could not be resolved). Most of the subsequent AST passes assume however to have unambiguous typing information in place. One could of course change all those passes to handle unresolved type nodes gracefully, however I am not sure whether it's worth the effort and worth polluting the abc code with this crosscutting concern (;-)). Hence, I would like to ask the OP to comment on how urgent the need for this feature is for him. If it's not an actual restriction, I simply propose to include this difference to ajc in our list of differences to ajc.
Hi, it is not an urgent issue. As I said, it is just to keep compatibility. I think a note in the differences list would be enough. I don't think it is worth the trouble. Regards, Thiago
included this issue in the list of differences to ajc