View Issue Details

IDProjectCategoryView StatusLast Update
0035267LazarusIDEpublic2019-11-15 19:19
ReporterOndrej Pokorny Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version2.1 (SVN) 
Summary0035267: LPI: Enable CompatibilityMode when opening legacy projects, disable it for new projects
DescriptionThe attached patch uses the new not-indexed item format in LPI/LPS in new projects (0022752).

If you open a legacy project (that was created in Lazarus 2.0 and older) it sets CompatibilityMode and so it can be opened in legacy Lazarus versions again.
TagsNo tags attached.
Fixed in Revisionr60765
LazTarget-
Widgetset
Attached Files

Relationships

related to 0022752 feedbackJuha Manninen Unit list mess in .lpi file 

Activities

Ondrej Pokorny

2019-03-24 09:41

developer  

CompatiblityMode-01.patch (1,417 bytes)   
Index: components/ideintf/projectintf.pas
===================================================================
--- components/ideintf/projectintf.pas	(revision 60756)
+++ components/ideintf/projectintf.pas	(working copy)
@@ -632,8 +632,7 @@
                          pfRunnable,
                          pfLRSFilesInOutputDirectory,
                          pfSaveJumpHistory,
-                         pfSaveFoldState,
-                         pfCompatibilityMode {ToDo: Remove this after everything works.}
+                         pfSaveFoldState
                          ];
   DefaultProjectFlags = DefaultProjectNoApplicationFlags+[
                          pfMainUnitHasCreateFormStatements,
Index: ide/project.pp
===================================================================
--- ide/project.pp	(revision 60756)
+++ ide/project.pp	(working copy)
@@ -2797,6 +2797,11 @@
     SetFlag(pfMainUnitHasScaledStatement,OldProjectType in [ptApplication]);
     SetFlag(pfRunnable, OldProjectType in [ptProgram,ptApplication,ptCustomProgram]);
   end;
+  if FFileVersion<=11 then begin
+    // set CompatibilityMode flag for legacy projects (this flag was added in FFileVersion=12 that changed
+    // item format so that LPI cannot be opened in legacy Lazarus unless pfCompatibilityMode is set)
+    SetFlag(pfCompatibilityMode, True);
+  end;
   Flags:=Flags-[pfUseDefaultCompilerOptions];
 end;
 
CompatiblityMode-01.patch (1,417 bytes)   

Juha Manninen

2019-03-24 20:39

developer   ~0115030

Applied, thanks.

Issue History

Date Modified Username Field Change
2019-03-24 09:41 Ondrej Pokorny New Issue
2019-03-24 09:41 Ondrej Pokorny File Added: CompatiblityMode-01.patch
2019-03-24 16:11 Juha Manninen Relationship added related to 0022752
2019-03-24 16:37 Juha Manninen Assigned To => Juha Manninen
2019-03-24 16:37 Juha Manninen Status new => assigned
2019-03-24 20:39 Juha Manninen Fixed in Revision => r60765
2019-03-24 20:39 Juha Manninen LazTarget => -
2019-03-24 20:39 Juha Manninen Note Added: 0115030
2019-03-24 20:39 Juha Manninen Status assigned => resolved
2019-03-24 20:39 Juha Manninen Resolution open => fixed
2019-11-15 19:19 Ondrej Pokorny Status resolved => closed