github owenlamont/ryl v0.28.0

4 hours ago

Added

  • The top-level TOML setting target-version = "1.1" | "1.2" names the oldest YAML
    version whose readers must load ryl format and --fix output to the same values.
    The default "1.1" keeps today's behaviour; "1.2" drops the quotes only a YAML 1.1
    reader needs ('no', '1_000') and makes truthy flag only the 1.2 booleans.
    (#576)
  • The ryl-only yaml-directive rule requires a %YAML directive on every document.
    Its safe fix stamps %YAML 1.2 under target-version = "1.2"; go-yaml and
    Kubernetes reject such files, so the rule page warns against enabling it for them.
    Naming it beside document-start with present = false is a config error; when only
    ALL enables it, the explicit present = false wins, and ryl warns and skips it.
    (#576)
  • The ryl-only schema-dependent-values rule flags plain scalars that YAML 1.1 and 1.2
    read differently: timestamps, sexagesimal numbers, underscored, 0b and signed 0x
    numbers, 08-style leading zeros, and y/n. It reports only in documents with no
    %YAML directive under target-version = "1.1".
    (#600)
  • The README and installation docs list Homebrew (brew install ryl) and the
    community-maintained Scoop bucket.
    (#895)

Changed

  • octal-values flags a signed implicit octal such as -0777, which YAML 1.1 reads
    as -511 and YAML 1.2 as -777; yamllint skips it.
  • A document that declares %YAML 1.2 now drops the quotes only a YAML 1.1 reader
    needs, under quoted-strings and ryl format, whatever target-version says.
    (#576)
  • ryl check and ryl format --check/--diff write each file's results in input
    order as the run goes, so peak memory no longer grows with the file count. At
    20,000 files, check --enable ALL peaks at 44 MiB (was 202 MiB), GitLab output at
    42 MiB (was 966 MiB) and format --check at 33 MiB (was 94 MiB). JUnit output still
    holds its body until the end, now at 286 MiB (was 448 MiB). A run that aborts on an
    error now leaves the output of the files before it, and with YAMLLINT_FILE_ENCODING
    set, each file's warning now precedes its diagnostics.
    (#830)
  • On Windows and macOS, ryl uses mimalloc as its allocator, making check and
    format 3-27% faster beyond a single small file, for up to twice the peak memory.
    Linux keeps the system allocator. (#886)
  • A directory walk skips .git, .hg, .svn and .jj directories; ruff skips .git,
    .hg and .svn, and yamllint lints YAML inside all four. A VCS directory or file
    named as an input is still linted. Walking reads each entry's type without a stat,
    so check on a 31,000-file Kubernetes clone takes 1.10 s (was 1.30 s), or 1.17 s
    (was 1.21 s) without .git.
    (#888)
  • Release binaries and wheels ship with symbols stripped, as ruff's do, cutting the
    x86_64 Linux binary from 9.9 MB to 8.7 MB.
    (#887)
  • The result cache hashes with BLAKE3 and stores entries in a binary format, making a
    warm check 3-15% faster. Caches written by older versions are ignored.
    (#889)
  • empty-values no longer slows quadratically on large files with many violations:
    check --enable ALL on a 9.4 MiB file takes 0.87 s (was 5.7 s).
    (#890)
  • check no longer slows quadratically on a long line holding many flow-collection
    entries: check --enable ALL on a 0.5 MiB one-line flow sequence takes 0.23 s (was
    50 s). format --markdown no longer re-parses the whole document for every rewritten
    YAML fence: 4 MiB of fences formats in 0.74 s (was 33 s).
    (#897)
  • check reads flow punctuation and indentation from the parser's tokens instead of
    rescanning the text or copying the tokens, making it 18-23% faster with 23-30% lower
    peak memory on 2-10 MiB files; format is 7-8% faster.
    (#872)
  • The token tape stores 16 bytes per token instead of 36, cutting peak memory by 6-15%
    on 2-10 MiB files at the same speed.
    (#899)

Fixed

  • quoted-strings and ryl format keep the quotes on spellings go-yaml reads as
    floats: '08', '1e5' and '-.5' under %YAML 1.1, and '0_8' and '1_0e5'
    under any version but 1.2.
    (#576)
  • braces, brackets and format no longer read a # inside a verbatim tag such as
    !<tag:foo#bar> as a comment, so spaces before the closing ] or } are now
    flagged and removed. (#898)

Don't miss a new ryl release

NewReleases is sending notifications on new releases.