Skip to content

Fix Julia 1.6 CI: replace 1.7-only string line continuation in tests - #1

Merged
theluckystrike merged 1 commit into
mainfrom
ci-fix/julia16-string-continuation
Oct 25, 2026
Merged

theluckystrike merged 1 commit into
mainfrom
ci-fix/julia16-string-continuation

Conversation

@theluckystrike

Copy link
Copy Markdown
Member

Failing job

CI / Julia 1.6 - ubuntu-latest on main (run 31286776590). The 1 and nightly jobs pass.

Root cause

ERROR: LoadError: syntax: invalid escape sequence
in expression starting at .../test/runtests.jl:7

test/runtests.jl builds three long strings with a backslash-newline line continuation inside the string literal. That syntax arrived in Julia 1.7. Project.toml declares julia = "1.6", and the matrix tests 1.6, so the 1.6 job cannot parse the test file.

Fix

Build the same strings with * concatenation, which every supported Julia version parses. No test, assertion or source code changes. The compat bound stays at 1.6.

Verification

  • Parsed the old and new test files and evaluated the CONTRACT and APIDOC definitions: the strings are byte-identical (the hard string follows the same pattern).
  • Pkg.test() locally on Julia 1.13: 49/49 pass.
  • This PR's CI runs the full 1.6 / 1 / nightly matrix.

Backslash-newline inside a string literal is Julia 1.7+ syntax, so the
Julia 1.6 job failed to parse test/runtests.jl. Build the long strings
with * instead; the resulting strings are byte-identical.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@theluckystrike
theluckystrike merged commit 5f20d77 into main Oct 25, 2026
3 checks passed
@theluckystrike
theluckystrike deleted the ci-fix/julia16-string-continuation branch October 25, 2026 12:01
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.

1 participant