xsharp.eu • XS9043 and implicit namespaces
Page 1 of 1

XS9043 and implicit namespaces

Posted: Mon Feb 26, 2024 11:39 am
by baramuse
Hi,

we're trying to chase out all compilation warnings and tackling the XS9043 atm.
In order to reduce the ambiguous calls we deactivated the implicit namespace compiler switch (/ins) and added the required #USING.

We still have some "conflicts" for example :

Code: Select all

USING VO
USING bTools.bBrowser

CLASS fcPrinter INHERIT ReportPro2.RpPrinter
(...)
		lNoClip := ! SELF:lInExport .AND. _AND( nFlags, DT_NOCLIP ) == 0
(...)
produces

Code: Select all

Warning	XS9043	'DT_NOCLIP' is ambiguous. 
Could be Field 'ReportPro2_Base.Functions.DT_NOCLIP' in ReportPro2.Base or Field 'VOWin32APILibrary.Functions.DT_NOCLIP' in VOWin32APILibrary. Using the first one.


Why is that?
We did specify the USING VO so it should "choose" that one, shouldn't it ?


Regards.

Re: XS9043 and implicit namespaces

Posted: Mon Feb 26, 2024 11:48 am
by baramuse
Also, we have that one :

Code: Select all

	
USING VO
(...)	
	nLength := FormatMessage(nFlags, hModule, nError, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), @pBuffer, 0, NULL_PTR)
(...)
produces

Code: Select all

Warning	XS9043	'MAKELANGID' is ambiguous. Could be Method 'VOWin32APILibrary.Functions.MAKELANGID(params usual[])' in VOWin32APILibrary or Method 'XSharp.VO.Functions.MAKELANGID(word, word)' in XSharp.VO. Using the first one

Re: XS9043 and implicit namespaces

Posted: Tue Feb 27, 2024 6:49 am
by Chris
Hi,

Unfortunately I think you cannot do something about those right now, defines have global scope, so are always visible to all code that uses a library. I will add a git ticket to remove the duplicates between the runtime, the VOSDK and Report Pro, but we cannot do that now, because it can easily break existing 3rd party libraries. This will have to wait till the X# 3.0 release, which will have many other breaking changes anyway, so we will request 3rd party developers to release new builds of their products just once.

So I am afraid for now you'll need to just disable this warning..