Skip to content

Enhance VFP metrics CLI and introduce Core/RT BIF wrappers for accurate coverage tracking#1840

Merged
RobertvanderHulst merged 2 commits intodevfrom
enhancement/vfp-metrics-instrumentation
Mar 5, 2026
Merged

Enhance VFP metrics CLI and introduce Core/RT BIF wrappers for accurate coverage tracking#1840
RobertvanderHulst merged 2 commits intodevfrom
enhancement/vfp-metrics-instrumentation

Conversation

@Irwin1985
Copy link
Contributor

This PR finalizes the foundation for tracking and measuring the exact compatibility of the VFP within the X# runtime.

Key Changes

  1. Metrics CLI Improvements (vfpCompatMetrics):

    • Fixed universe offset calculations (proper handling of custom extensions vs canonical functions).
    • The CLI now explicitly reports the exact names of missing functions to seep up development.
  2. Core / RT Functions Wrappers:

    • Several VFP functions were already implemented but lived in XSharp.Core or XSharp.RT as they are shared among dialects.
    • Created wrappers files (e.g., LanguageCoreWrappers.prg, WorkAreaWrappers.prg) inside XSharp.VFP. These wrappers simply forward the call to the Core/RT implementations.
    • Architecture benefit: This allow us to decorate these specific paths with [FoxProFunction] for our metrics without polluting the base Runtime with VFP-specific attributes, ensuring dialets separation.

Impact

This gives us a concrete baseline of the Structural Coverage and True Compatibility Score to objetively measure our progress.

@RobertvanderHulst
Copy link
Member

RobertvanderHulst commented Mar 5, 2026

For the functions that you added. Did you check to see if the xml documentation links are indeed working?
One disadvantage of these duplicate functions is that they will also appear twice in the help file.

@RobertvanderHulst RobertvanderHulst merged commit a44f32b into dev Mar 5, 2026
1 check passed
@RobertvanderHulst
Copy link
Member

RobertvanderHulst commented Mar 5, 2026

I found the docs in the file VfpNotUsedFunctions.xml. I will merge this and see what the result is when generating the documentation.
I see that there are now 2 enties in the TOC. For example
Floor Function (RT)
Floor Function (VFP)
The function from VFP has this prototype:

[FoxProFunctionAttribute("FLOOR", FoxFunctionCategory.MathAndNumeric, FoxEngine.LanguageCore, 
	FoxFunctionStatus.Full, FoxCriticality.Medium, "", "", "")]
 FUNCTION Floor(
	nNum REF USUAL
) AS USUAL

Maybe we should exclude these new functions when generating the documentation? You can do that by surrounding them with #ifndef DOC .. #endif

@Irwin1985
Copy link
Contributor Author

For the functions that you added. Did you check to see if the xml documentation links are indeed working? One disadvantage of these duplicate functions is that they will also appear twice in the help file.

Oh that's true. I didn't check that.

@RobertvanderHulst RobertvanderHulst deleted the enhancement/vfp-metrics-instrumentation branch March 6, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants