Jump to content
Sign in to follow this  
Attila Kovacs

D12 - No more "unknown custom attributes"

Recommended Posts

I no longer receive warnings about unknown custom attributes in Delphi 12. Could there be a compiler directive that went global, perhaps? Moved from 10.2.

Edited by Attila Kovacs

Share this post


Link to post

So, if you intentionally refer to a non-existing custom attribute - you get no warning?


This compiler warning setting exists in my D12 project - and it appears to be True by default.

image.png.76f1439c83595978fa8e89b962e022f4.png

  • Thanks 1

Share this post


Link to post
2 hours ago, Lars Fosdal said:

This compiler warning setting exists in my D12 project - and it appears to be True by default.

Same here, restarted the IDE, now I'm having the warnings. I'll keep an eye on that, I'm not dumb, there were no warnings.

Share this post


Link to post

I am sure I remember something like this, back in Delphi 10.0 or even XE7.

The compiler will only check the attributes if the source code file (the binary .dcu it ends up in) gets rebuilt.

 

So if you just change something about the attributes but nothing else, it will not trigger a warning. If you do a full rebuild, it will always trigger the correct warning.

 

I think I never bothered to file a bug report.

Edited by Der schöne Günther
  • Thanks 1

Share this post


Link to post
1 hour ago, Der schöne Günther said:

The compiler will only check the attributes if the source code file (the binary .dcu it ends up in) gets rebuilt.

That is the same with all warnings and hints.

 

If you want to avoid the complete build you can use a Syntax Check.

Share this post


Link to post

I have been doing Delphi for more than ten years now, and I didn't even know this existed. Looks like a full compilation, but without the linking. "Syntax Check" for my current project took about 30 seconds, which is less than half of what a full build takes. Thank you!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×