Add update mechanism for Terminfo, and common user-alias data#53285
Merged
fingolfin merged 5 commits intoJuliaLang:masterfrom Feb 23, 2024
Merged
Add update mechanism for Terminfo, and common user-alias data#53285fingolfin merged 5 commits intoJuliaLang:masterfrom
fingolfin merged 5 commits intoJuliaLang:masterfrom
Conversation
a64d318 to
cedd808
Compare
vtjnash
reviewed
Feb 12, 2024
a541793 to
67bbd97
Compare
vtjnash
reviewed
Feb 13, 2024
vtjnash
reviewed
Feb 13, 2024
Is it brilliant or cursed? That's up for debate, but I think it's neat. This change also revealed some minor discrepancies between the NCurses source (which we use nwo) and the processed source I originally used (from some python package? I can't quite recall). All of the minor discrepancies are cosmetic, with the exception of: - memory_below moving down by one, and - backspace_with_bs changing to backspace_if_not_bs Since we are now using NCurses's source directly, I'm inclined to trust these changes.
The preferred code to use is the "long" symbol, for readability when used. I think it makes sense to have it as the first field to reflect that. While we're at it, we may as well update the field names to better indicate that "short" is the actual capname, and just call "long" "name".
Using the tagged releases in the ncurses repository isn't actually a good idea, since it fails to capture the patch releases made subsequently. Instead, we switch to grabbing the latest version and recording which patch release it is. Normally, there would be a danger of grabbing un-released changes, however this doesn't seem like an actual risk in this case given how the ncurses repo seems to operate.
67bbd97 to
1a76ed4
Compare
Member
Author
|
I noticed that the NCurses release tags weren't quite right, so have tweaked the update logic, and updated again (so now we have the latest 6.4 release, not the initial 6.4 release). Also, there are enough commits here worth keeping IMO that I'm going to slap a "don't squash" label on this. |
vtjnash
approved these changes
Feb 13, 2024
KristofferC
pushed a commit
that referenced
this pull request
Feb 26, 2024
Now that we take care of terminfo parsing ourselves, having a clear origin and processing method for arriving at our reference terminfo data seems somewhat important. The original form was acquired by re-purposing some pre-processed terminfo data from NCurses (I forget the exact source). I considered adding a separate ingestion/processing script, but it occurred to me that it would make sense to have the method for updating the data file be _in_ the data file, by turning it into a quine. This seems to work rather well, and so long as the NCurses source file format stays the same, updating the terminfo data is now dead simple. While working on the terminfo files, some minor refactors popped up as "probably nice to have". One of which makes the reported number of flags/numbers/strings actually accurate. Lastly, to support the ergonomic use of capability variable names instead of the short (read: uninformative) capname, we now also import the NCurses-recognised extended capabilities, and generate/specify some nice aliases for them. ----- If we separate out the terminfo parser/data into a small stdlib, the state here will be the initial state of the repo. (cherry picked from commit 923fe2d)
maleadt
pushed a commit
that referenced
this pull request
Feb 26, 2024
Now that we take care of terminfo parsing ourselves, having a clear origin and processing method for arriving at our reference terminfo data seems somewhat important. The original form was acquired by re-purposing some pre-processed terminfo data from NCurses (I forget the exact source). I considered adding a separate ingestion/processing script, but it occurred to me that it would make sense to have the method for updating the data file be _in_ the data file, by turning it into a quine. This seems to work rather well, and so long as the NCurses source file format stays the same, updating the terminfo data is now dead simple. While working on the terminfo files, some minor refactors popped up as "probably nice to have". One of which makes the reported number of flags/numbers/strings actually accurate. Lastly, to support the ergonomic use of capability variable names instead of the short (read: uninformative) capname, we now also import the NCurses-recognised extended capabilities, and generate/specify some nice aliases for them. ----- If we separate out the terminfo parser/data into a small stdlib, the state here will be the initial state of the repo. (cherry picked from commit 923fe2d)
KristofferC
added a commit
that referenced
this pull request
Mar 1, 2024
Backported PRs: - [x] #53361 <!-- 🤖 [master] Bump the SparseArrays stdlib from c9f7293 to cb602d7 --> - [x] #53300 <!-- allow external absint to hold custom data in `codeinst.inferred` --> - [x] #53342 <!-- Add `Base.wrap` to docs --> - [x] #53372 <!-- Silence warnings in `test/file.jl` --> - [x] #53357 <!-- 🤖 [master] Bump the Pkg stdlib from 6dd0e7c9e to 76070d295 --> - [x] #53373 <!-- fix sysimage-native-code=no option with pkgimages --> - [x] #53333 <!-- More consistent return value for annotations, take 2 --> - [x] #53354 <!-- fix code coverage bug in tail position and `else` --> - [x] #53407 <!-- fix sysimage-native-code=yes option --> - [x] #53388 <!-- Fix documentation: thread pool of main thread --> - [x] #53355 <!-- Fix synchronization issues on the GC scheduler. --> - [x] #53429 <!-- Subtype: skip slow-path in `local_∀_∃_subtype` if inputs contain no ∃ typevar. --> - [x] #53437 <!-- Add debug variant of loader_trampolines.o --> - [x] #53284 <!-- Add annotate! method for AnnotatedIOBuffer --> - [x] #53466 <!-- [MozillaCACerts_jll] Update to v2023-12-12 --> - [x] #53467 <!-- [LibGit2_jll] Update to v1.7.2 --> - [x] #53326 <!-- RFC: when loading code for internal purposes, load stdlib files directly, bypassing DEPOT_PATH, LOAD_PATH, and stale checks --> - [x] #53332 - [x] #53320 <!-- Add `Sys.isreadable, Sys.iswriteable`, update `ispath` --> - [x] #53476 Contains multiple commits, manual intervention needed: - [ ] #53285 <!-- Add update mechanism for Terminfo, and common user-alias data --> Non-merged PRs with backport label: - [ ] #53424 <!-- yet more atomics & cache-line fixes on work-stealing queue --> - [ ] #53408 <!-- task splitting: change additive accumulation to multiplicative --> - [ ] #53403 <!-- Move parallel precompilation to Base --> - [ ] #53402 <!-- Add `jl_getaffinity` and `jl_setaffinity` --> - [ ] #53391 <!-- Default to the medium code model in x86 linux --> - [ ] #53125 <!-- coverage: count coverage where explicitly requested by inference only --> - [ ] #52694 <!-- Reinstate similar for AbstractQ for backward compatibility -->
tecosaur
pushed a commit
to tecosaur/julia
that referenced
this pull request
Mar 4, 2024
…ang#53285) Now that we take care of terminfo parsing ourselves, having a clear origin and processing method for arriving at our reference terminfo data seems somewhat important. The original form was acquired by re-purposing some pre-processed terminfo data from NCurses (I forget the exact source). I considered adding a separate ingestion/processing script, but it occurred to me that it would make sense to have the method for updating the data file be _in_ the data file, by turning it into a quine. This seems to work rather well, and so long as the NCurses source file format stays the same, updating the terminfo data is now dead simple. While working on the terminfo files, some minor refactors popped up as "probably nice to have". One of which makes the reported number of flags/numbers/strings actually accurate. Lastly, to support the ergonomic use of capability variable names instead of the short (read: uninformative) capname, we now also import the NCurses-recognised extended capabilities, and generate/specify some nice aliases for them. ----- If we separate out the terminfo parser/data into a small stdlib, the state here will be the initial state of the repo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now that we take care of terminfo parsing ourselves, having a clear origin and processing method for arriving at our reference terminfo data seems somewhat important.
The original form was acquired by re-purposing some pre-processed terminfo data from NCurses (I forget the exact source). I considered adding a separate ingestion/processing script, but it occurred to me that it would make sense to have the method for updating the data file be in the data file, by turning it into a quine.
This seems to work rather well, and so long as the NCurses source file format stays the same, updating the terminfo data is now dead simple.
While working on the terminfo files, some minor refactors popped up as "probably nice to have". One of which makes the reported number of flags/numbers/strings actually accurate.
Lastly, to support the ergonomic use of capability variable names instead of the short (read: uninformative) capname, we now also import the NCurses-recognised extended capabilities, and generate/specify some nice aliases for them.
If we separate out the terminfo parser/data into a small stdlib, the state here will be the initial state of the repo.