XS9043 and implicit namespaces

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
baramuse
Posts: 87
Joined: Tue Nov 29, 2022 8:31 am
Location: France

XS9043 and implicit namespaces

Post 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.
User avatar
baramuse
Posts: 87
Joined: Tue Nov 29, 2022 8:31 am
Location: France

Re: XS9043 and implicit namespaces

Post 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
User avatar
Chris
Posts: 4635
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: XS9043 and implicit namespaces

Post 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..
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Post Reply