Skip to content

Spdx.Expressions 1.2.0

Latest

Choose a tag to compare

@DmitryGaravsky DmitryGaravsky released this 03 Dec 17:24
11fe9e2

Spdx.Expressions 1.2.0 lets applications parse an SPDX expression once and check it against different resource limits. The library targets .NET 10, has no runtime package dependencies and retains the embedded SPDX 3.29.0 catalogue.

Parser limits

  • SpdxExpressionParser.CheckLimits checks a successful parse in constant time. It returns null when the original expression fits the supplied limits.
  • SpdxDiagnostic.Limit identifies the exceeded budget, its inclusive limit, the observed value and whether the measurement is exact or a lower bound. The diagnostic retains the original source span.
  • The checks cover input length, identifier length, token count, syntax node count and parenthesis depth.

Rechecking a successful parse gives the same admission result as parsing the original text under those limits. If several limits are exceeded, the first diagnostic and its position can differ.

Install

dotnet add package Spdx.Expressions --version 1.2.0

NuGet package · Syntax and limits · Examples · Changes since 1.1.1

Build and test passed on Linux, Windows and macOS for the release commit.