Skip to content

fix: support PEP 735 arrays without raising runtime requirements - #208

Merged
chrapkowski-sg merged 5 commits into
sourcegraph:scipfrom
TALLEC-Scott:fix/pep735-toml-parsing
Nov 2, 2026
Merged

chrapkowski-sg merged 5 commits into
sourcegraph:scipfrom
TALLEC-Scott:fix/pep735-toml-parsing

Conversation

@TALLEC-Scott

@TALLEC-Scott TALLEC-Scott commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #207.

@iarna/toml 2.2.5 rejects heterogeneous arrays used by PEP 735 dependency groups, for example:

[dependency-groups]
dev = [{include-group = "test"}, "ml_stack_document_extraction"]

Upgrade the existing parser to 3.0.0 in both packages and update both lockfiles. Version 3 supports these mixed arrays while preserving large integer parsing and the existing runtime/compiler requirements.

This replaces the initially proposed smol-toml migration: that dependency raises runtime requirements and requires additional compiler compatibility work. No Node support or TypeScript version change is included here.

Version 3 rejects CRLF inside comments, so normalize CRLF to LF at all three TOML parse boundaries. Do not strip lone CR characters. This is a targeted PEP 735 compatibility repair, not a claim of complete current TOML conformance.

Verification

  • Mixed arrays and a valid signed 64-bit integer in an unrelated tool section no longer prevent metadata or configuration loading.
  • Real indexing checks LF/CRLF, full-line/inline comments, project metadata, [tool.scip] precedence over [tool.pyright], and imported helper references.
  • Production/development builds, all 21 SCIP snapshots, all 7 SCIP Jest tests, and formatting passed locally on Linux with Node 24.4.1 and Python 3.10.22.
  • Internal TypeScript 4.4.4 build and all 16 upstream configuration tests passed. Both package locks remain stable after regeneration.
  • Actual Node 12.0.0 and 16.0.0 parser probes passed; actual Node 16 CLI indexing verified CRLF comments, metadata/configuration and helper references.
  • Native Windows/macOS execution and the entire upstream Pyright test suite were not run.

@chrapkowski-sg chrapkowski-sg changed the title fix: replace @iarna/toml with smol-toml for TOML 1.0 and PEP 735 support fix: support PEP 735 arrays without raising runtime requirements Nov 2, 2026
@chrapkowski-sg
chrapkowski-sg merged commit 6306404 into sourcegraph:scip Nov 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix parsing error for mixing inline tables with strings in the same array in pyproject.toml

2 participants