stijnsanders / TMongoWire

Delphi MongoDB driver
MIT License
102 stars 37 forks source link

Compiling Delphi Berlin 10.1 #36

Closed OneideLuizSchneider closed 7 years ago

stijnsanders commented 7 years ago

I won't be pulling, please see my most recent commit where I used a single compiler-conditional on top.

OneideLuizSchneider commented 7 years ago

Hi I updated today, but it still does not compile. berlin-error

stijnsanders commented 7 years ago

Could you check (with Ctrl+Click on 'Seek') what is the exact type used in the declaration of IStream in your version?

stijnsanders commented 7 years ago

Did some more gophering, appears that older Delphi versions also support LargeUInt (but patch it through to Int64 just as well) Please check if it works with the current master?

OneideLuizSchneider commented 7 years ago

Hi, Missing implementation of interface method IPersistStream.GetSizeMax

image

stijnsanders commented 7 years ago

Does it compile if you only change GetSizeMax' argument to type Largeint?

OneideLuizSchneider commented 7 years ago

Yes it works in Delphi Berlin, but in Delphi 2010 it does not compile, because it is Int64. With the differative build works correctly: {$IFDEF VER310} p1,p2:UInt64; {$ELSE} p1,p2:int64;
{$ENDIF}

image

stijnsanders commented 7 years ago

nng, it really would be nice if there were just a single type that works with all, could you please try with p1,p2:LargeInt; or p1,p2:LargeUInt; just one more time, of that doesn't work, I'll put in the {$IFDEF VER310}

OneideLuizSchneider commented 7 years ago

Hi, Delphi 2010 Build Ok, in Delphi Berlin erro, according image. Try to merge a pull request.

image

stijnsanders commented 7 years ago

And with LargeUInt?

OneideLuizSchneider commented 7 years ago

In Delphi Berlin compile, but error in Delphi 2010 because it is Int64.

image

stijnsanders commented 7 years ago

Ok, see my recent commit. I hope this does it. I also hope anyone that knows any version that needs extra contidionals, lets me know.

OneideLuizSchneider commented 7 years ago

Delplhi Berlin Interface is different. In the Delphi 2010 interface is also different. This should be Largeint.

image

image

stijnsanders commented 7 years ago

ok, hope this is the one

OneideLuizSchneider commented 7 years ago

image

image

OneideLuizSchneider commented 7 years ago

So compile properly, please review.

bsonDoc.zip

stijnsanders commented 7 years ago

And that compiles in both versions?

OneideLuizSchneider commented 7 years ago

Yes, I can do another pull request if it is easier.

stijnsanders commented 7 years ago

I've committed something already, please check if it's ok. Your request has motivated me to look into replacing TMongoWire's bsonDoc with jsonDoc and a separate unit to load/save to/from BSON, chances are there won't be any IPersistStream involved any more.

OneideLuizSchneider commented 7 years ago

Hi It is not correct yet. Example below is that I have set this correct.

image

stijnsanders commented 7 years ago

very very strange

OneideLuizSchneider commented 7 years ago

No wonder this is Delphi.

image

OneideLuizSchneider commented 7 years ago

Build in Delphi 2010 and Berlin OK. Thanks for help.

image

stijnsanders commented 7 years ago

For your information: I've completed the switch to jsonDoc, and IPersistStream has moved out of the picture. If you switch to v1.1, let me know how it works for you.

OneideLuizSchneider commented 7 years ago

Hi, adjust the jsonTools.pas for compilation correctly, image below.

image

stijnsanders commented 7 years ago

Ah, I thought it was all fixed with eliminating IPersistStream, but basic IStream is still supported, see my last commit

OneideLuizSchneider commented 7 years ago

Hi, Must be VER310, not VER130. image below.

image

stijnsanders commented 7 years ago

I feel stupid now, see my corrective commit

OneideLuizSchneider commented 7 years ago

Hi, build ok...

image