<whitequark[cis]>
yeah, I don't remember anyone asking for that specifically
<mcc111[m]>
It seems like evaluating Cat expressions with constant constituents shouldn't be that hard…
<mcc111[m]>
But I don't think (?) the internals of Cat are documented or part of any api contract, so I'd be a little afraid to do so in my end-user code
<whitequark[cis]>
I think we can treat that as a minor change probably, without requiring an RFC
<Wanda[cis]>
was wondering about Slice for const struct manipulation too, actually
<Wanda[cis]>
since this lets you access fields
<whitequark[cis]>
unsure. seems hard to imagine anyone objecting to Slice who is fine with Cat
<Wanda[cis]>
but that's part of the large bitstruct redesign thing in Glasgow which I have not really figured out yet
<whitequark[cis]>
yeah I think we can just discuss a PR
<Wanda[cis]>
want me to cook one for Slice?
<mcc111[m]>
It seems like if you say "no const expressions" that's a coherent position for the language to take but "expressions can contain const or cat but NOT slice" is very surprising. I think you can say adding slice is just filling out the existing language semantics.
<Wanda[cis]>
the objection to having lots of stuff available in const eval is that it's likely to result in very poorly tested code paths
<whitequark[cis]>
<Wanda[cis]> "want me to cook one for Slice?" <- yes
<whitequark[cis]>
<mcc111[m]> "It seems like if you say "no..." <- originally, `Cat` was added so that you could make a compound value out of several enums
<whitequark[cis]>
this is very common in instruction decoders for example
<whitequark[cis]>
there was no concrete motivation for Slice so it wasn't added, but the RFC explictly said that the list can be expanded in the future
<Wanda[cis]>
okay, codecov, you're technically right, but ... no
<Wanda[cis]>
fine, I added a test for that
<whitequark[cis]>
what was it about?
<Wanda[cis]>
the `raise TypeError("<whatever> is not const-castable")` branch at the end was not covered, and this caused complaint about partial coverage on the `elif isinstance(obj, Slice):` line that I added at the end
<Wanda[cis]>
since the entire PR was 3 lines long, this resulted in 66% test coverage and failed CI
<_whitenotifier-3>
[amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1008-82d35fb93243aa8bdc50bf13be0f4cba472d037d - https://github.com/amaranth-lang/amaranth
<_whitenotifier-3>
[amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1009-6780c838b2b07c93165d3e84221134c7b1463f07 - https://github.com/amaranth-lang/amaranth
<whitequark[cis]>
that's a soft failure
<whitequark[cis]>
does not affect mergeability
<whitequark[cis]>
the UI is super confusing though
<_whitenotifier-3>
[amaranth-lang/amaranth] wanda-phi 6780c83 - hdl.ast: fix `Const.cast(Cat(...))` handling for signed numbers.
<_whitenotifier-3>
[amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 37525e4 - Deploying to main from @ amaranth-lang/amaranth@6780c838b2b07c93165d3e84221134c7b1463f07 🚀
<_whitenotifier>
[amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 4178c43 - Deploying to main from @ amaranth-lang/amaranth@0849e1af0bbecc629b1331ee257c58bf931b241a 🚀
lofty has left #amaranth-lang [#amaranth-lang]
<Wanda[cis]>
oh, right, backports
<Wanda[cis]>
so what's the procedure for that, anyway?
<galibert[m]>
Release every six months so you don’t have to care about them ?