LabAPI icon indicating copy to clipboard operation
LabAPI copied to clipboard

[BUG]: CompiledVersion const is not a const

Open Axwabo opened this issue 1 year ago • 1 comments

Before You Report

  • [x] I have searched for existing reports of this bug, and this bug report is unique.

Version

1.1.2

Description

The CompiledVersion field in LabApiProperties used to be a const, even the XML docs say so. At some point it's been changed to a readonly field, defeating the entire purpose of the constant being accessible at compile-time, effectively breaking its intended functionality.

To Reproduce

Access LabApiProperties.CompiledVersion in a library that compiled with a different version of LabAPI than the one that's loaded at runtime.

Expected Behavior

CompiledVersion maps to the version string of the currently referenced LabAPI at compile time.

Additional Information

Example:

  • MyPlugin compiles with LabAPI 2.0.0
  • A server is on LabAPI 1.2.3
  • MyPlugin creates the required version based on the CurrentVersion field, leading to it requiring 1.2.3 instead of the correct 2.0.0

Most plugins only use this member for specifying the required LabAPI version, which is not yet taken into account when loading plugins, so this might be a non-issue until then.

Axwabo avatar Sep 15 '25 20:09 Axwabo

We've reopened this suggestion to prevent confusion and duplicate posts. The bug has been added to our internal tracker, and will be fixed in a future update.

Axwabo avatar Apr 28 '26 07:04 Axwabo