Skip to content

Loading modules with static checking

rjrudin edited this page Jan 6, 2017 · 7 revisions

As of version 2.5.0, you can load modules - via any task, such as mlDeploy, mlLoadModules, and (most typically) mlWatch - with static checking of asset modules enabled. The REST API will automatically statically check a REST API service, transform, or options file, but it won't do so for asset modules - i.e. those loaded via /v1/ext and stored under /ext.

To enable this, just include the following command line property flag:

gradle mlWatch -PmlStaticCheckAssets=true

Then, when mlWatch tries to load an asset module that has a compilation error in it, the error (with line number) will be written both to stdout where mlWatch is running and to the MarkLogic ErrorLog.txt file (it's currently logged via xdmp:log; please file an issue if you'd prefer that xdmp:trace be used). This helps you know immediately when you have an issue, as opposed to finding out later when e.g. manually testing or running an automated test.

Clone this wiki locally