1.5.20. Migration to 7.10.0

1.5.20.1. AxivionC#Frontend

A number of improvements have been made to how AxivionC#Frontend communicates with MSBuild:

  • MSBuild is now invoked directly and only once per configured solution and project. This leads to faster build times, especially for solutions consisting of many projects.

  • Environment variables passed to axivion_ci are directly inherited by the MSBuild process. Specifically, the following variables are no longer treated specially:

    • The PLATFORM environment variable is no longer overwritten, which avoids potential build errors when axivion_ci is executed from an environment created using vcvarsall.bat.

    • AxivionC#Frontend no longer emulates Visual Studio Design Time builds; therefore, the BuildingInsideVisualStudio variable is no longer set to true.

    • The UseSharedCompilation MSBuild property is no longer set to false, allowing the build to use the “Compiler Server infrastructure”.

    • The MSBuildSdksPath MSBuild property is no longer overwritten.

  • AxivionC#Frontend can now use multiple cores for both the initial build and analyses. Parallelization for the initial build phase must be explicitly enabled using the build_in_parallel setting.

  • Note: If the binarylog setting was previously configured for an analysis containing multiple projects, the binlog for each project was recorded as a separate file in a subdirectory. Now, the binarylog setting refers to a single log file, even for solutions. If the directory still exists from a previous build, AxivionC#Frontend will print a warning message and store the binarylog in a temporary location instead. It will never delete a directory. This can be resolved by manually deleting the old binarylog directory or by changing the binarylog name.

1.5.20.2. Dead Code detection for C#

DeadCodeDetection now reports two cases of unused code that were previously assumed to be used:

  • Unused code entities with custom attributes are now reported as dead. Previously, the presence of a custom attribute made the code entity unconditionally alive. If you use custom attributes to mark a code entity as an external entry point that should be considered alive – even if there are no uses in C# code – these entry points can be configured using the EntryPoints-EntriesByAttribute rule.

  • Code entities with no implementation (such as extern, partial, or abstract methods) are now reported as unused if there is no caller in the C# code.

1.5.20.3. Metrics

Metric-Coupling and Metric-InverseCoupling

The option coupling_edge_name was renamed to coupling_hierarchy_edge_name to better reflect its purpose. Existing JSON configuration files using this option are migrated on the fly during loading.

1.5.20.4. Dashboard

Renaming of the old “upload” mode

The boolean option /Results/Dashboard/upload was renamed to /Results/Dashboard/database_mode with enumerators shared_database (old upload=false) and managed_upload (old upload=true). This option is automatically migrated in JSON, unless an environment variable reference is used. If you used an environment variable reference in JSON or are using this option in a Python layer, you must adjust your configuration manually.

Initial Configuration Templates

Template names for the dashboard init <template> subcommand have been updated. Specifying a template is now mandatory. You can find more information in the full list of initial configuration options.

Encryption of Configuration Database

Encryption of sensitive values stored in dashboard2.db was introduced in version 7.8.3. Until now, only one easily recoverable field was encrypted. In this version, the use of encryption for sensitive fields has been significantly extended as a protective measure. Please be aware – as previously mentioned in the 7.8.3 Migration Guide – that dashboard2.db and the associated secrets.json file must always be used as a pair; losing the secrets.json file associated with a specific dashboard2.db is now much harder to recover from.

API Tokens

Caution

All authentication tokens will now be deleted when the user password is changed.

Previously, tokens of the types General, SourceFetch, and ContinuousIntegration were not affected by password changes. For more information about available API token types, see ApiTokenTypes. If you require a permanent token, we recommend creating a passwordless user as described in axivion_ci Authentication.

Issue Annotations

Issue annotations (Comments/Tags) now use the correct display name of OAuth2/OpenID Connect users. This change requires a migration of the .dbx project database. During migration, a database backup file with the .bak extension will be created. Depending on whether the project/database is managed or unmanaged and your automatic cleanup settings, the backup may receive a .<timestamp>.trash extension and could be deleted after five days. We recommend disabling the two Delete *.trash file ... options on the general settings page until users are confident that the update did not create any problems. Downgrading the dashboard to a previous version after a successful migration will lead to unexpected errors on the Issue and Issue List pages. Therefore, use the .bak file if you need to downgrade the dashboard.

