Jump to content
egroups

Upgrade from Spring4d 1.2 to Spring4d 2.0

Recommended Posts

Spring4d 2.0 is out,but not compatible with 1.2.

Of course its open source,but is any simply changelog between 1.2 and 2.0,what's new etc?

And is any manual for easy convert Project with spring4d 1.2 for using with spring4d 2.0?

Share this post


Link to post

I guess it depends which features you are using, I did this a while back and only hit a few minor issues. I was mosly using the collections (and the IEnumerable<T> linq features) and the container.

Share this post


Link to post

Collections,Container,Logging,Persistence,Events,TActions,TProcs...

Edited by egroups

Share this post


Link to post

I switched from Delphi 10.2 to Delphi 11 and for now I'm using Spring4d 1.2. When GetIt is functional, I'll install Delphi 11 at home and then I'll test with Spring4d 2.0.

Share this post


Link to post
5 hours ago, egroups said:

When GetIt is functional, I'll install Delphi 11 at home and then I'll test with Spring4d 2.0.

Just clone the repo from bitbucket (with git) and use that. 

Share this post


Link to post
Posted (edited)

@Stefan Glienke Could you add a version constant to Spring.pas? Something like:

const
  Spring4DVersion = 2.0;

to help us maintain code compatible with 1.x and 2.0 at the same time, as it would allow:

{$IFNDEF DELPHI_12_UP}
constructor THashSet<T>.Create(ACapacity: NativeInt);
begin
{$IF defined(Spring4DVersion) and (Spring4DVersion >= 2)}
  inherited Create(ACapacity, nil);
{$ELSE}
  inherited Create;
{$ENDIF}
end;
{$ENDIF}

This is especially important for large teams/projects that share common code, where some projects and people use version 1.x while others use version 2.x, and the common code should support both.

Edited by vfbb

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×