Skip to content

Download: tolerate a curlInterface that honours 'target' itself - #104

Open
fingolfin wants to merge 1 commit into
masterfrom
mh/download-curl-target
Open

Download: tolerate a curlInterface that honours 'target' itself#104
fingolfin wants to merge 1 commit into
masterfrom
mh/download-curl-target

Conversation

@fingolfin

@fingolfin fingolfin commented Aug 12, 2026

Copy link
Copy Markdown
Member

The via DownloadURL method passes the whole option record to DownloadURL
and then writes res.result to the target itself. curlInterface is gaining a
target option of its own (gap-packages/curlInterface#62) and then returns no
result, so this errors with

Record Element: '<rec>.result' must have an assigned value

Guarding on result being bound works with either version, and with the newer
one the file is never held in memory as a whole.

Neither CI catches this: utils does not install curlInterface, and
curlInterface does not test utils. Worth merging before curlInterface#62.

Written with Claude Opus 5 via Claude Code; reviewed by me.

CC @ThomasBreuer

The 'via DownloadURL' method passes the whole option record to 'DownloadURL'
and then writes 'res.result' to the target. curlInterface is gaining a
'target' option of its own (gap-packages/curlInterface#62), and then returns
no 'result', so this errored with

  Record Element: '<rec>.result' must have an assigned value

Guarding on 'result' being bound works with either version, and with the newer
one the file is never held in memory as a whole.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.25%. Comparing base (a4c23a8) to head (879d2c4).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #104   +/-   ##
=======================================
  Coverage   86.24%   86.25%           
=======================================
  Files          32       32           
  Lines        1905     1906    +1     
=======================================
+ Hits         1643     1644    +1     
  Misses        262      262           
Files with missing lines Coverage Δ
lib/download.gi 93.03% <100.00%> (+0.03%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ThomasBreuer

Copy link
Copy Markdown
Contributor

Taking #103 into account:

Up to now, the curlInterface based method never wrote a file, therefore one need not care about removing corrupted files after failures. Once curlInterface writes files, do we have to remove such files here or can we assume that curlInterface has already dealt with them?

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.

2 participants