Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020416Openbravo ERPA. Platformpublic2012-05-04 12:032021-06-21 13:59
marvintm 
marvintm 
normalminorhave not tried
closedfixed 
5
 
3.0MP12 
Core
No
0020416: Improve compilation task so that it doesn't always compile java files inside the modules folder
The compile task in Openbravo incrementally compiles files. This is good for performance reasons, because files will not be compiled unless they were changed after the last compilation.

However, this doesn't work in the case of files which are contained inside modules. In this case, due to an incorrect part of the build.xml file, these files are always compiled, regardless of whether this is necessary or not.
Do ant compile -Dtab=xx -Dtr=no. Then, do it again. Verify that the javac task compiles a large amount of files. This should not be needed, as the files were not changed.
Performance
related to defect 00215803.0MP16 closed shuehner Error compilation the application on 3.0mp12 
related to defect 0046521PR21Q3 closed shuehner ant compile.test does not work incrementally because of wrong src definition 
Issue History
2012-05-04 12:03marvintmNew Issue
2012-05-04 12:03marvintmAssigned To => marvintm
2012-05-04 12:03marvintmModules => Core
2012-05-04 12:21hgbotCheckin
2012-05-04 12:21hgbotNote Added: 0048372
2012-05-04 12:21hgbotStatusnew => resolved
2012-05-04 12:21hgbotResolutionopen => fixed
2012-05-04 12:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/95a918e7ff24eca96aaa94b0b8e48e8cbe8d5e05 [^]
2012-05-04 15:03hgbotCheckin
2012-05-04 15:03hgbotNote Added: 0048388
2012-05-04 15:04marvintmNote Added: 0048389
2012-05-04 15:04marvintmStatusresolved => new
2012-05-04 15:04marvintmResolutionfixed => open
2012-05-07 08:37shuehnerIssue Monitored: shuehner
2012-05-07 12:15hgbotCheckin
2012-05-07 12:15hgbotNote Added: 0048409
2012-05-07 12:15hgbotStatusnew => resolved
2012-05-07 12:15hgbotResolutionopen => fixed
2012-05-07 12:15hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/95a918e7ff24eca96aaa94b0b8e48e8cbe8d5e05 [^] => http://code.openbravo.com/erp/devel/pi/rev/b97198212bc308c1433d9d025c65a25637a031be [^]
2012-05-07 15:13hgbotCheckin
2012-05-07 15:13hgbotNote Added: 0048413
2012-05-25 12:09hudsonbotCheckin
2012-05-25 12:09hudsonbotNote Added: 0049022
2012-05-25 12:10hudsonbotCheckin
2012-05-25 12:10hudsonbotNote Added: 0049028
2012-05-25 12:10hudsonbotCheckin
2012-05-25 12:10hudsonbotNote Added: 0049036
2012-05-25 12:10hudsonbotCheckin
2012-05-25 12:10hudsonbotNote Added: 0049039
2012-05-29 08:49alostaleTag Attached: Performance
2012-05-29 08:53alostaleNote Added: 0049397
2012-05-29 08:53alostaleStatusresolved => closed
2012-05-29 08:53alostaleFixed in Version => 3.0MP12
2012-09-07 15:35shuehnerRelationship addedrelated to 0021580
2012-09-11 17:09hgbotCheckin
2012-09-11 17:09hgbotNote Added: 0051997
2012-09-26 17:18hudsonbotCheckin
2012-09-26 17:18hudsonbotNote Added: 0052727
2021-05-05 16:54shuehnerRelationship addedrelated to 0046521
2021-06-21 13:59hgbotNote Added: 0129693

Notes
(0048372)
hgbot   
2012-05-04 12:21   
Repository: erp/devel/pi
Changeset: 95a918e7ff24eca96aaa94b0b8e48e8cbe8d5e05
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri May 04 12:21:04 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/95a918e7ff24eca96aaa94b0b8e48e8cbe8d5e05 [^]

Fixed issue 20416. Fixed incremental compile of files inside modules

