Compiler hints with latest tms.vcl.diagram

Hi there - I hope you’re doing good.

I’ve just installed the latest versions of the component from yourselves.

I’m seeing several compile hints from TMS diagram studio when building our projects, any chance you can address these - or recommend how we can perhaps hide from from compile output? We have a policy against it for our projects so it creates a bit of extra noise to ignore.

[dcc32 Hint] dgrclasses.pas(968): H2443 Inline function 'TPen.GetColor' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] dgrclasses.pas(1041): H2443 Inline function 'TBrush.GetColor' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] Direct2dClasses.pas(812): H2443 Inline function 'TFont.GetStyle' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] Direct2dClasses.pas(816): H2443 Inline function 'TFont.GetStyle' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] Direct2dClasses.pas(994): H2443 Inline function 'TFont.GetStyle' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] Direct2dClasses.pas(997): H2443 Inline function 'TFont.GetStyle' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] gdipclasses.pas(1180): H2443 Inline function 'TFont.GetStyle' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] gdipclasses.pas(1182): H2443 Inline function 'TFont.GetStyle' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] gdipclasses.pas(1184): H2443 Inline function 'TFont.GetStyle' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] gdipclasses.pas(1186): H2443 Inline function 'TFont.GetStyle' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] DiagramPreview.pas(213): H2443 Inline function 'Point' has not been expanded because unit 'System.Types' is not specified in USES list
[dcc32 Hint] atDiagram.pas(8238): H2164 Variable 'P1' is declared but never used in '_DrawShape'
[dcc32 Hint] atDiagram.pas(8238): H2164 Variable 'P2' is declared but never used in '_DrawShape'
[dcc32 Hint] atDiagram.pas(8412): H2164 Variable 'SrcRect' is declared but never used in 'DrawStretchProportionalPicture'
[dcc32 Hint] atDiagram.pas(8413): H2164 Variable 'ZoomedW' is declared but never used in 'DrawStretchProportionalPicture'
[dcc32 Hint] atDiagram.pas(8413): H2164 Variable 'ZoomedH' is declared but never used in 'DrawStretchProportionalPicture'
[dcc32 Hint] atDiagram.pas(9651): H2164 Variable 'P1' is declared but never used in 'TCustomDiagramBlock.SurroundRgn'
[dcc32 Hint] atDiagram.pas(9651): H2164 Variable 'P2' is declared but never used in 'TCustomDiagramBlock.SurroundRgn'
[dcc32 Hint] atDiagram.pas(9652): H2164 Variable 'D' is declared but never used in 'TCustomDiagramBlock.SurroundRgn'
[dcc32 Hint] atDiagram.pas(11082): H2443 Inline function 'TPen.GetColor' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] atDiagram.pas(11083): H2443 Inline function 'TPen.GetColor' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] atDiagram.pas(19713): H2443 Inline function 'TPen.GetColor' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] atDiagram.pas(21057): H2164 Variable 'SaveDPI' is declared but never used in 'TDiagramControl.InternalWriteTextDgr'
[dcc32 Hint] atDiagram.pas(22352): H2443 Inline function 'TPen.GetColor' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] atDiagram.pas(27950): H2077 Value assigned to 'TDgrLibraryFolderFiler.LoadItem' never used
[dcc32 Hint] DiagramNavigator.pas(295): H2443 Inline function 'TPen.GetColor' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] DiagramNavigator.pas(337): H2443 Inline function 'TPen.GetColor' has not been expanded because unit 'System.UITypes' is not specified in USES list
[dcc32 Hint] DiagramExtra.pas(369): H2077 Value assigned to 'Spacing' never used

Kind regards,
Phil

I believe you have not installed the recommended way, using Smart Setup.

It's not clear how you installed it, but the installation is wrong, because Delphi is trying to recompile Diagram Studio units when you compile your project. That should not happen.

I suggest you uninstall everything, redo everything you eventually done automatically, clean up and install Diagram Studio using Smart Setup the normal way.

Hi, Thanks for the reply.

I’ve been trying to switch us over from the old stand-alone installers to the new smart setup approach - the old installers left some mess behind like environment variables and bpls in other locations so it took a bit of effort to clean up manually. I think more-or-less good now though.

The other side is we need to disable the {$DEFINE USEUAC} (i.e. to {.$DEFINE USEUAC} within Wupdate.pas - to do that we made a copy of the unit with just that change so we can have it in source control and not accidentally overwrite that change whenever we install an update form you on dev/build machines. After fetching the latest updates with smart setup I was running into compile errors like [dcc32 Fatal Error] Wupdate.pas(20): F1026 File not found: 'TMSDEFS.INC' coming from Wupdate.pas - this one was resolved by adding this to project library path: C:\…\tmssmartsetup\Products\tms.vcl.uipack

Not sure if anything there would ring point to these hints appearing?

In any case I think you guys mentioned you might provide an alternative way to control this USEUAC conditional without us needing to edit your source:

So we’re probably good for now.

One more potentially useful point about supressing those hint - still linking to source where necessary - I realized ensuring that the \Release paths with DCUs are listed before any source paths in IDE’s library paths list will ensure the .dcus are found/linked first, without recompiling the source, so avoiding those hints:

If you want to use a customized wupdate.pas, it will indeed be needed to include the folder where wupdate.pas is located to your app's search path. By default, Smart Setup only adds the folder where the .DCU files are for faster compilation/linking.

Got it. Thank you.