Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread Mattias Gaertner
On Mon, 11 Jan 2016 14:24:40 +0100
"John Landmesser"  wrote:

>[...]
> Kompiliere Package IDEIntf 1.0: Exit code 1, Fehler: 4, Hinweise: 1
> projectintf.pas(708,14) Error: Identifier not found "RawByteString"

Fixed.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread Mattias Gaertner
On Mon, 11 Jan 2016 07:00:59 -0700 (MST)
leledumbo  wrote:

> > Isn't it possible anymore  to compile svn Lazarus with fc 2.6.4 ??
> 
> No. Latest stable is the only one that's supported, latest stable is 3.0.0.

FPC 3.0.0 is still fresh. We should try to give users some more time to
port their software.

In this particular case RawByteString is not needed and not intended.
It probably was created by auto completion of

xIconFiles|:=ChangeFileExt();

Code completion needs a heuristic when to use String (or maybe
AnsiString) instead of RawByteString.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread leledumbo
> Isn't it possible anymore  to compile svn Lazarus with fc 2.6.4 ??

No. Latest stable is the only one that's supported, latest stable is 3.0.0.



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Lazarus-trunc-does-not-compile-with-fpc-2-6-4-Win32-tp4046548p4046552.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread Juha Manninen
On Mon, Jan 11, 2016 at 4:00 PM, leledumbo  wrote:
>> Isn't it possible anymore  to compile svn Lazarus with fc 2.6.4 ??
>
> No. Latest stable is the only one that's supported, latest stable is 3.0.0.

Actually we plan to keep Lazarus compilable with FPC 2.6.4 for some time.
Typically it should support 2 last versions of FPC. It would mean that
2.6.4 is dropped when 3.0.2 comes out.
Now however the new UTF-8 system breaks existing code when it depends
on system codepage on Windows. One way to solve the problem is to
continue using FPC 2.6.4. Lazarus compilation for 2.6.4 can be
maintained relatively easily. No need to break it anytime soon.

The problematic commit was r51233 by Ondrej. I planned to fix it but
Mattias did already.

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread John Landmesser
i get this error message if i try to compile 

 

Lazarus 1.7 r50846 FPC 2.6.4 i386-win32-win32/win64

( last working version, December 2015 )

 

Message:

Kompiliere Package SynEdit 1.0: Abgebrochen, Warnungen: 1, Hinweise: 2
synedithighlighterfoldbase.pas(1168,43) Hint: Mixing signed expressions and longwords gives a 64bit result
syntextdrawer.pp(962,31) Warning: Symbol "CanUTF8" is deprecated
syneditfoldedview.pp(352,24) Hint: Value parameter "aFoldProvider" is assigned but never used
Kompiliere Package IDEIntf 1.0: Exit code 1, Fehler: 4, Hinweise: 1
projectintf.pas(708,14) Error: Identifier not found "RawByteString"
projectintf.pas(708,27) Error: Error in type definition
projectintf.pas(729,26) Error: Incompatible type for arg no. 1: Got "", expected "AnsiString"
projectintf.pas(733,35) Error: Incompatible type for arg no. 1: Got "", expected "AnsiString"
graphic.inc(236,20) Hint: Found declaration: TGraphic.LoadFromFile(const AnsiString);

 

My system:

 

Win32 , XP SP 2 

 

Isn't it possible anymore  to compile svn Lazarus with fc 2.6.4 ??

 

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread Mattias Gaertner
On Mon, 11 Jan 2016 10:46:00 -0500
Dmitry Boyarintsev  wrote:

> On Mon, Jan 11, 2016 at 10:32 AM, Mattias Gaertner <
> nc-gaert...@netcologne.de> wrote:
> 
> > There is no overload. There is only one definition:
> >
> > {$define PathStr:=RawByteString}
> >
> why not
> type
>   PathStr= RawByteString; ?

Good question. Maybe ask on the FPC list.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread John Landmessser

Am 11.01.2016 um 15:23 schrieb Mattias Gaertner:

On Mon, 11 Jan 2016 14:24:40 +0100
"John Landmesser"  wrote:


[...]
Kompiliere Package IDEIntf 1.0: Exit code 1, Fehler: 4, Hinweise: 1
projectintf.pas(708,14) Error: Identifier not found "RawByteString"

Fixed.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



Mattias fixed and therefore i can compile Lazarus at home ( problem 
occured  in office today )?!!


I'll see tomorrow.

Thanks in advanced :-))

John Landmesser

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread Ondrej Pokorny

On 11.01.2016 16:32, Mattias Gaertner wrote:

On Mon, 11 Jan 2016 16:13:49 +0100
Ondrej Pokorny  wrote:

I think it fails to find exact overloads. 

There is no overload. There is only one definition:

{$define PathStr:=RawByteString}

