Feature #6203
create cvtpath and move conversion database into that directory
100%
Related issues
History
#1 Updated by Greg Shah about 2 years ago
- Related to Feature #6202: allow .df files to exist in a path that is not directly in data/ added
#2 Updated by Greg Shah about 2 years ago
- Related to Feature #5586: move all conversion artifacts/outputs into the cvtdb or into a dedicated directory sub-tree that is separate from the original 4GL code/schema inputs added
#3 Updated by Greg Shah about 2 years ago
As noted in #6202 and #5586, we are going to be moving all intermediate conversion artifacts into a configurable directory.
- The path specified in@ cfg/p2j.cfg.xml@ for the (new) global parameter
cvtpath
. - By default (no configuration needed),
cvtpath
will be set tocvt/
.
Please add this new feature. The first thing to move into that location is the conversion database. Place it directory in cvtpath
and we will no longer use cvtdb/
.
I understand that some project configuration will need to be modified as well.
#5 Updated by Greg Shah about 2 years ago
Constantin: When do you think you can have this ready?
#6 Updated by Constantin Asofiei about 2 years ago
- % Done changed from 0 to 100
- Status changed from New to Review
Added to 3821c/13732.
#7 Updated by Greg Shah about 2 years ago
Greg wrote:
When do you think you can have this ready?
Constantin wrote (2 hours later):
Added to 3821c/13732.
Translation: "Now". :)
#8 Updated by Greg Shah about 2 years ago
Code Review Task Branch 3821c Revision 13732
Nice!
1. Configuration.getConversionFolder()
should have the exists()
, mkdirs()
and !isDirectory()
logic outside of the !isAbsolute()
test so that it can be common code. The current approach won't do any of that logic for the absolute path case.
2. The processing in Configuration.getConversionFolder()
is expensive since it hits the file system. I expect that many places in the code will access this in the near future. Let's do this only one time and cache off the result.
3. What are the changes needed to the project build.xml
to accept this change? I think the clean
target needs a little tweak in all projects now.
#9 Updated by Constantin Asofiei about 2 years ago
Greg Shah wrote:
Code Review Task Branch 3821c Revision 13732
Nice!
1.
Configuration.getConversionFolder()
should have theexists()
,mkdirs()
and!isDirectory()
logic outside of the!isAbsolute()
test so that it can be common code. The current approach won't do any of that logic for the absolute path case.2. The processing in
Configuration.getConversionFolder()
is expensive since it hits the file system. I expect that many places in the code will access this in the near future. Let's do this only one time and cache off the result.
These two are fixed in 3821c/13733.
3. What are the changes needed to the project
build.xml
to accept this change? I think theclean
target needs a little tweak in all projects now.
Yes, the clean target in build.xml needs to change 'cvtdb' to 'cvt' (or what the cvtpath is set to). There is no other dependency in the build file.
When this is pushed to xfer, we need to notify the customers that this path has changed, and they need to update any custom scripts accordingly.
#10 Updated by Greg Shah about 2 years ago
I'd like to push this to xfer. Please make the build.xml
changes in the active customer projects so that everything is consistent.
#11 Updated by Constantin Asofiei about 2 years ago
Greg Shah wrote:
I'd like to push this to xfer. Please make the
build.xml
changes in the active customer projects so that everything is consistent.
I've modified all active customer projects.
If the update is applied to an already converted project, the cvtdb/
folder needs to be removed manually.
#12 Updated by Greg Shah about 2 years ago
- Status changed from Review to Closed
#13 Updated by Roger Borrello about 2 years ago
I'm not sure if this was an intended change, but with the 13732 revision, generated filenames are no longer Camel-Cased. Yes, the ui files do have the frame name capitalized, but the main filenames are all lower-cased.
#14 Updated by Ovidiu Maxiniuc about 2 years ago
This is odd, at least. Does it happens for a single project? It does not happen for me. It is a configuration issue, I guess.
#15 Updated by Roger Borrello about 2 years ago
Ovidiu Maxiniuc wrote:
This is odd, at least. Does it happens for a single project? It does not happen for me. It is a configuration issue, I guess.
It could be a configuration item that isn't defaulting properly, if not configured. This is my testcases
project. I can switch between 3821c_13731-good
and 3821c_13732-bad
to recreate it, without any configuration changes.
Some of my config:
<global> <!-- conversion tools "internal" values --> <parameter name="P2J_RULES" value="${P2J_HOME}/p2j/rules" /> <parameter name="patpath" value=".:${P2J_HOME}/pattern:${P2J_RULES}/include:${P2J_RULES}:" /> <parameter name="registry" value="./cfg/registry.xml" /> <parameter name="rootlist" value="./cfg/rootlist.xml" /> <parameter name="matchlist" value="./cfg/matchlist.xml" /> <parameter name="oo-skeleton-path" value="./uast/skeleton/" /> <!-- values from the original system on which Progress 4GL ran --> <parameter name="propath" value=".:./uast:${P2J_HOME}/uast/possenet:${P2J_HOME}/uast/possenet/src:${P2J_HOME}/uast/possenet/src/wrappers" /> <parameter name="basepath" value="./uast" /> <parameter name="include-spec" value="*.[fhiv]" /> <!-- <parameter name="unix-escapes" value="true" /> --> <!-- <parameter name="path-separator" value=":" /> --> <!-- <parameter name="file-separator" value="/" /> --> <!-- <parameter name="case-sensitive" value="true" /> --> <!-- conversion output --> <parameter name="output-root" value="${P2J_HOME}/src" /> <parameter name="pkgroot" value="com.goldencode.testcases" /> <parameter name="merge-point" value="/server/default/runtime/default/" /> <parameter name="comments" value="true" /> <parameter name="foreign-keys" value="false" /> <parameter name="compact" value="true" /> <!-- <parameter name="opsys" value="UNIX" /> --> <parameter name="opsys" value="WIN32" /> <parameter name="winsys" value="MS-WINDOWS" /> <!-- flag indicating if code for ADM embedded windows will be generated --> <!-- <parameter name="add-embedded-windows" value="true" /> --> </global>
appname=testcases app.4gl.pattern=*.[pPwW]|*.[cC][lL][sS] db.names=p2j_test db.h2=true db.postgresql=false #db.names=menu #db.h2=false #db.postgresql=true #db.host=localhost #db.port=5432 sql.user=fwd_user sql.user.pass=user sql.admin=fwd_admin sql.admin.pass=admin pkgroot=com/goldencode/testcases adm.version=ADM2.2
<!-- set global properties for this build --> <property name="build.home" value="${basedir}/build" /> <property name="dist.home" value="${basedir}/distribution" /> <property name="data.home" value="${basedir}/data" /> <property name="src.home" value="${basedir}/src" /> <property name="srcnew.home" value="${basedir}/srcnew" /> <property name="lib.home" value="${basedir}/lib" /> <property name="cfg.home" value="${basedir}/cfg" /> <property name="manifest.dir" value="${basedir}/manifest" /> <property name="p2j.home" value="." /> <property name="p2j.build.home" value="${p2j.home}/p2j/build" /> <property name="p2jlib.home" value="${p2j.home}/p2j/build/lib" /> <property name="p2jsrc.home" value="${p2j.home}/p2j/src" /> <property name="appname" value="testcases" /> <property name="pkgroot" value="com/goldencode/${appname}" /> <property name="app.4gl.src" value="./uast/" /> <property name="app.4gl.pattern" value="*.[pPwW]|*.[cC][lL][sS]" /> <property name="destination.package" value="${build.home}/classes/${pkgroot}"/> <property name="deploy.home" value="${basedir}/deploy" /> <property name="deploy.home.abs" location="${deploy.home}" /> <property name="rpt.home" value="${basedir}/rpt" /> <property name="cg.home" value="${basedir}/callgraph" /> <property name="app.db.profile" value="default" /> <!-- enable database type(s) --> <property name="db.h2" value="true" /> <property name="db.postgresql" value="false" /> <!-- sql global properties --> <property name="db.home" value="${deploy.home}/db" /> <property name="db.host" value="localhost" /> <property name="db.port" value="5433" /> <property name="sql.user" value="fwd_user" /> <property name="sql.admin" value="fwd_admin" /> <property name="sql.user.pass" value="user" /> <property name="sql.admin.pass" value="admin" /> <condition property="isWindows"> <os family="windows" /> </condition> <condition property="isUnix"> <os family="unix" /> </condition> <condition property="escaped.quotes" value=""""" else="""> <isset property="isWindows" /> </condition>
#16 Updated by Constantin Asofiei about 2 years ago
Roger, please upload to devsrv01 your entire testcases project where you do the conversion (without the p2j/ folder). I don't see what you are reporting.
#17 Updated by Roger Borrello about 2 years ago
- File camelcase.zip added
Constantin Asofiei wrote:
Roger, please upload to devsrv01 your entire testcases project where you do the conversion (without the p2j/ folder). I don't see what you are reporting.
With the attached, and using 3821c_13731
I can run ant clean convert.list
over-and-over, and the results are good. The files are camel-cased. If I used the same, but post 13731, every time after the first conversion (which is camel-cased) it is all lowercase.
I hope I am not wasting time with an edge case, but if there's an artifact that's not being cleaned properly, we'd need to make sure to fix existing projects.
#18 Updated by Constantin Asofiei about 2 years ago
- run
ant convert.list
with 3821c - name isMultiLine1
. - run
ant clean.all
- run
ant convert.list
again - name ismultiline1
. - run
ant clean.all
and also remove by hand thecvt/
folder - run
ant convert.list
again - name isMultiLine1
.
Somehow having the cvt/
folder after the cleanup messes up the conversion. For now, make sure everything is cleaned up properly.
#19 Updated by Roger Borrello about 2 years ago
Constantin Asofiei wrote:
Thanks, I can duplicate it:
- run
ant convert.list
with 3821c - name isMultiLine1
.- run
ant clean.all
- run
ant convert.list
again - name ismultiline1
.- run
ant clean.all
and also remove by hand thecvt/
folder- run
ant convert.list
again - name isMultiLine1
.Somehow having the
cvt/
folder after the cleanup messes up the conversion. For now, make sure everything is cleaned up properly.
Make sense to add to the clean
. Thanks for tolerating me! :)