News for hackers. Stuff that matters.
Re:Dear GitHub: no YAML anchors, please by willseth on Monday September 22, 2025 @11:13AM (#45334591)
I think the main reason you see overwhelming support for anchors is that the existing Actions functionality is typically so cumbersome to implement and often makes it harder to understand a workflow. Anchor syntax is a little esoteric, but otherwise very simple and grokable.
Re:Dear GitHub: no YAML anchors, please by woodruffw on Monday September 22, 2025 @11:25AM (#45334762)
To be clear, I understand why people want to use anchors. The argument isn't that they aren't useful: it's that the juice is not worth the squeeze, and that GitHub's decision to support them reflects a lack of design discretion.

Or in other words: if your problem is DRYness, GitHub should be fixing or enhancing the ~dozen other ways in which the components of a workflow shadow and scope with each other. Adding a new cross-cutting form of interaction between components makes the overall experience of using GitHub Actions less consistent (and less secure, per points about static analysis challenges) at the benefit of a small amount of deduplication.

Re:Dear GitHub: no YAML anchors, please by btreecat on Monday September 22, 2025 @11:33AM (#45334878)
So GitHub shouldn't implement the spec because you personally don't like that the spec solves a problem you can optionally solve at another layer?
Re:Dear GitHub: no YAML anchors, please by woodruffw on Monday September 22, 2025 @11:39AM (#45334973)
No; GitHub shouldn't support YAML anchors because it's a deviation from the status quo, and the argument is specifically that the actions ecosystem doesn't need to make analysis any harder than it already is.

(As the post notes, neither I nor GitHub appears to see full compliance with YAML 1.1 to be an important goal: they still don't support merge keys, and I'm sure they don't support all kinds of minutiae like non-primitive keys that make YAML uniquely annoying to analyze. Conforming to a complex specification is not inherently a good thing; sometimes good engineering taste dictates that only a subset should be implemented.)

Re:Dear GitHub: no YAML anchors, please by VGHN7XDuOXPAzol on Monday September 22, 2025 @11:46AM (#45335097)
> Conforming to a complex specification is not inherently a good thing

Kind of a hard disagree here; if you don't want to conform to a specification, don't claim that you're accepting documents from that specification. Call it github-flavored YAML (GFY) or something and accept a different file extension.

https://github.com/actions/runner/issues/1182

> YAML 1.1 to be an important goal: they still don't support merge keys

right, they don't do merge keys because it's not in YAML 1.2 anymore. Anchors are, however. They haven't said that noncompliance with YAML 1.2 spec is intentional

Re:Dear GitHub: no YAML anchors, please by woodruffw on Monday September 22, 2025 @11:53AM (#45335193)
> Call it github-flavored YAML (GFY) or something and accept a different file extension.

Sure, I wouldn't be upset if they did this.

To be clear: there aren't many fully conforming YAML 1.1 and 1.2 parsers out there: virtually all YAML parsers accept some subset of one or the other (sometimes a subset of both), and virtually all of them emit the JSON object model instead of the internal YAML one.

Re:Dear GitHub: no YAML anchors, please by btreecat on Monday September 22, 2025 @11:43AM (#45335035)
> No; GitHub shouldn't support YAML anchors because it's a deviation from the status quo, and the argument is specifically that the actions ecosystem doesn't need to make analysis any harder than it already is. > > (As the post notes, neither I nor GitHub appears to see full compliance with YAML 1.1 to be an important goal: they still don't support merge keys, and I'm sure they don't support all kinds of minutiae like non-primitive keys that make YAML uniquely annoying to analyze. Conforming to a complex specification is not inherently a good thing; sometimes good engineering taste dictates that only a subset should be implemented.)

That's a long way to say "yes, actually"

Re:Dear GitHub: no YAML anchors, please by woodruffw on Monday September 22, 2025 @11:46AM (#45335085)
> That's a long way to say "yes, actually"

"Because I don't like it" makes it sound like I don't have a technical argument here, which I do. Do you think it's polite or charitable to reduce peoples' technical arguments into "yuck or yum" statements like this?

Re:Dear GitHub: no YAML anchors, please by btreecat on Tuesday September 23, 2025 @12:29AM (#45342848)
> > That's a long way to say "yes, actually" > > "Because I don't like it" makes it sound like I don't have a technical argument here, which I do. Do you think it's polite or charitable to reduce peoples' technical arguments into "yuck or yum" statements like this?

When you say something comes down to engineering "taste" then you've already reduced your own argument.

Re:Dear GitHub: no YAML anchors, please by woodruffw on Tuesday September 23, 2025 @01:43PM (#45350397)
I don't know whether this intentional or not, but you seem to be omitting the context where "taste" comes into play: it's not about which things are better or not, but about exercising discretion in how much variety to expose in a large system.

If it makes things easier for you, you can substitute between these two.

Re:Dear GitHub: no YAML anchors, please by verdverm on Monday September 22, 2025 @03:14PM (#45338117)
> GitHub's decision to ... reflects a lack of design discretion.

So true, not the first time, not the last time.

I'm at the point of exploring Gerrit as an alternative