Windows: annotated-qmd "Substring over Concat" test reads the source two characters early
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript, yaml
- Domain
- documentation, testing
Research direction
The failing assertion is in ts-packages/annotated-qmd/test/content-provenance.test.ts around line 138, reading raw source from fixtures/yaml-block-scalar.qmd using byte offsets from fixtures/yaml-block-scalar.json. First check git ls-files --eol on the fixture and whether it is checked out as CRLF on Windows. The likely fix is extending the eol=lf pin in .gitattributes to ts-packages/annotated-qmd/test/fixtures/*, then confirming the test passes on windows-latest.
Written by the indexing model from the issue text.
Description
The test "YAML block-scalar inlines: Substring over Concat maps through the parent, not affinely" fails on windows-latest:
https://github.com/quarto-dev/q2/actions/runs/45608700263
AssertionError [ERR_ASSERTION]: inline 0 (Str "line") raw source text
actual: ' li',
expected: 'line',
The test is here:
I think this is a CRLF checkout. fixtures/yaml-block-scalar.json records byte offsets into fixtures/yaml-block-scalar.qmd, and .gitattributes only pins ts-packages/annotated-qmd/examples/* to eol=lf, not test/fixtures. On my Windows checkout git ls-files --eol reports i/lf w/crlf for the .qmd. Two extra bytes in the front matter (---\r\ntitle: |\r\n) shift the read window by 2, which matches ' li' against 'line'. I haven't tried the fixture with LF endings yet.
We could extend the existing pin to ts-packages/annotated-qmd/test/fixtures/*. Linux and macOS pass today.
Related: the existing pin and its comment in .gitattributes, and #1275 (the opt-in Windows runner axis that exposed this).
- Dominant language
- Rust
- Stars
- 316
- Forks
- 23
- Avg merge
- 8h 19m
- Merged PRs (30d)
- 244
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from quarto-dev/q2
-
bug testing windows
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
quarto-dev/q2#1347 ·
Maintainers usually reply within 1 day
-
bug testing windows
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
quarto-dev/q2#1346 ·
Maintainers usually reply within 1 day
-
bug testing windows
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
quarto-dev/q2#1344 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
quarto-dev/q2#1335 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
quarto-dev/q2#1324 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
renaming a provider to a taken name fails with a raw sql errorPossibly taken A pull request linked to this issue is open or already merged. Openarea:storage kind:bug priority:p3 ready
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
XLSX files cannot be imported into Adobe InDesign due to missing AppVersion in extended propertiesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
qingjian-team/qingjian#1181 ·
Maintainers usually reply within 2 days