Bug #4867
Incremental conversion: change detection algorithm ignores .hints and .ext-hints files
100%
Related issues
History
#1 Updated by Vladimir Tsichevski almost 6 years ago
- Related to Bug #3471: incremental conversion is regressed added
#2 Updated by Vladimir Tsichevski almost 6 years ago
The incremental compilation dependencies calculation procedure must detect changes in .hints and .ext-hints files.
#3 Updated by Greg Shah almost 6 years ago
- Project changed from Runtime Infrastructure to Conversion Tools
Sorry, it was my fault this was in the wrong project.
#4 Updated by Greg Shah about 1 year ago
- Subject changed from Incremental conversion: change detection algorithm ignores .ext-hints files to Incremental conversion: change detection algorithm ignores .hints and .ext-hints files
- Start date deleted (
08/31/2020)
#5 Updated by Dănuț Filimon 9 months ago
- Assignee set to Dănuț Filimon
#6 Updated by Dănuț Filimon 9 months ago
- Status changed from New to WIP
// check the hint files
try
{
PreprocessorHints hints = new PreprocessorHints(file);
Set<String> includes = hints.getUniqueIncludes();
for (String finclude : includes)
{
if (!new File(finclude).exists())
{
// the include file no longer exists...
return true;
}
currentHash = fdbhash.apply(finclude);
hash = computeFileHash(finclude);
if (!hash.equals(currentHash))
{
return true;
}
}
}
catch (PreprocessorException e)
{
throw new RuntimeException(e);
}
This is part of the mustConvertFile() and it should work. The problem with incremental conversion is that we need include files to compare the hashes. I tried to use a simple example where I define an alias for the database in the hints, but it was not enough to get include files. The best solution would be to calculate the hash on the hints file and not on the include files, but I need an example that enters the for loop.#7 Updated by Dănuț Filimon 9 months ago
I found https://proj.goldencode.com/projects/p2j/wiki/Chapter_12_Conversion_Hints for reference.
#8 Updated by Dănuț Filimon 9 months ago
- % Done changed from 0 to 100
- Status changed from WIP to Review
- reviewer Greg Shah added
Committed 4867a/16236. hints and ext-hints files should trigger changes during incremental conversion.
Greg, please review.
#9 Updated by Greg Shah 8 months ago
- Status changed from Review to Internal Test
Code Review Task branch 4867a Revision 16236
The changes are good.
In mustConvertFile(), before line 818 (if (!hash.equals(currentHash))), please add this comment // the hint file didn't already exist or has been modified.
#10 Updated by Dănuț Filimon 8 months ago
Committed 4867a/16237 to add a comment.
#11 Updated by Dănuț Filimon 8 months ago
I tested ChUI conversion and incremental and found no issues, are there any other projects that use hint files?
#12 Updated by Vladimir Tsichevski 8 months ago
Dănuț Filimon wrote:
I tested ChUI conversion and incremental and found no issues, are there any other projects that use hint files?
FWD unit testing can consult the .hints file to determine the unit test flavor (ABLUnit or OEUnit). Our customer's projects use .ext-hints files.
#14 Updated by Dănuț Filimon 8 months ago
Customer conversion will be complete tomorrow morning, I'll be able to test incremental then and confirm the fix.
#15 Updated by Dănuț Filimon 8 months ago
Tested the customer application, no issues found. 4867a can be merged.
#17 Updated by Dănuț Filimon 8 months ago
- version_resolved set to trunk/16290
- Status changed from Merge Pending to Test
Branch 4867a was merged into trunk as rev. 16290 and archived.