---
M src-wad/build.xml
M src/build.xml
---
(0048388)
hgbot   
2012-05-04 15:03   
Repository: erp/devel/pi
Changeset: 287d83bfc3998dc3354fbaebbeb72b15b33697d9
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri May 04 15:01:07 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/287d83bfc3998dc3354fbaebbeb72b15b33697d9 [^]

Related to issue 20416. Reverted incorrect change

---
M src-wad/build.xml
M src/build.xml
---
(0048389)
marvintm   
2012-05-04 15:04   
The change has been reverted because it was not completely correct
(0048409)
hgbot   
2012-05-07 12:15   
Repository: erp/devel/pi
Changeset: b97198212bc308c1433d9d025c65a25637a031be
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon May 07 11:56:08 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b97198212bc308c1433d9d025c65a25637a031be [^]

Fixed issue 20416. Fixed incremental compile of files inside modules

---
M src-wad/build.xml
M src/build.xml
---
(0048413)
hgbot   
2012-05-07 15:13   
Repository: erp/devel/pi
Changeset: 4e30e8a983864776f4056d04f33c58d8eae45a55
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon May 07 15:12:33 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4e30e8a983864776f4056d04f33c58d8eae45a55 [^]

Related to issue 20416. Fixed path definition in src-wad

---
M src-wad/build.xml
---
(0049022)
hudsonbot   
2012-05-25 12:09   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5401e185a8b0 [^]

Maturity status: Test
(0049028)
hudsonbot   
2012-05-25 12:10   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5401e185a8b0 [^]

Maturity status: Test
(0049036)
hudsonbot   
2012-05-25 12:10   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5401e185a8b0 [^]

Maturity status: Test
(0049039)
hudsonbot   
2012-05-25 12:10   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5401e185a8b0 [^]

Maturity status: Test
(0049397)
alostale   
2012-05-29 08:53   
code reviewed and verified on pi@f94acbb414d4
(0051997)
hgbot   
2012-09-11 17:09   
Repository: erp/devel/pi
Changeset: d6111f597f9c1b0aab263145956849f62cd3c680
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Tue Sep 11 17:07:03 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d6111f597f9c1b0aab263145956849f62cd3c680 [^]

Fixed 21580: Fix compiling on windows with many modules instaleld.
When fixing issue 20416 this changed the javac sourcepath definition to
include each subfolder of each module folder which may contain .java files
individually when calling javac. However it did consider any possible subfolder
below a module folder including i.e. web, src-db, referencedata.
However none of those folder should ever contain any .java file.
The only folder which should contain .java files are: src & src-test
This excludes the following two special folders (src-wad, src-util), but those
are never used in any normal compilation.

This building of a combined sourcepath with too many folders seems to overflow
some windows only sourcepath length restriction causing the compile to fail.

This commit changes behavior of the compile process to being the following:

A normal compile will only look into the following two subfolders below
a modules' folder:
a.) src
b.) src-test
Any .java file not in one of those folders will be ignored and not compiled
anymore.

This complies with unwritten openbravo practice since 2.50.
Also a search in all (380) published modules in status QA Approved in the CR
for 3.0 did only find a single module having a java file in a non-standard
location. And examining this case shows that is clearly a (harmless) bug and
not compiling that one file will not be a problem at all.

---
M src/build.xml
---
(0052727)
hudsonbot   
2012-09-26 17:18   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b780e90c6452 [^]

Maturity status: Test
(0129693)
hgbot   
2021-06-21 13:59   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: bfa9f2dc48119d9675fd275fb619b5b3411517e1
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-06-17T16:03:11+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/bfa9f2dc48119d9675fd275fb619b5b3411517e1 [^]

ISSUE-47174. Fix incremental compile near generate.entities.quick

Similar to issue 20416 also compile.src.gen & generate.entities.quick
had same bug causing to recompile files in modules/* always.

Fix that by ensuring the include part of javac call only matches the
path matching the javapackage of the source files.

- Specifically for compile.src.gen:
  - Remove the modules/*/src part which is supposed to match the src
    subfolder in any present module.
    Replace it by dirset entry matching the needed src subfolder
    separately.
- For the javac call at the end of generate.entities.quick split the
  srcdir attributed by a separate entry. Goal is the same to change from
  the ${base.modules} to a dirset matching the src folders properly

---
M src/build.xml
---