You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Erroneous “enum reference must resolve to a list” #3020
Even with ref: .LIST it goes back to enum reference ".LIST" must resolve to a list… I mean I know I’ve written a correct Taskfile, it’s just a bug I wanted to notify.
I’m sorry but I’m tired of AI just hallucinating solutions… it just doesn’t work.
No, I did not try it. AI is going to be more responsive for figuring this out ... its unlikely that this is going to be a bug. Not impossible, but unlikely.
You might try to locate LIST var to the task. Is possible that it tries to resolve LIST_STR before the sh is evaluated, relocating would address that.
This is enough to make the docs example fail (enum reference ".AVAILABLE_SERVICES | splitLines" must resolve to a list). I’m sorry but I call this a bug. compact is just supposed to remove empty strings from the slice (https://sprig.taskfile.dev/lists.html#compact-mustcompact).
What do you mean by “AI is going to be more responsive for figuring this out”?
I mean, the AI has got spare time to help you. And its pretty good, even if you have to tell it "no, please try again, this time an example which actually works".
I have spent the whole day closing PR's submitted to the Task project which were written by AI which are poor quality.
Well you have my full support then because it must be awful 😔 Sorry for being triggered by you sending slop at me. In addition to wasting your time, all this slop you face ends up undermining human-to-human conversations… what a world.
Activity
trulede commentedon Sep 7, 2026
From google AI, this suggestion, it seems correct so give it a try.
RemiBardon commentedon Sep 7, 2026
I’m sorry but did you even try it?
RemiBardon commentedon Sep 7, 2026
Even with
ref: .LISTit goes back toenum reference ".LIST" must resolve to a list… I mean I know I’ve written a correct Taskfile, it’s just a bug I wanted to notify.I’m sorry but I’m tired of AI just hallucinating solutions… it just doesn’t work.
trulede commentedon Sep 7, 2026
No, I did not try it. AI is going to be more responsive for figuring this out ... its unlikely that this is going to be a bug. Not impossible, but unlikely.
You might try to locate LIST var to the task. Is possible that it tries to resolve LIST_STR before the
shis evaluated, relocating would address that.See the documentation for examples (which I assume work), notice the location of the 'sh' variable (global) and
enumvariable (task).https://taskfile.dev/docs/guide#using-variable-references-for-enum-values
RemiBardon commentedon Sep 7, 2026
What do you mean by “AI is going to be more responsive for figuring this out”?
Also, this —taken from the docs (link you shared)— works:
I don’t see a meaningful difference from my example (which doesn’t work):
(By the way I am using
lsin my code;printfhere was to make line separation explicit)RemiBardon commentedon Sep 7, 2026
version: '3' vars: AVAILABLE_SERVICES: sh: ls services/ tasks: deploy: requires: vars: - name: SERVICE enum: - ref: .AVAILABLE_SERVICES | splitLines | compact + ref: .AVAILABLE_SERVICES | splitLines cmds: - echo "Deploying {{.SERVICE}}"This is enough to make the docs example fail (
enum reference ".AVAILABLE_SERVICES | splitLines" must resolve to a list). I’m sorry but I call this a bug.compactis just supposed to remove empty strings from the slice (https://sprig.taskfile.dev/lists.html#compact-mustcompact).pd93 commentedon Sep 7, 2026
@RemiBardon Please update your version of Task to the latest.
RemiBardon commentedon Sep 7, 2026
Oh! That’s nice :) Hadn’t seen the fix being mentioned in the
3.53.1release (thought I had a recent-enough version)trulede commentedon Sep 7, 2026
I mean, the AI has got spare time to help you. And its pretty good, even if you have to tell it "no, please try again, this time an example which actually works".
I have spent the whole day closing PR's submitted to the Task project which were written by AI which are poor quality.
RemiBardon commentedon Sep 7, 2026
Well you have my full support then because it must be awful 😔 Sorry for being triggered by you sending slop at me. In addition to wasting your time, all this slop you face ends up undermining human-to-human conversations… what a world.