Can't locate reason for a [XQST0049] Duplicate declaration of static variable
Wednesday, 17 April 2019 · 3 messages · last reply 20 Apr 2019
AM
Andreas Mixich17 Apr 2019 00:02 #
Hi,
I get a
[XQST0049] Duplicate declaration of static variable $string:debug and can't find out why. I checked the sources and the variable is declared only once. This happens in a scenario, where I have a co-dependency on several modules and each load the modules they need, some load the same modules as another module. I thought about a circular dependency, but I do not find it.
Could it be made so, that upon such an error, the places, in which the 'other' declaration was found get referenced as well in the error message? That would be very practical (I also had problems like this with function declarations, in the past, some are still unresolved).
Thanks, and congrats to the 9.2 update.--
Goody Bye, Minden jót, Mit freundlichen Grüßen,
Andreas Mixich
CG
Christian Grün17 Apr 2019 07:38 #
Hi Andreas,
I know it takes some time, but it would be great if you could simplify your code and send us a minimized version that triggers the error.
Thanks in advance,
Christian
Andreas Mixich <mixich.andreas at gmail.com> schrieb am Mi., 17. Apr. 2019, 00:03:
Quoted text · Andreas Mixich · 21 lines
> Hi, > > I get a `[XQST0049] Duplicate declaration of static variable > $string:debug` and can't find out why. I checked the sources and the > variable is declared only once. This happens in a scenario, where I have > a co-dependency on several modules and each load the modules they need, > some load the same modules as another module. I thought about a circular > dependency, but I do not find it. > > Could it be made so, that upon such an error, the places, in which the > 'other' declaration was found get referenced as well in the error > message? That would be very practical (I also had problems like this > with function declarations, in the past, some are still unresolved). > > Thanks, and congrats to the 9.2 update. > > -- > Goody Bye, Minden jót, Mit freundlichen Grüßen, > Andreas Mixich > >
AM
Andreas Mixich20 Apr 2019 16:54 #
Hello Christian,
it seems the problem were Windows junctions. Like in:
import module namespace [...] at
"file:///C:/Users/andreas/Eigene%20Projekte/XQuery/text-lib/src/regex-lib.xqm";
import module namespace [...] at
"file:///S:/Users/andreas/Eigene%20Projekte/XQuery/text-lib/src/regex-lib.xqm";I have two volumes: an SSD and a magnetic disk. The magnetic stores many such folders, that consume a lot of space, like my home folder. I have a Windows junction <https://en.wikipedia.org/wiki/NTFS_junction_point> from 'C:\Users\andreas\Eigene%20Projekte' to
'S:\Users\andreas\Eigene%20Projekte'. After I set all links to point to the same volume (the real, physical directory), it seems to be alright now.
Happy egg laying bunnies!
--
Minden jót, all the best, Alles Gute,
Andreas Mixich
Written for BaseX 9.2. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery