Feature #8849
Automatic dependencies conversion
0%
Related issues
History
#1 Updated by Marian Edu 28 days ago
When trying to convert testcases for specific subject we found it difficult to find all dependencies used in those tests that were converted and beside some generic classes we knew were used it was always a repetitive trial&error process until we got everything needed in the convert list file so the conversion actually completes without error and then at runtime everything was available.
The scenario we were looking for was to only add the files that we knew we want to be converted and then all other 'dependencies' to be automatically converted without the need to add everything in the file convert list in the first place.
We identified the following cases:
- OO objects: USING statements, used as data type, static method calls
- Procedural objects: RUN statements with hard coded external procedure
- Database triggers
We've made some changes to the conversion components to automatically add those dependencies to the conversion, for OO and procedural objects those were already resolved through SymbolResolver
so only the one actually used are added, for database triggers we're simply converting all triggers defined for the database schemas.
This is enabled by setting a general parameter (convert-deps
) to true in Configuration
(p2j.cfg.xml). It might be further optimised probably by only converting the database triggers if needed or even restrict it to the actual needed triggers but it looked like too much trouble for little gain.
I can make a patch for this if there is any interest to have it added, just not sure against which repo to do it.
#4 Updated by Marian Edu 26 days ago
- File autoconvert.trunk.15266.patch
added
Attached a patch done against trunk rev#15266.
#5 Updated by Marian Edu 26 days ago
Basically if config-deps
is not set to true
in configuration everything works just like before albeit there are still the calls to Configuration.foundConversionDependency
but since there are no listeners this is a no-op. Things might be done better/cleaner but main point was to limit the code changes, sorry for the static methods added :(
#6 Updated by Marian Edu 7 days ago
- File autoconvert.trunk.15308.patch
added
Found one issue with internal procedures which aren't really external dependencies so attempting to convert those was making the process abend so just silently ignore that one, did make the patch again against latest revision of trunk #15308.