function ChangeFileExt(const FileName, Extension: PathStr): PathStr;


finah.inc is loaded twice with different PathStr macro so there are 
effectively 2 overloaded ChangeFileExt.


The issue can be easily reproduced (try to complete X):

function StrFunc(Str: string): string;
begin
  Result := Str;
end;

function StrFunc(Str: RawByteString): RawByteString;
begin
  Result := Str;
end;

procedure Test;
var
  R: RawByteString;
  S: string;
begin
  X := StrFunc(S);
end;

This is because both string and RawByteString have the same default type 
(AnsiString) in CodeTools.


The same is for numbers (and any other type defined with "child = type 
parent"):


type
  PtrInt = type Longint;

function NumFunc(Num: PtrInt): PtrInt;
begin
  Result := Num;
end;

function NumFunc(Num: Integer): Integer;
begin
  Result := Num;
end;

procedure Test;
var
  I: Integer;
  P: PtrInt;
begin
  X := NumFunc(P);
end;

=> CodeTools fail to find the exact matching overload if there is 
another less good (but still acceptable) overload. CodeTools are fine 
when they found one compatible overload, not the best that is actually 
picked up by the compiler.


Are you aware of this bug (or are you aware of an issue report in mantis)?

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread Mattias Gaertner
On Mon, 11 Jan 2016 17:42:23 +0100
Ondrej Pokorny  wrote:

>[...]
> finah.inc is loaded twice with different PathStr macro so there are 
> effectively 2 overloaded ChangeFileExt.

You are right.

 
> The issue can be easily reproduced (try to complete X):
> 
> function StrFunc(Str: string): string;
> begin
>Result := Str;
> end;
> 
> function StrFunc(Str: RawByteString): RawByteString;
> begin
>Result := Str;
> end;
> 
> procedure Test;
> var
>R: RawByteString;
>S: string;
> begin
>X := StrFunc(S);
> end;
> 
> This is because both string and RawByteString have the same default type 
> (AnsiString) in CodeTools.
>[...]
> => CodeTools fail to find the exact matching overload if there is 
> another less good (but still acceptable) overload. CodeTools are fine 
> when they found one compatible overload, not the best that is actually 
> picked up by the compiler.
> 
> Are you aware of this bug (or are you aware of an issue report in mantis)?

I'm aware. Codetools have only three states: exact, compatible and
incompatible. But in case of RawByteString and UnicodeString
one "compatible" is not enough.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread Michael Van Canneyt



On Mon, 11 Jan 2016, Dmitry Boyarintsev wrote:


On Mon, Jan 11, 2016 at 10:32 AM, Mattias Gaertner <
nc-gaert...@netcologne.de> wrote:


There is no overload. There is only one definition:

{$define PathStr:=RawByteString}


why not
type
 PathStr= RawByteString; ?


Poor mans generics, re-reading the same include file with different definition 
of
{$define PathStr:=RawByteString}

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread Ondrej Pokorny

On 11.01.2016 15:22, Mattias Gaertner wrote:

In this particular case RawByteString is not needed and not intended.
It probably was created by auto completion of

xIconFiles|:=ChangeFileExt();


Correct. It wasn't definitely intended. I'll be more careful when using 
Code Completion.



On 11.01.2016 15:22, Mattias Gaertner wrote:

Code completion needs a heuristic when to use String (or maybe
AnsiString) instead of RawByteString.


I think it fails to find exact overloads.

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread Mattias Gaertner
On Mon, 11 Jan 2016 16:13:49 +0100
Ondrej Pokorny  wrote:

>[...]
> > xIconFiles|:=ChangeFileExt();
>[...]
> > Code completion needs a heuristic when to use String (or maybe
> > AnsiString) instead of RawByteString.
> 
> I think it fails to find exact overloads.

There is no overload. There is only one definition:

{$define PathStr:=RawByteString}

function ChangeFileExt(const FileName, Extension: PathStr): PathStr;

Note to self: it would be nice if Find Declaration would jump to the
macro definition of PathStr.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread Dmitry Boyarintsev
On Mon, Jan 11, 2016 at 10:32 AM, Mattias Gaertner <
nc-gaert...@netcologne.de> wrote:

> There is no overload. There is only one definition:
>
> {$define PathStr:=RawByteString}
>
why not
type
  PathStr= RawByteString; ?

thanks,
Dmitry
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread Ondrej Pokorny

On 11.01.2016 18:18, Mattias Gaertner wrote:

I'm aware. Codetools have only three states: exact, compatible and
incompatible. But in case of RawByteString and UnicodeString
one "compatible" is not enough.


This is somehow not entirely correct (I haven't checked why). The 
integer example I gave in the last email also fails. That should comply 
with the "exact" state (PtrInt used both as variable and overload 
parameter).


Maybe the desired behavior (match for exact state) has a bug as well.

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus