Page 1 of 1

Problem with scopeLinker

Posted: 31 Aug 2017 18:24
by Martin Meyer
Hello Thomas,

moving my code to new great VIP version 8 I came across a problem. It reproduces when I start a new 'Console application' project and create a new interface in a new package with contents:

Code: Select all

interface myDomains{@Type}   domains     dom = @Type.   end interface myDomains
In main.pro I replace the open core line so that the code becomes

Code: Select all

implement main     open myDomains{unsigned}   clauses     run() :-         succeed.         % place your own code here   end implement main
Compiling it I get
error c998 : Not implemented: scopeLinker::scopeExpr2Namespace: Scope expressions with arguments
error c218 : Unknown class/interface/namespace 'myDomains{::unsigned}' in pack 'main.pack'

Posted: 1 Sep 2017 7:58
by Thomas Linder Puls
Thank you, I can reproduce the problem

We will look at it.

Posted: 1 Sep 2017 8:15
by Thomas Linder Puls
The (in some sense) real problem is that the myDomains-file has not been included in the main-file.

The reason that it is not included automatically is because the error messages are wrong, it should have been:

<pre>e218 Unknown class/interface/namespace 'myDomains' in pack 'main.pack'</pre>
When the IDE receives such a message from the compiler it will try to solve the problem by inserting an include statements in the pack file.

As a workaround to get the correct include statement inserted you can remove the arguments for one compilation:
This will give the correct errormessage and cause the IDE to insert the include statement, and then you canchange the code back to the correct version again:
We will of course look at the problem anyway.

Posted: 1 Sep 2017 15:36
by Martin Meyer
I have checked the ph- and pack-files in my 'real' code. However the case seems to be more complicated there.

I have attached a stripped down version of the 'real' code. The compiler throws error c205 : Unknown domain/interface 'mfc\syntax\syntax_t{@Terminal}::abstractSyntaxTree' in pack 'main.pack' on it. Please have a look at it. File rule.ph already contains #include @"mfc\altSyntax\altSyntax.ph". So, what is missing? Maybe am overlooking something. Can you advice how to cure it?

Posted: 4 Sep 2017 9:57
by Thomas Linder Puls
In this case a work around is to move the abstractSyntaxTree domain from the syntax_t interface to the syntax_t class.

We will of course look for a non-workaround solution as well.

Posted: 4 Sep 2017 17:36
by Martin Meyer
Thank you! It works now. Actually I moved domain abstractSyntaxTree to an interface named altSyntax which has no scope type variables. Since domain abstractSyntaxTree makes no use of scope type variables it anyway was misplaced in syntax_t{@Terminal}.