Procedure params missing when importing APP into solution from APV


#1

I’m new to Clarion and working on a task moving an existing project into Git. Working in Clarion 10.

I have used Clarion’s internal tooling as well as Rick Martin’s famous UPVC tool to export APP files to text (via Application => Export Application To Text) and back again. However, upon re-importing the .APV files into Clarion, compilation breaks due to a myriad of errors. Tracing these errors led to the discovery that re-imported procedures were missing their parameter signatures.

The same symptoms occur when using the Upper Park tool via Upper Park VC => Save App to Version Control, as well as by right clicking on Solution Items in the Solution Explorer and selecting VC Getting Started => Test Export and re-Import APP Files.

Overall the question is, how can I modify my export/import process in order to preserve the solution state upon re-importing all APPs into Clarion?

Thanks!!

Edit: discovered this webinar http://clarionlive.wikispaces.com/ClarionLiveOpenWebinars including a note by John that he was writing a .TXA parser to solve this issue. If anyone knows anything about the parser, if it still exists (from back in 2016), or how it can be re-written (what lines need to be removed/changed in the .TXA files) then that would be a massive help. Cheers!


#2

Hi Steve

This is something I have had to deal with in the past, and so I created a tool in .net for my clients project in order to fix this (and other issues)

I have split the prototype fixer off into a GitHub repo https://github.com/msarson/ClarionPrototypeFixer and added a zip that contains the executable (not signed).

When you run the application it will ask you to select your solution file. This will give the application enough information to find your exported APV files, and will process each of the apv files and put them all into a new directory (ConvertedAPV) in your solution folder. Make sure you have a backup of the original APV’s, copy over the new ones, import and you are now fixed for good, no more errors!!! :slight_smile:

I hope this helps.

Mark

NOTE I have not tested the resulting application as I do not have any APV’s that are faulty any more, so please Backup first


#3

Steve,

Like @Mark_Sarson said, once the PARAMETERS entry is there in the APV file it should not disappear, unless you are doing something like using the Clarion10 IDE and the Clarion6 compiler/templates (C10v6).
If you open the properties of a problem procedures in the production APP and OK to save and then copy that over to your test environment does is that procedures “fixed”.
If you open the APV file do you see a PARAMETERS entry right after the PROTOTYPE entry?

Rick


#4

Hi Rick, thanks for the response.

Some of the PROTOTYPE entries do have accompanying PARAMETERS lines, but prohibitively many do not. We discovered the trick of opening Actions/Properties for affected Procedures and then save-and-exiting to resolve the issue, but in our production application we have hundreds (thousands?) of these Procedures, and we are hoping for a more efficient solution than manually opening hundreds of Procedures’ Properties and saving out to “de-corrupt” them.


#5

Hi Mark, thanks very much for the help and the parser!

We gave it a try in a controlled test environment with a known-problematic application, and the parser did not seem to have an observable effect. Here is the process we are using, started for each attempt with a clean copy of our dev environment for this project… is anything obviously out of place with our methodology?

  1. Grab a clean copy of the Foo project/solution folder
  2. Build Foo solution to ensure existing version can be built in a controlled environment
    a. No errors detected
  3. Save and close all open .APP instances in Clarion
  4. Verify configuration settings of UpperPark VC tool are correct/expected
  5. Use UpperPark VC’s test function (export and re-import all .APPs)
    a. Complete with no reported error
  6. Clean and build to validate Foo’s correctness after export/import test
    a. It builds with no errors
  7. Use UpperPark VC tool to export all .APP files to .APV, and confirm .APV files are generated in the expected location (mimicking actual dev workflow)
    a. Optional: use parser tool to head off missing-parameter issues
  8. Use UpperPark VC tool to re-import all .APP files to .APV (mimicking actual dev workflow)
    a. Tool reports operation complete with no errors
  9. Clean and build Foo solution to ensure re-imported version can be built without errors
    a. Build fails with cascade of errors, which are correctable via the trick of loading Props/Actions on “corrupted” procedures and saving out again (this occurs regardless of whether parser is used under 7a)
    b. Optional: use parser tool as attempt to correct error described in 9a
    c. Build still fails with errors

#6

Steve,
Can you confirm that the %Parameters symbol in the APV files has the correct parameter list? It appears a little lower in the file that the PROTOTYPE and PARAMETERS entries.
It is after the files are included and above the %ReturnValue entry.
If they are correct I can update the export to source control process to create the PARAMETERS entry.
I’m on vacation next week so it might be a little bit before I can get to it.


#7

Hi Rick, in the example I’m looking at right now, I’m not seeing any %ReturnValue entry, and the correct parameters are not found with the %Parameters symbol. We are in the process of attempting to use this toolset with a simpler example project, but so far based on the workflow described above in this thread, we are not having any luck.