Introduce a JSON output table mechanic #248
Labels
Clear labels
bug
build
ci/cd
critical fix
design
documentation
duplicate
easy-first-issue
enhancement
help wanted
i10n
i18n
installer
invalid
question
release
release-candidate
security
tech-debt
test
wontfix
Something is not working
go build related issues
Building things with CI/CD
https://docs.coopcloud.tech/federation/resolutions/passed/010/
UI/UX
Documenting all the things
This issue or pull request already exists
Something for new people to get stuck into. We hope it's easy!
New feature
Need some help
Everything to do with localisation
Everything to do with internationalisation
Everything to do with the install script.
Something is wrong
More information is needed
Release management
Related to the new release candidate
Security related
Unit/integration testing
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
BornDeleuze
Brooke
carla
cas (Cassowary)
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
iexos
jade (Jade Ambrose)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
renovate-bot (Comrade Renovate Bot)
ripclap
simon
sixsmith (Sixsmith)
stevensting
trav (Trav Fryer)
val (val (he/him))
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: toolshed/abra#248
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
server listandrecipe listfixes #370
Looks pretty nice!
There seems to be several hacks here (wouldn't be the first in this codebase 🙃), do you expect they'll come back to bite us @cas? Do you have some concerns that it might break in certain ways?
Maybe we could write some tests for this? We have few tests in the codebase but that is because it normally things rely on this hard-to-test CLI > Logic > Output flow.
But here, you can test your implementation of the JsonTable directly? It might be easier. We did that with tagcmp (see the repo for test examples) and it really paid off, there have been very very few bugs and annoyances for people using
abracoming fromtagcmpbecause we ironed out a lot first.Thanks for picking this up!
I don't feel too concerned about it breaking. The only thing that worries me is that it has a slightly brittle way of producing JSON and it proxies another type which may change under us (I'm not too concerned about the proxy part since the use in
abraof tablewriter is really specific and we'll be able to catch when that changes easily).We could test the JSONTable type, I expect the best tests would just be throwing things at and a) testing if the output is valid JSON (parsable) and b) that the output is identical to a raw tablewriter.Table.
No worries, it's great to do this work!
I added tests and in writing the tests discovered a bug in jsontable. Testing Works™.
More tests could be added but I think this should get us a long way there.
Solid! LGTM then, merge away 🚀