Check - Compile + Analyze
Check is the button that runs one modernization round. The text below the button describes what it does: compile + analyze. When you press it, DFRefactor compiles the program you selected, reads the compiler's warnings and errors, and turns them into one list of findings, sorted by how serious they are.
The button is disabled until everything it needs is set, and the text below it says what is missing: pick a program first, or choose a compiler first.
Choose the target compiler first
- Target DataFlex version — this dashboard tile opens the Target DataFlex Version (Compiler Settings) dialog. Press Select, select the compiler's program file, and then press Save.
- Why it matters — the compiler you select decides the version you are modernizing to. Its warnings, and therefore the functions that this workspace needs, come from that DataFlex installation, not from the version the code was written for. If you start a compile without selecting a compiler, the dialog is opened immediately (No compiler selected).
- Build Options: is filled in automatically when you press Select, because DataFlex 26's df-cli and the older console compiler use different options. x86 suffix: / x64 suffix: are used only when a program's .cfg file does not specify an output suffix.
- If you select DFComp.exe, the console compiler in the same folder is saved instead (Compiler adjusted). DFComp returns before the compile has finished, so its output would describe an unfinished compile.
What one Check does
- Compiles the program selected in the dashboard's Select Program step. If no program is selected, the workspace's first program is used.
- Reads the compiler's warnings and errors, adds the results of a scan of your selected source folders, and sorts everything into one list of findings.
- Increases the Cycle counter beside the button, so the numbers next to it are updated with every Check. See Modernization Progress.
The compiler's warnings are needed to find the work to do. If a program's .cfg file has turned warnings off, DFRefactor turns them on for its own compile and restores the setting afterwards.
Where the results are shown
The results are shown on three tabs at the bottom of the window. Each tab is described in its own topic:
- Compiler Output — the compiler's complete output, unchanged.
- Analyzer — the messages that DFRefactor can fix, and the Run Plan button that fixes them.
- Manual Changes — the changes that a refactoring function did not make, and why.
The dashboard's list of findings is built from the Analyzer's rows, so a normal round can be done without opening any of these tabs.
The same two steps, without the dashboard
The compile bar has two separate buttons, Compile and Analyze, for when you want to run the two steps separately:
- Show or hide the bar with the Show Compile pane toolbar button, or press Ctrl+M in the editor view. In the editor view, F5 saves the current file and starts the same compile.
- While a compile is running, the button changes to Stop Compile, which stops the compiler and discards the incomplete output.
- A compiler that is older than the workspace's DataFlex version is not started.
- The .err and .prn files are saved beside the program's source file, and the executable in the workspace's Programs folder. The bar shows the result, for example Success: <program> compiled cleanly.
Repeat the Check
Fixing some warnings reveals new ones, so press Check again after each run and see the counts go down. Some messages only appear after earlier ones have been fixed, which is why a workspace needs several rounds rather than one. The work is finished when a Check finds nothing more that can be fixed.