OIDC Configuration

The configuration interface for OIDC providers has moved from General Settings to its own page, reachable via the settings menu. In addition to the new location, the new interface allows multiple providers to be configured simultaneously.

OIDC Logout / End Session Configuration

When clicking the logout button in the navigation bar, the Axivion Dashboard Server also attempts to end the session at the OIDC Provider. Once finished, the OP will redirect back to the Axivion Dashboard Server base URL. Since all redirect URIs must be registered with the OP beforehand, please add the Axivion Dashboard Server base URL to the list of allowed post logout redirect URIs. If your OIDC Provider does not have a separate section for post logout redirect URIs, please use the default Redirect URIs section.

1.5.20.5. IR

Several IR classes have been removed, and in some places, the inheritance hierarchy has been slightly simplified.

If you have custom stylecheck rules using any of the following classes, you will need to adjust your code:

Mapping of old PIR class names to new PIR class names

Old name

New name

Ordinary_Class_Scoped_Based_Enum_Type_Definition

Class_Scoped_Based_Enum_Type_Definition

Ordinary_Class_Scoped_Unbased_Enum_Type_Definition

Class_Scoped_Unbased_Enum_Type_Definition

Ordinary_Unnamed_Based_Enum_Type_Definition

Unnamed_Based_Enum_Type_Definition

Ordinary_Unscoped_Based_Enum_Type_Definition

Unscoped_Based_Enum_Type_Definition

Ordinary_Unnamed_Unbased_Enum_Type_Definition

Unnamed_Unbased_Enum_Type_Definition

Ordinary_Unscoped_Unbased_Enum_Type_Definition

Unscoped_Unbased_Enum_Type_Definition

Using_Typename_Class_Member_Declaration

Using_Class_Member_Declaration

General_Using_Namespace_Member_Declaration

Using_Namespace_Member_Declaration

Using_Typename_Namespace_Member_Declaration

Using_Namespace_Member_Declaration

Literal_Operator_Function_Definition

Operator_Function_Definition

Literal_Operator_Function_Declaration

Operator_Function_Declaration

Normal_Operator_Function_Definition

Operator_Function_Definition

Normal_Operator_Function_Declaration

Operator_Function_Declaration

Standard_Command_Line_Function_Macro_Definition

Command_Line_Function_Macro_Definition

Standard_Source_Function_Macro_Definition

Source_Function_Macro_Definition

General_Catch_One_Block

Catch_One_Block

Asm_Definition

Asm_Statement

Mapping of old LIR class names to new LIR class names

Old name

New name

CFG_Generated_Catch_All_Block

CFG_Catch_All_Block

CFG_Explicit_Catch_All_Block

CFG_Catch_All_Block

Const_Cast_Instruction

Qualifier_Conversion_Instruction

C_Cast_Instruction

Conversion_Instruction

Implicit_C_Cast_Instruction

Conversion_Instruction

Explicit_C_Cast_Instruction

Conversion_Instruction

Static_Cast_Instruction

Conversion_Instruction

Additional classes were deleted without replacement. These classes never appear in any C/C++ IR, so it is unlikely they were used in any custom rules.

In the type ir.Logical.Composite_Type, the field Finalizer was renamed to Destructor.

1.5.20.6. Stylechecks

Frameworks-QtSupport

The default value of the exclude_qt_generated_files option has changed from false to true. Consequently, if Frameworks-QtSupport is activated, files generated by Qt and files in the configured Qt directory are implicitly added to the global_excludes.

This may result in the removal of issues in your existing projects.

This change affects existing configurations that do not explicitly set this option and may cause existing issues to be removed when upgrading to version 7.10.0 or later. If you wish to track issues in files generated by Qt or in the Qt directory, you can reinstate the previous behavior by setting the option /Analysis/AnalysisControl/Environment/Frameworks/Frameworks-QtSupport/exclude_qt_generated_files to false in your configuration.