Error on Updating DSharp

118 views
Skip to first unread message

Pio Pio

unread,
Feb 3, 2024, 5:42:16 PMFeb 3
to Spring4D
Hello,

I am trying to update DSharp to the latest release. Before doing that I updated succesfully Spring4D.

When I try to update DSharp and build DSharp.Core.DelphiXE2.bpl I have the error message "[DCC Error] DSharp.Collections.Iterators.pas(170): E2010 Incompatible types: 'Spring.Collections.IEnumerable<DSharp.Collections.Iterators.Iterator<T>.T>' and 'DSharp.Collections.Iterators.TIteratorBlock<DSharp.Collections.Iterators.Iterator<T>.T>'"

Any idea of what I am doing wrong ?

Many thanks
Alberto

Pio Pio

unread,
Feb 4, 2024, 5:14:48 AMFeb 4
to Spring4D
Hello again,

I have cleaned the DSharp installation on my PC and re-installed it again. Built all the packages and now I have a new error:
"[DCC Error] DSharp.Collections.Iterators.pas(54): E2170 Cannot override a non-virtual method"

The error points to the line function MoveNext: Boolean; override; ofthe class TCustomIterator<T> which descends from TIterator<T> of Spring.Collections.Base;
I looked into the class TIterator<T> and the function MoveNext is not virtual. 

Is there anything else I have to do before building the packages ?

Many thanks
Alberto

Pio Pio

unread,
Feb 9, 2024, 3:13:38 AMFeb 9
to Spring4D
Hello,

I am sorry to sound pushy but is there anybody who can point in the right direction here?

Many thanks 
Alberto 

Stefan Glienke

unread,
Feb 16, 2024, 10:56:41 AMFeb 16
to Spring4D
Apparently, you are not using the correct DSharp branch - please try again. Hint: https://bitbucket.org/sglienke/dsharp/src/spring-2.0/

Pio Pio

unread,
Feb 17, 2024, 7:14:01 AMFeb 17
to Spring4D
Hi Stefan,

I deleted the DSharp folder, recreated a new one, and cloned the Dsharp - Spring 2.0 repository you gave me. Then opened the DSharp.Core.DelphiXE2.bpl and ran "build".
I have the same error message as above.
I double-checked the License.txt file of the Spring4D folder and I can confirm I have the Springd4 ver 2.0 installed.

What else can it be?

Alberto

Stefan Glienke

unread,
Feb 17, 2024, 5:04:12 PMFeb 17
to spri...@googlegroups.com
You are using the wrong branch
> --
> You received this message because you are subscribed to the Google Groups "Spring4D" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to spring4d+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/spring4d/65f470ab-f80b-4f2a-9311-5398de5465c3n%40googlegroups.com (https://groups.google.com/d/msgid/spring4d/65f470ab-f80b-4f2a-9311-5398de5465c3n%40googlegroups.com?utm_medium=email&utm_source=footer).
>

Pio Pio

unread,
Feb 18, 2024, 6:12:45 AMFeb 18
to Spring4D
Hi Stefan,

Many thanks for pointing this out.
I used the Master branch and the build went beyond  DSharp.Collections.Iterators.pas therefore I suppose this is the correct branch I should use.
Sadly, there is another error now:
[DCC Fatal Error] DSharp.Core.Reflection.pas(718): F1054 Spring4D needs to be compiled with INVOKABLE_EVENT defined - see Spring.inc

I opened Spring.inc and the issue seems to reside here:
// This define is for compatibility with other libraries that are using Invoke on IEvent
{.$DEFINE INVOKABLE_EVENT}

I googled it but didn't find any clue of what to do to progress. What am I supposed to do?
Is this something that was introduced in Ver 2.0? I cannot remember I had the same issue last time I upgraded.

Many thanks
Alberto




Stefan Glienke

unread,
Feb 20, 2024, 6:38:11 AMFeb 20
to spri...@googlegroups.com

Pio Pio

unread,
Feb 20, 2024, 5:05:16 PMFeb 20
to Spring4D
Hi Stefan,

Unfortunately I have never worked on .inc files therefore the comments and error messages are beyond me.
I googled to find some details of how to define an invokable event with no success.

Is there a link you can point out to start learning?

Alberto

Nick Hodges

unread,
Feb 20, 2024, 5:20:08 PMFeb 20
to Spring4D
Pio...

I've lost the thread.  If you restate the problem, I can try to help you...

Nick 

Pio Pio

unread,
Feb 21, 2024, 9:16:46 AMFeb 21
to Spring4D
Hi Nick,

In a nutshell, I am installing DSharp from the master branch. I have XE2 on a Win 7 machine.

When I try to build the bpl I have the following error message:

"[DCC Fatal Error] DSharp.Core.Reflection.pas(718): F1054 Spring4D needs to be compiled with INVOKABLE_EVENT defined - see Spring.inc"

I opened Spring.inc and the issue seems to be here:

// This define is for compatibility with other libraries that are using Invoke on IEvent
{.$DEFINE INVOKABLE_EVENT}

I understand I have to define the invokable event in the .inc file but other than that I am at a loss.
I have googled it to find some help but no joy so far.

Many thanks


Alberto

Nick Hodges

unread,
Feb 21, 2024, 9:52:26 AMFeb 21
to spri...@googlegroups.com
Did you remove the period before the $ in the {.$DEFINE ...} statement?


Pio Pio

unread,
Feb 21, 2024, 10:41:01 AMFeb 21
to Spring4D
Hi Nick,

Yes, that was one of my attempts. I changed it again just to make sure into:
  // This define is for compatibility with other libraries that are using Invoke on IEvent
  {$DEFINE INVOKABLE_EVENT}

but when it comes to build I have the same error message "[DCC Fatal Error] DSharp.Core.Reflection.pas(718): F1054 Spring4D needs to be compiled with INVOKABLE_EVENT defined - see Spring.inc"

Alberto


Pio Pio

unread,
Feb 22, 2024, 3:26:08 PMFeb 22
to Spring4D
Hi Everybody,

I think I have solved the issue.

The problem was I was amending the file Spring.inc but after that, I was building DSharp and not Spring4D first. I didn't realize Spring.inc was part of the Spring4D package, despite the name making this very clear. I was focusing my attention on the wrong place.
The solution was amending the file Spring.inc, building the DSharp package, and then the Spring4D package. At that stage everything fell into place and the build was completed succesfully.


Many thanks for everybody's time and help.

Alberto

Nick Hodges

unread,
Feb 22, 2024, 4:11:25 PMFeb 22
to spri...@googlegroups.com
Great -- glad it started working...


Reply all
Reply to author
Forward
0 new messages