LogoPluginCraft.dev

Command Parser Issues

Invalid Regular Expression

Error Message:

Some of the command parser regexes are not valid.

Description:

One of the regular expressions in the command parser settings has invalid syntax.

Solution:

  1. Open Settings -> Build, Execution, Deployment -> Jam -> Build Command Parser.
  2. Review the regular expressions: Use an online tool to edit them, like https://regex101.com/.

Invalid build command format

Error Message:

The build command format string reads regex group values from the build command regex. The configured format regex is not valid.

Description:

The build command format is a template for build commands. It inserts regex match groups from the build command regex.

The syntax is simple: Occurrences of {n} are replaced with the nth regex match group from the build command regex. The match group id, n, has to index a valid match group.

This error usually occurs when the match group id is too high and there is no such match group.

Solution:

  1. Open Settings -> Build, Execution, Deployment -> Jam -> Build Command Parser.
  2. Use a tool (like https://regex101.com/) to visualize the match group of the build command regex and use the appropriate group ids in the build command format.

Examples:

This will turn 'call g++ main.cpp' into 'g++ main.cpp'
build command regex: call (.*)
build command format: {1}
This will turn 'clang main.cpp' into 'gcc main.cpp'
build command regex: (clang) (.*)
build command format: gcc {2}

Command parser not configured properly

Error Message:

The command parser is not configured properly. Click on the invalid build commands in the "Workspace" Jam console tab to open them in the parser settings editor.

Description:

This message can appear for many reasons related to the configuration of the command parser. Further details will be available in the command parser editor after importing the build command for the affected source file: Settings -> Build, Execution, Deployment -> Jam -> Build Command Parser.

Solution:

This message will be accompanied by error messages in the Jam Output Console -> Workspace. These error messages contain build commands as clickable links.

Click on any of these commands to jump to the settings or copy them manually to the Try It Out section of the build command parser settings.

Check the error at the bottom.

Screenshot of an invalid build command in the Jam Output Console
Preview
If a build command is not parsed successfully, it will appear as a clickable link in the Workspace tab in the Jam Output Console. Click on the link to open the build command in the command parser editor.

Resolve configuration could not be generated

Error Message:

Could not generate the resolve configuration for a file: ...

Description:

This error occurs when a build command was parsed and accepted by the command parser, but it was not possible to interpret it as a build command.

A probable cause is that the parser accepted a command that looks like a build command, but it's not.

For example:
echo main.cpp
python source.cpp -o preprocessed.gen.cpp

Solution:

Commands that look like build commands, but are not, need to be filtered out by the command parser.

Open: Settings -> Build, Execution, Deployment -> Jam -> Build Command Parser.

There are 3 filtering options:
Enable Filter commands that use known compilers.
Define an include line regex: potential build commands that don't match this will be ignored.
Define an exclude line regex: potential build commands that match this will be ignored.

Notes:

  • The build command regex is not used for filtering. It's there to properly format the build command if necessary.
  • The option Filter commands that use known compilers accepts the compilers specified in the toolchain.