Recent

Author Topic: CodeTools error  (Read 4329 times)

dicepd

  • Full Member
  • ***
  • Posts: 163
CodeTools error
« on: October 15, 2017, 05:05:12 pm »
I have been playing around with template inheritance recently. I came upon a name clash with TVector in one of the units so I prefixed TVector with gvector as in sample below

Code: Pascal  [Select][+][-]
  1. generic TOrderedVector<T> = class(specialize gvector.TVector<T>)

However whenever I tried to use TOrderedVector or one of its realized classes then I get a code tools error:

Code: Pascal  [Select][+][-]
  1.  pas(13,37) Error: identifier not found: specialize


This highlights the specialize before the gvector.TVector<T>.

If I move the TOrderedVector to a new unit which does not have a name clash and I can use the form

Code: Pascal  [Select][+][-]
  1. generic TOrderedVector<T> = class(specialize TVector<T>)

Then codetools works fine and code completion works as expected. Therefore codetools is barfing on having a fully qualified class name.

Peter

edit: This is in 1.8rc5 and is in 1.8rc4 also.
« Last Edit: October 15, 2017, 05:15:18 pm by dicepd »
Lazarus 1.8rc5 Win64 / Linux gtk2 64 / FreeBSD qt4

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: CodeTools error
« Reply #1 on: October 15, 2017, 05:09:56 pm »
Which version of lazarus are you using ?

Recently there were improvements made to code-tools especially with regards to generics (if they are solved correctly or not i do not know atm).

You might want to have a peek at mantis.

dicepd

  • Full Member
  • ***
  • Posts: 163
Re: CodeTools error
« Reply #2 on: October 15, 2017, 05:16:50 pm »
Looks like my edit and your comment crossed. see above for version.
Lazarus 1.8rc5 Win64 / Linux gtk2 64 / FreeBSD qt4

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: CodeTools error
« Reply #3 on: October 15, 2017, 05:26:32 pm »
Ah ok, i can see now. Sorry for that.

In that case i'm not sure which improvements/fixes made it into RC5 or not. You might want to have a look yourself if it was addressed (and perhaps addressed in such a way that it still causes issues which then would be good for a bug-report.).

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: CodeTools error
« Reply #4 on: October 15, 2017, 07:28:12 pm »
In that case i'm not sure which improvements/fixes made it into RC5 or not. You might want to have a look yourself if it was addressed (and perhaps addressed in such a way that it still causes issues which then would be good for a bug-report.).
What improvements are you referring to? The generics support in Codetools is still seriously broken and it has not improved lately. See for example this issue and its related issues:
 https://bugs.freepascal.org/view.php?id=23903
I don't think more bug reports are needed. Instead somebody should implement generics support properly. It will need big changes and refactoring. I guess Mattias or Ondrej start to work on it sometime in future ... unless somebody else jumps in. (Hint)
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

dicepd

  • Full Member
  • ***
  • Posts: 163
Re: CodeTools error
« Reply #5 on: October 15, 2017, 07:51:38 pm »
Quote
What improvements are you referring to? The generics support in Codetools is still seriously broken and it has not improved lately. See for example this issue and its related issues:
 https://bugs.freepascal.org/view.php?id=23903
I don't think more bug reports are needed. Instead somebody should implement generics support properly. It will need big changes and refactoring. I guess Mattias or Ondrej start to work on it sometime in future ... unless somebody else jumps in. (Hint)

If this is the case I thankfully do not have to create an account on that oh so painful Mantis site. I don't know how you guys cope with the slowness of mantis but after half an hour of trying to find out if this was relevant to any other report I just gave up.

Peter
Lazarus 1.8rc5 Win64 / Linux gtk2 64 / FreeBSD qt4

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: CodeTools error
« Reply #6 on: October 15, 2017, 07:54:32 pm »
Thank you for the additional information JuhaManninen

It might be that i confused your additions of related reports to someone actually started on trying to fix things. Sorry for that.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: CodeTools error
« Reply #7 on: October 16, 2017, 12:48:40 pm »
If this is the case I thankfully do not have to create an account on that oh so painful Mantis site. I don't know how you guys cope with the slowness of mantis but after half an hour of trying to find out if this was relevant to any other report I just gave up.
I wonder why you had so bad experience. For me the search options work very well. I can search based on many criteria, like "Reporter", "Assigned To", "Status" and any arbitrary word.

For example now I want to see how many open reports are there for Lazarus project. Hide Status = "resolved (And Above)", other fields have default values.
Apply Filter gives result in < 1 second. There are 1740 open reports. Quite many ...
If I search open Lazarus reports with word "generics" I get 12 results.
Searching for word "generic" gives 47 results, again very quickly.
I honestly don't understand why you find it difficult.

I remember it was slower some years ago. I guess there is a faster server now. Mantis is made with PHP which makes the screen update slower compared to some other languages. On the other hand PHP does not affect the DB query speed which is the biggest delay.
So, in my experience it works well and is fast enough.

Another issue is that the Mantis version is old. It really should be updated. I would not expect more speed but there are improvements for security, mail notifications and maybe usability, too. Now the mail notifications use some external script.
« Last Edit: October 16, 2017, 01:25:10 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018