Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print: hide spurious OpTypePointers, and ensure README.md pretty-printed SPIR-T is up to date in CI. #34

Merged
merged 4 commits into from
Jun 13, 2023

Conversation

eddyb
Copy link
Contributor

@eddyb eddyb commented Jun 8, 2023

Originally found while working on #33, and also used to contain #37 before splitting that off.

The pretty-printing fix here (not showing OpTypePointer that are used internally in GlobalVarDecl/PtrToGlobalVar but never actually meant to be printed) is relatively small, the main change is the new CI check, which should ensure we don't forget to update README.md.

eddyb added a commit that referenced this pull request Jun 11, 2023
…dth back to 120. (#37)

*Originally found/fixed during the #33/#34/#35/#36 series of
pretty-printing PRs.*

Before this PR, we were treating all text the same, regardless of style,
but this PR introduces the concept of "fractional columns" (integer
multiples of `0.1ch`, because our `font-size`s are always integer
multiples of `0.1em`).

The result is much more accurate, and so far appears to perfectly match
browser behavior (i.e. the transition of `MAX_LINE_WIDTH` from `N-1` to
`N`, where multi-line layout gets replaced with single-line layout,
results in a line that "tightly fits" in a `max-width: Nch` container,
with no spurious gaps or overflows).

Note however that the increased accuracy makes the layout favor HTML
over plaintext (and we don't have a plaintext-vs-HTML "simultaneous
layout", nor a way to hint what the output of pretty layout will be used
for), so the plaintext output may feel more inconsistent as a result
(but its aesthetics are of dubious value anyway).
@eddyb eddyb force-pushed the print-small-fixes branch from ef57f99 to 19ae8dc Compare June 12, 2023 07:40
@eddyb eddyb changed the title print: several small/self-contained fixes. print: hide spurious OpTypePointers, and ensure README.md pretty-printed SPIR-T is up to date in CI. Jun 12, 2023
@eddyb eddyb force-pushed the print-small-fixes branch from 7e4f15c to 3591ce5 Compare June 12, 2023 09:34
@eddyb eddyb marked this pull request as ready for review June 13, 2023 11:18
@eddyb eddyb enabled auto-merge June 13, 2023 11:19
@eddyb eddyb added this pull request to the merge queue Jun 13, 2023
Merged via the queue into main with commit 441d1bc Jun 13, 2023
@eddyb eddyb deleted the print-small-fixes branch June 13, 2023 11:58
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.

1 participant