From 54b8e7380aee35f5018abea3099ef8ea9761ec2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Guimar=C3=A3es?= Date: Mon, 18 Nov 2019 09:25:47 -0300 Subject: [PATCH] Solve the compilation problem in DX Berlin **- Problem** ``` "\.boss\modules\5a7f3942105f389501dd9b6feb076eff\modules\boss-ide\boss_ide.dproj" (Build target) (1) -> (_PasCoreCompile target) -> src\core\Boss.Modules.PackageProcessor.pas(166): error E2010: Incompatible types: 'TStringDynArray' and 'System.TArray' src\core\Boss.Modules.PackageProcessor.pas(198): error E2010: Incompatible types: 'System.TArray' and 'TStringDynArray' src\core\Boss.Modules.PackageProcessor.pas(245): error E2010: Incompatible types: 'System.TArray' and 'TStringDynArray' boss_ide.dpk(38): error F2063: Could not compile used unit 'Boss.Modules.PackageProcessor.pas' 1 Warning(s) 4 Error(s) Time Elapsed 00:00:01.24 ``` **- Solution** Replace 'System.TArray ' with 'TStringDynArray' --- src/core/Boss.Modules.PackageProcessor.pas | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/Boss.Modules.PackageProcessor.pas b/src/core/Boss.Modules.PackageProcessor.pas index 1c871b7..70369cb 100644 --- a/src/core/Boss.Modules.PackageProcessor.pas +++ b/src/core/Boss.Modules.PackageProcessor.pas @@ -22,7 +22,7 @@ TBossPackageProcessor = class procedure LoadTools(AProjectPath: string); procedure MakeLink(AProjectPath, AEnv: string); - procedure DoLoadBpls(ABpls: TArray); + procedure DoLoadBpls(ABpls: TStringDynArray); constructor Create; public @@ -149,7 +149,9 @@ function TBossPackageProcessor.GetBplList: TStringDynArray; LOrderFileName: string; LOrder: TStringList; LIndex: Integer; + I: Integer; begin + Result := Nil; if not DirectoryExists(GetEnv(C_ENV_BPL)) then Exit(); @@ -163,7 +165,9 @@ function TBossPackageProcessor.GetBplList: TStringDynArray; for LIndex := 0 to LOrder.Count - 1 do LOrder.Strings[LIndex] := GetEnv(C_ENV_BPL) + TPath.DirectorySeparatorChar + LOrder.Strings[LIndex]; - Result := LOrder.ToStringArray; + SetLength(Result, LOrder.Count); + for I := 0 to LOrder.Count - 1 do + Result[I] := LOrder[I]; finally LOrder.Free; end; @@ -198,7 +202,7 @@ procedure TBossPackageProcessor.LoadBpls; DoLoadBpls(LBpls); end; -procedure TBossPackageProcessor.DoLoadBpls(ABpls: TArray); +procedure TBossPackageProcessor.DoLoadBpls(ABpls: TStringDynArray); var LBpl: string; LFlag: Integer;