Re: [fpc-devel] Breaking change in FPC 2.6.1
On Mon, Apr 30, 2012 at 1:56 AM, Martin Schreiber mse00...@gmail.com wrote: On Thursday 26 April 2012 06:58:01 Martin Schreiber wrote: On Wednesday 25 April 2012 21:43:30 Marco van de Voort wrote: In our previous episode, Marcos Douglas said: Done, trunk r21037. Affected were tdataset and bufdataset (conversion between Pbufbookmark and tbytes). What about 2.6.1, will change in a few days too? When it is sufficiently tested or when I give up waiting. (typically 6-8 weeks). I strongly recommend to revert the type of TDataSet.Bookmark to TBookmarkStr in FPC 2.6.1 (fixes_2_6) and to change type of TDataSet.Bookmark = tbytes in FPC 2.7.1 only. What is the decision of FPC-core? I think is TDataSet.Bookmark = TBytes. Marcos Douglas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Breaking change in FPC 2.6.1
On Monday 30 April 2012 13:40:43 Marcos Douglas wrote: I strongly recommend to revert the type of TDataSet.Bookmark to TBookmarkStr in FPC 2.6.1 (fixes_2_6) and to change type of TDataSet.Bookmark = tbytes in FPC 2.7.1 only. What is the decision of FPC-core? I think is TDataSet.Bookmark = TBytes. Thanks. So the decision is to change TDataSet.Bookmark from TBookmarkStr to TBytes in FPC 2.6.1 which breaks FPC 2.6.0 user and framework code? Are there other breaking changes planned for FPC 2.6.1? cpstrnew related maybe? Martin ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Problem with nested classes and const struct values
This problem recently appeared in svn/fpc/trunk I tried pointing to: CLSInfo : @Root.Test.CLSInfo ; // Still not working CLSInfo : @Root.Test.CLSInfo1 ;// Renamed dec and still didn't work. This problem did not exist a few days ago. I have a ton of units that don't compile now!!! Please help. atbrunner@Satellite:/Developer/Source/Projects/Test/Nested$ fpc ./Test.lpr Free Pascal Compiler version 2.7.1 [2012/04/30] for x86_64 Copyright (c) 1993-2012 by Florian Klaempfl and others Target OS: Linux for x86-64 Compiling ./Test.lpr Test.lpr(65,43) Error: Illegal expression Test.lpr(65,36) Error: Incompatible types: got Pointer expected PCLSInfo Test.lpr(65,43) Error: Illegal expression Test.lpr(66,36) Error: Incompatible types: got Pointer expected PACLInfo Test.lpr(66,43) Error: Illegal expression Test.lpr(73) Fatal: There were 5 errors compiling module, stopping Fatal: Compilation aborted Test.lpi Description: Binary data ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Problem with nested classes and const struct values
Andrew Brunner wrote on Mon, 30 Apr 2012: This problem recently appeared in svn/fpc/trunk I tried pointing to: CLSInfo : @Root.Test.CLSInfo ; // Still not working CLSInfo : @Root.Test.CLSInfo1 ;// Renamed dec and still didn't work. This problem did not exist a few days ago. I have a ton of units that don't compile now!!! Please help. You attached the .lpi instead of the .lpr file. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Interface: Method resolution clauses
Hi, Can I, using FPC trunk, do this sintaxe? type TMemoryManager = class(TInterfacedObject, IMalloc, IErrorInfo) function IMalloc.Alloc = Allocate; procedure IMalloc.Free = Deallocate; ... end; I'm using 2.6.1 and do not works. From Dephi's (7) help: -- You can override the default name-based mappings by including method resolution clauses in a class declaration. When a class implements two or more interfaces that have identically named methods, use method resolution clauses to resolve the naming conflicts. A method resolution clause has the form procedure interface.interfaceMethod = implementingMethod; or function interface.interfaceMethod = implementingMethod; where implementingMethod is a method declared in the class or one of its ancestors. The implementingMethod can be a method declared later in the class declaration, but cannot be a private method of an ancestor class declared in another module. For example, the class declaration type TMemoryManager = class(TInterfacedObject, IMalloc, IErrorInfo) function IMalloc.Alloc = Allocate; procedure IMalloc.Free = Deallocate; ... end; maps IMalloc's Alloc and Free methods onto TMemoryManager's Allocate and Deallocate methods. A method resolution clause cannot alter a mapping introduced by an ancestor class. Thanks, Marcos Douglas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Problem with nested classes and const struct values
Here's the source... Test.lpr Description: Binary data ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Interface: Method resolution clauses
In our previous episode, Marcos Douglas said: Can I, using FPC trunk, do this sintaxe? type TMemoryManager = class(TInterfacedObject, IMalloc, IErrorInfo) function IMalloc.Alloc = Allocate; procedure IMalloc.Free = Deallocate; ... end; No. See bug #21064. p.s. In a case like this searching for interface in mantis and clicking a few reports there, will work faster :-) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Interface: Method resolution clauses
30.04.2012 19:06, Marcos Douglas пишет: Hi, Can I, using FPC trunk, do this sintaxe? type TMemoryManager = class(TInterfacedObject, IMalloc, IErrorInfo) function IMalloc.Alloc = Allocate; procedure IMalloc.Free = Deallocate; ... end; I'm using 2.6.1 and do not works. To my knowledge, this kind of stuff should work. What exact problem are you experiencing? Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Interface: Method resolution clauses
On Mon, Apr 30, 2012 at 12:13 PM, Marco van de Voort mar...@stack.nl wrote: In our previous episode, Marcos Douglas said: Can I, using FPC trunk, do this sintaxe? type TMemoryManager = class(TInterfacedObject, IMalloc, IErrorInfo) function IMalloc.Alloc = Allocate; procedure IMalloc.Free = Deallocate; ... end; No. See bug #21064. Thanks. p.s. In a case like this searching for interface in mantis and clicking a few reports there, will work faster :-) You propose me to search for a bug instead of a solution? :) Forget, I understood. Marcos Douglas p.s: Do you think that my work was stoped because the FPC do not have this feature? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Interface: Method resolution clauses
On Mon, Apr 30, 2012 at 4:10 PM, Marco van de Voort mar...@stack.nl wrote: In our previous episode, Marco van de Voort said: end; No. See bug #21064. This involves generics, so is something different. Yeah, I saw... This confused the two of us. Thanks anyway. Marcos Douglas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] FreePascal Git Repo and 2_6 branch
On 28 April 2012 18:57, Marco van de Voort mar...@stack.nl wrote: In our previous episode, Graeme Geldenhuys said: To do it the correct way, is a lot of work, hence the reason I stopped mirroring the fixes branches. What I mean by correct way, is cherry-picking the commits from Trunk (master) and applying them in the fixes branch - thus it is one standard git repository (with alternate branches), is more efficient for git to work with, and uses less disk space. But the problem is, it can't be automated (I need to manually track what commits are merged by FPC developers, manually fix conflicts etc) and my free time is very limited. I can try to create some form of automated feed of fixes tree commits + items that are merged. So assume fixes branch rev X merges revision T1,T2,T3 from trunk. You then roughly would do for X in all fixes revs to process since last processing do begin svn diff fixes branch X-1,X temp.patch cherry pick from git trunk to git fixes revs (e.g. T1 T2 T3) git revert all changes to files but not mergeinfo (resolves all conflicts) patch -p0 temp.patch( applies the manually merged fixes) git push/commit whatever end; An innerloop for T1,T2,T3 separately is unfortunately not possible (since manual fixes up might apply to all revs at once) I'm not saying that I will have such info next week, but if you could test if you could get such scenario done with GIT, I can see if I drag such info out of the mergelog package in time. (which I'm still expanding) I doubt it is the same as truly working through GIT (I'm not sure if tracking of line changesets works even if you could all Tx individually), it might be already better since it is automated and has GIT level info per fixes rev what revs were merged from trunk. It assumes GIT can deal with mergeinfo a bit creatively and flexible though. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel How about SubGit - http://subgit.com ? I am always on the lookout for the next miracle cure :) Disclaimer: sender of this email knows next to nothing about git and svn interoperability issues. -- Frank Church === http://devblog.brahmancreations.com ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Problem with nested classes and const struct values
FWIW FPC 2.6.0 also triggers the same error. AFAICS this problem is somewhat analogous to the limitation when declaring members in a record. Are you sure the unit in your big project is being compiled? -Flávio On Mon, Apr 30, 2012 at 3:39 PM, Andrew Brunner andrew.t.brun...@gmail.com wrote: Well, The problem started when I did a fresh install of Ubuntu 12.04. The main project that uses similar code to my attached test had FPC raise the same error but with similar code. Presently, a fresh build of FPC and Lazarus allows me to build my big project however, the test project still won't build with Compiling ./Test.lpr Test.lpr(65,36) Error: Incompatible types: got Pointer expected PCLSInfo Test.lpr(65,44) Error: Illegal expression Test.lpr(66,36) Error: Incompatible types: got Pointer expected PACLInfo Test.lpr(66,44) Error: Illegal expression Test.lpr(73) Fatal: There were 4 errors compiling module, stopping Fatal: Compilation aborted But yet my big project with very complex nested declarations compiles just fine snip unit coAdmin; interface uses hTimer,hHTTP,hHTTPd,hRSR,uRSR,Classes,uCoreObjects,uKeywords, hSRConsts,uTimer,uStringArray,uVarString,uKPList,hDateUtils,uFileUtils, dbmDomains,dbmCoreObjects,dbmUserAccounts,dbmRSS,dbmCalendaring,hDatabase; Type ns=class Type Admin=class const XMLInf:TXMLInfo=( Enabled : false; ); ACLInf:TACLInfo=( Name : 'Admin'; NameSpace : '/core/admin'; Caption : 'Administration Core Object'; Prompt : 'User can access administration dashboard'; Description : 'Back-end system administration handler' ); CLSInf:TCLSInfo=( Name : 'TAdminCore'; Location : 'coAdmin.pas'; ); Header:TCoreObjectInfo=( ID : 0; ProviderID : 0; Enabled : true; Anonymous : false; NotifyOnBuffersChanged : false; Scale : 0; CLSInfo : @CLSInf; ACLInfo : @ACLInf; ); snip of more of these types of declarations On Mon, Apr 30, 2012 at 1:12 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: On 30 Apr 2012, at 16:48, Andrew Brunner wrote: This problem did not exist a few days ago. Can you be more precise? I just checked with trunk from before the jvmbackend merge (which is from Thursday), and that one also gives an error. Jonas___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Memory corruption running fcl-db test suite
Hi, today i hit a strange bug while running the fcl-db test suite. I'm using fpc from trunk rev 21150 windows xp 32 bit. I'm compiling trunk with fpc 260. Attached the script i use. I compiled and ran packages\fcl-db\tests\dbtestframework.pas All the tests run fine, but in testsuite finalization the cpu usage goes to sky taking to long to terminate While debugging i found that the TTestResult instance memory is corrupted even before the tests are run. Follows gdb output. Notice that the global variable testResult gets the address 0x5b000 in line 44 (GetTestRegistry.Run(testResult); ) this variable is passed as a parameter to TTESTSUITE.RUN But inside TTESTSUITE.RUN the parameter value (AResult) gets the address 0x676f0 If i try to dereference (p AResult^) i get a corrupted instance Further investigation i found that 0x676f0 is the address of this (TTestSuite instance). Dereferencing it (this^) shows correct field values Any hint on whats going on? Luiz Starting program: D:\repositories\fpc_trunk\packages\fcl-db\tests/dbtestframework.exe [New Thread 3960.0x5b4] Breakpoint 1, main () at dbtestframework.pas:42 42 FXMLResultsWriter.WriteHeader; (gdb) p testResult $1 = (^TTESTRESULT) 0x5b000 (gdb) p testResult^ $2 = {TOBJECT = {_vptr$ = {0x4eb6d8, 0x0}}, FRUNTESTS = 0, FFAILURES = 0x6af30, FIGNOREDTESTS = 0x6b790, FERRORS = 0x6b7d0, FLISTENERS = 0x6b830, FSKIPPEDTESTS = 0x6b810, FSTARTINGTIME = 41030.043956875001} (gdb) n testresults testlisting 44 GetTestRegistry.Run(testResult); (gdb) s TTESTSUITE__RUN (ARESULT=0x676f0, this=error reading variable) at ./fcl-fpcunit/src/fpcunit.pp:1027 1027begin (gdb) p ARESULT $3 = (TTESTRESULT) 0x676f0 (gdb) p ARESULT^ $4 = {TOBJECT = {_vptr$ = {0x4eb750, 0x0}}, FRUNTESTS = 0, FFAILURES = 0x67710, FIGNOREDTESTS = 0x0, FERRORS = 0x0, FLISTENERS = 0x1, FSKIPPEDTESTS = 0xbaadf00d, FSTARTINGTIME = 8.2257045098914865e-309} (gdb) p this $5 = (TTESTSUITE) 0x676f0 (gdb) p this^ $6 = {TTEST = {TOBJECT = {_vptr$ = {0x4eb750, 0x0}}, FLASTSTEP = STSETUP}, FTESTS = 0x67710, FNAME = 0x0, FTESTSUITENAME = 0x0, FENABLEIGNORES = true} (gdb) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Problem with nested classes and const struct values
Yes. I'm completely sure it's working now. But i can't figure out why the small project doesn't. I even tried to make clean for my big project to see if I could make it not work.. but it compiles now. On Mon, Apr 30, 2012 at 11:23 PM, Flávio Etrusco flavio.etru...@gmail.comwrote: FWIW FPC 2.6.0 also triggers the same error. AFAICS this problem is somewhat analogous to the limitation when declaring members in a record. Are you sure the unit in your big project is being compiled? -Flávio On Mon, Apr 30, 2012 at 3:39 PM, Andrew Brunner andrew.t.brun...@gmail.com wrote: Well, The problem started when I did a fresh install of Ubuntu 12.04. The main project that uses similar code to my attached test had FPC raise the same error but with similar code. Presently, a fresh build of FPC and Lazarus allows me to build my big project however, the test project still won't build with Compiling ./Test.lpr Test.lpr(65,36) Error: Incompatible types: got Pointer expected PCLSInfo Test.lpr(65,44) Error: Illegal expression Test.lpr(66,36) Error: Incompatible types: got Pointer expected PACLInfo Test.lpr(66,44) Error: Illegal expression Test.lpr(73) Fatal: There were 4 errors compiling module, stopping Fatal: Compilation aborted But yet my big project with very complex nested declarations compiles just fine snip unit coAdmin; interface uses hTimer,hHTTP,hHTTPd,hRSR,uRSR,Classes,uCoreObjects,uKeywords, hSRConsts,uTimer,uStringArray,uVarString,uKPList,hDateUtils,uFileUtils, dbmDomains,dbmCoreObjects,dbmUserAccounts,dbmRSS,dbmCalendaring,hDatabase; Type ns=class Type Admin=class const XMLInf:TXMLInfo=( Enabled : false; ); ACLInf:TACLInfo=( Name : 'Admin'; NameSpace: '/core/admin'; Caption : 'Administration Core Object'; Prompt : 'User can access administration dashboard'; Description : 'Back-end system administration handler' ); CLSInf:TCLSInfo=( Name : 'TAdminCore'; Location : 'coAdmin.pas'; ); Header:TCoreObjectInfo=( ID : 0; ProviderID : 0; Enabled : true; Anonymous: false; NotifyOnBuffersChanged : false; Scale: 0; CLSInfo : @CLSInf; ACLInfo : @ACLInf; ); snip of more of these types of declarations On Mon, Apr 30, 2012 at 1:12 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: On 30 Apr 2012, at 16:48, Andrew Brunner wrote: This problem did not exist a few days ago. Can you be more precise? I just checked with trunk from before the jvmbackend merge (which is from Thursday), and that one also gives an error. Jonas___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel