metaonly module xdc.tools.check.Main

Command implementation

This tools scans the specified repositories looking for package incompatibilities. [ more ... ]
XDCscript usage meta-domain sourced in xdc/tools/check/Main.xdc
var Main = xdc.useModule('xdc.tools.check.Main');
module-wide constants & types
    var obj = new Main.Results// XML output format;
        obj.header// user specified header = String  ...
        obj.errors// array of all errors detected = String[]  ...
        obj.warnings// array of all warnings detected = String[]  ...
        obj.targets = Main.Target[]  ...
    var obj = new Main.Target// ;
        obj.name// target name = String  ...
        obj.keys = Main.__struct__1[]  ...
            obj.keys.key// target compatibility key used = String  ...
            obj.keys.packages// all packages using target with this key = String[]  ...
module-wide config parameters
    Main.usage// Usage message = String[] [
        '[-[ax]] [-v] [-t target] [-e exclude_pattern] [-H header] [repository ...]'
    ];
module-wide functions
    Main.exec// 'xs' script entry point(Any args) returns Any
    Main.main// 'xs' shell entry point(Any args) returns Any
per-instance config parameters
    var params = new Main.Params// Instance config-params object;
        params.arrFlag// Return an array of strings = Bool false;
        params.exclude// Exclude packages or targets from checks = String null;
        params.header// Prepend Header label to output = String null;
        params.target// Target to check = String null;
        params.verboseFlag// Print informative messages during execution = Bool false;
        params.xmlFlag// Return a Results struct as XML = Bool false;
per-instance functions
    inst.run// Underlying implementation(Cmdr.Instance cmdr, String[] args) returns Any
 
DETAILS
This tools scans the specified repositories looking for package incompatibilities.
By default, if a package appears in more than one repository, only the package in the first repository is added to the set of packages to check. This allows one to check the consistency of all packages that can be found along a specified package path by simply listing the package path repositories on the command line.
This tool performs the following checks:
  • the latest version of each target used by any package is compatible with all other versions used; and
  • the "built-with" versions of all packages are compatible with the versions of the packages contained in the specified repositories
If no repositories are specified, the repositories named in the current package path are checked.
struct Main.Results

XML output format

XDCscript usage meta-domain
var obj = new Main.Results;
 
    obj.header = String  ...
    // user specified header
    obj.errors = String[]  ...
    // array of all errors detected
    obj.warnings = String[]  ...
    // array of all warnings detected
    obj.targets = Main.Target[]  ...
DETAILS
This structure defines the "schema" for the XML output.
struct Main.Target
XDCscript usage meta-domain
var obj = new Main.Target;
 
    obj.name = String  ...
    // target name
    obj.keys = Main.__struct__1[]  ...
        obj.keys.key = String  ...
        // target compatibility key used
        obj.keys.packages = String[]  ...
        // all packages using target with this key
config Main.usage  // module-wide

Usage message

XDCscript usage meta-domain
Main.usage = String[] [
    '[-[ax]] [-v] [-t target] [-e exclude_pattern] [-H header] [repository ...]'
];
Main.exec()  // module-wide

'xs' script entry point

XDCscript usage meta-domain
Main.exec(Any args) returns Any
Main.main()  // module-wide

'xs' shell entry point

XDCscript usage meta-domain
Main.main(Any args) returns Any
Instance Config Parameters

XDCscript usage meta-domain
var params = new Main.Params;
// Instance config-params object
    params.arrFlag = Bool false;
    // Return an array of strings
    params.exclude = String null;
    // Exclude packages or targets from checks
    params.header = String null;
    // Prepend Header label to output
    params.multipleFlag = Bool false;
    // Allow checking multiple versions of the same package
    params.target = String null;
    // Target to check
    params.verboseFlag = Bool false;
    // Print informative messages during execution
    params.xmlFlag = Bool false;
    // Return a Results struct as XML
config Main.arrFlag  // instance

Return an array of strings

XDCscript usage meta-domain
var params = new Main.Params;
  ...
params.arrFlag = Bool false;
config Main.exclude  // instance

Exclude packages or targets from checks

XDCscript usage meta-domain
var params = new Main.Params;
  ...
params.exclude = String null;
DETAILS
Do not check compatibility of packages or targets whose names match the regular expression exclude.
config Main.header  // instance

Prepend Header label to output

XDCscript usage meta-domain
var params = new Main.Params;
  ...
params.header = String null;
config Main.multipleFlag  // instance

Allow checking multiple versions of the same package

XDCscript usage meta-domain
var params = new Main.Params;
  ...
params.multipleFlag = Bool false;
DETAILS
By default, when a package appears in more than repository named on the command line, this tool only checks the first occurance of the package. Setting this option forces all versions of all packages in the specified repositories to be included in the checks.
config Main.target  // instance

Target to check

XDCscript usage meta-domain
var params = new Main.Params;
  ...
params.target = String null;
DETAILS
During the compatibility checks this tool ensures that for all targets used by all packages are compatible with the latest target referenced by any package. If this option is set, the check tool will only validate compatibility for the specified target. In addition, if the target string contains a target compatibility key, all packages that reference the target will be checked for compatibility with the specified key.
The format of this string is either
      <target_name>:<target_key>
or
      <target_name>
where <target_name> is the full name of a target and <target_key> is an optional target-specific compatibility key. The optional target compatibility key can be used to validate the set of packages against a specific compiler tool chain.
config Main.verboseFlag  // instance

Print informative messages during execution

XDCscript usage meta-domain
var params = new Main.Params;
  ...
params.verboseFlag = Bool false;
config Main.xmlFlag  // instance

Return a Results struct as XML

XDCscript usage meta-domain
var params = new Main.Params;
  ...
params.xmlFlag = Bool false;
Main.run()  // instance

Underlying implementation

XDCscript usage meta-domain
inst.run(Cmdr.Instance cmdr, String[] args) returns Any
generated on Tue, 24 Aug 2010 15:39:22 GMT