Closed liquidaty closed 11 months ago
Great start. Will start going thru issues:
Add a PR comment. Documentation fix.
Has PR #2395, also related to #2216. Documentation fix.
Think the conclusion for master was --nul-output
works, there is code for -0
but is treated as a number instead of flag (and --null-input
has never been?). Mostly documentation fix, maybe -0
code should be cleaned up?
Documentation fix.
Documentation fix.
BTW also accidentally noticed that github markdown includes the issue/PR title if you put them in a list - #<number>
!
Will continue later when i more time.
@liquidaty - Thanks for getting the ball rolling so nicely!
Your post raises a number of issues, but in this response, I'd like to focus on just a few that arise because of various complexities.
First, on governance - I suggest that a "core" group be formed (defined by authority to make changes on github), and that at least initially it proceed on the basis of unanimity.
Second, because there are so many issues, many of which are actually quite tricky in one way or another, I think we need to prioritize carefully and be a bit wary about pre-mature commitments to time lines. I'd suggest focusing on generic "milestones" in the near term, perhaps along these lines:
Version 1.6.1 - the state of things at the time the fork is created.
Version 1.6.2 - minor documentation updates and fixes for bugs or performance issues provided the solutions are known to be quite straightforward.
Version 1.6.3 - incorporate changes of the "low hanging fruit" variety, avoiding new features but possibly addressing at most one important issue, e.g. an issue upon which the resolution of others depends (e.g. the 'builtins.jq' issue (*)).
Version 1.6.4 - additional changes that adhere to the principle of backward compatibility.
My guess is that there will be other releases before 1.7.
(*) I am not quite sure what the current status of the "builtins.jq" issue is exactly, but the problem has to do with the run-time costs of adding additional defs to builtins.jq. The general point of course is that we have to be careful not to introduce unexpected performance penalties.
@wader thanks for help reviewing. @pkoppstein I like all those ideas.
Does the JQ repo currently have any built-in benchmarking tests? I see some mentions in #1589 and #2386 but can't tell if anything made it into the repo. If not, maybe maintaining some basic benchmarks should be one of the "roles"-- though maybe it's more of a one-time setup
@liquidaty asked about
built-in benchmarking tests?
Obviously the various tests in the tests/ directory can be used for benchmarking. See also:
I'll be happy to review, beta test, etc. anything related to either.
The fork has not been created. From my perspective, the main thing that needs to happen first, is to establish the "core" group. This would be the group that has authority to make changes on github, and would initially make decisions based on unanimity.
I can appreciate that pre-mature commitments can be easily overdone, but there needs to be some level of commitment to make this work as a group, otherwise it might as well be a one-person project which defeats the entire purpose. Said another way, as part of determining that core team, we would need to have an understanding of some minimal level of commitment (e.g. obviously, unanimous decision-making can't happen if decision-makers are not available) and some very basic initial milestones or general objectives as to what we are trying to do in what time frame.
I would propose the following issues to be first addressed with the core team. And this is going to be a bit of a chicken and egg process given that we don't have a core team yet, but we have to start somewhere.
This is just a very rough initial proposal so please comment as you see fit. More to the point, assuming we can come to some reasonable agreement about how all this will come together:
More directly to the point: who is up for being part of (or at least considering being part of) the core team? and/or just being part of the team, but non-core? @pkoppstein, @wader, @chickenandpork, @tst2005, @hexagonrecursion, @mfeit-internet2 (or anyone else I missed)?
The biggest problem I have maintaining jq, besides my own lack of time, is the inability to add maintainers w/o @stedolan's help.
Therefore, @owenthereal and I set up https://github.com/jqlang/jqlang a while back in preparation for forking some day. I've invited @stedolan to be the owner of that org. I will invite him again.
What I need right now in order to make that fork a reality is: candidates to be maintainers. To pick from the candidates I guess I'd want a small set of PRs or something to look at.
Mind you, you guys are pretty fed up -as you should be- with me and @stedolan, so if you want to fork using a different org and pick your own maintainers, that's fine. jqlang
seems like a fine org name though.
Thoughts?
Stoked to hear from you @nicowilliams, your input is very welcome!
My voice shouldn't count for much -- I'm just a rando who got excited about the idea of helping this project get unstuck -- but I'm in favor of https://github.com/jqlang/jq as the new fork. Though it's worth mentioning the existence of https://github.com/jqmaintainers/jq, created by @tst2005.
Again, no particular reason to listen to me, but personally I think @wader & @itchyny should be fast-tracked in as a maintainers. I haven't looked closely at other people's contributions recently -- and again I'm not familiar enough with jq
to be any kind of gatekeeper -- but just for convenience, here are some links, in alphabetical order (sorry if I missed anyone who has been active lately, I kinda threw this together):
To recreate, starting w/ a list of @
mentions, use this regex: ^@(.+)$
➝ | [$1](https://github.com/$1) | [PRs](https://github.com/stedolan/jq/pulls?q=is%3Apr+author%3A$1) | [branches](https://github.com/$1/jq/branches) | [commits](https://github.com/stedolan/jq/commits?author=$1) | [comments](https://github.com/stedolan/jq/issues?q=commenter%3A$1) |
Thank you for that list @mrienstra! I'll review it tomorrow and invite some of them.
Also, is there a PR for making the Windows build work again? And one for GitHub Actions?
@nicowilliams wrote:
is there a PR for making the Windows build work again? And one for GitHub Actions?
This one seems relevant:
https://github.com/stedolan/jq/issues/2250 AppVeyor continuous integration tests all fail with GPG errors
@nicowilliams Hey, nice to hear from you, hope all i well. My vote is for @itchyny also if he is up for it, and based on history maybe it's good to have more then one new maintainer :) i'm up for helping out either as maintainer or contributor. I'm not very familiar with the jq source code but i have done lots of C previously and feel motivated working on it.
Quick aside, I appreciate the process @liquidaty is championing in this thread, and I don't want to derail that train of thought. 🚂❤️
Therefore, @owenthereal and I set up https://github.com/jqlang/jqlang a while back in preparation for forking some day.
👋 Hello everyone!
I'm absolutely thrilled to see the move to https://github.com/jqlang finally happening 🚀. I can't wait to collaborate with all of you in maintaining and further developing jq!
A little about me: I'm the brains behind https://github.com/owenthereal/jqplay, the interactive playground that's linked directly from the jq documentation page 📚. Excited to bring my experience and passion for jq into this new venture with you all! 💻🔧🌟
I don't have any opinion on where the future fork is, and I'm happy to be a core member, or just a helping member, or not a member at all (in fact, this last would be my preference if the objective can be met without me!)-- really, I just want, for my selfish reasons, for the good work that many people have done on jq
, as well as at least one of the updates that I've submitted and that is necessary for my purposes, to be available to everyone in a current and centralized single repo/fork so we don't have to all be using our separate forks.
So if the desired location of the fork is jqlang, that's fine with me.
That said, my prior question, which IMHO addresses the number 1 obstacle at this time ("who is up for being part of (or at least considering being part of) the core team? and/or just being part of the team, but non-core?") is still in want of a direct answer from anyone. Though, perhaps the latest comments and enthusiasm are an implicit volunteering to at least be a non-core contributor?
In any case, whatever team wants to maintain this, wherever the fork is housed, will still need to deal with figuring out what are the goals, what is the process and what is the team. On that last question, I would suggest shifting the focus from "who is sufficiently skilled to be a maintainer" to "what do we need to do" followed by "who can help and who is willing to help do those things".
So to try to put some specificity around "what we need to do" next, here is something to start with:
So: how do those next steps sound, and if within reason (assuming some level of flexibility to refine), who would be willing to help, and which specific items above would you be willing to help with?
Again, I'm not trying to insert myself if I'm not needed. I'm just trying to be a catalyst to us being able to have a current and single jq repo, and offering to help if I can, but more than happy to leave this in more capable hands than mine if that goal can be met without my participation.
Hi everyone, thanks for your comments and feedback.
Thus far it doesn't look like we have sufficient (imho) momentum for a "core" team, so I will plan to create a new fork this weekend for the benefit of anyone who would like to use it. If the preferred location for that fork is jqlang and the owners want to make me an admin there, I'm happy to discuss that possibility, otherwise I'll choose a different location and notify this thread.
The first order of business will be to get CI/CD running smoothly, for win, linux and MacOS, after which time I will start looking at releases PRs / etc. If anyone would like to join me or has other comments before then, feel free to post here and I will check back in around the end of the week.
@mrienstra: thanks for that list! I've invited @muhmuhten (accepted), @itchyny, @leonid-s-usov, @dtolnay (though I suspect he's quite busy with Rust), @wtlangford (though he is not interested in continuing as maintainer), @stedolan (as owner, of course), and I'll look more later.
@liquidaty I don't think we need much governance unless there's disagreement.
My preference is that maintainers take any obvious PRs and that they seek consensus among themselves in case of controversy.
Also, the way we did things when we had multiple active maintainers is that the maintainers reviewed each others' PRs and we needed each others' approval to push those, but as for PRs by non-maintainers we took the trivial ones w/o debate and discussed the ones that needed to be discussed.
A bit of wisdom for new maintainers:
don't add any more non-function-like language elements like try
/catch
-- try
/catch
should have been a function try(exp; catch)
and try(exp; catch; finally)
ditto break
don't add any more polymorphism -- polymorphism in a dynamically-typed language creates problems
do not add new types unless those are essentially sub-types of JSON types
(this was something I discussed with @stedolan and he was quite adamant about this, and now so am I).
I’m still interested in helping; I’m an SRE who enjoys CI/CD challenges.
I have seen statements of interest, but it seems like there’s a plan now :)
@chickenandpork wrote:
I’m still interested in helping
Great. In case you didn't notice, @nicowilliams asked in this thread:
is there a PR for making the Windows build work again?
If you could offer a PR addressing the issue(*), it might even be incorporated into the stedolan version!
Thanks.
(*) Presumably https://github.com/stedolan/jq/issues/2250 (AppVeyor continuous integration tests all fail with GPG errors)
Seems like as a start it might be easier to remove the dependency on appveyor, since it adds another layer of applications, logins, authentications, accounts, etc. Is there anything that appveyor provides now, that isn't as easily provided by github ci/cd?
I would like to join the communication space of maintainers if exists (Slack or Discord?).
@liquidaty wrote:
Is there anything that appveyor provides now [?]
See https://github.com/stedolan/jq/wiki/Installation#windows-using-appveyor
@pkoppstein thank you. So is Appveyor used solely for building windows executables? If so, that is extremely easy to replace with a github action that runs mingw64 on vanilla linux. I'd be happy to submit a PR for that, which would kill 2 birds in one stone (fix windows build and remove a "heavy" and otherwise unnecessary dependency).
here's an example of a github action that builds a win version of an executable (and builds and installs a custom jq library!) at https://github.com/liquidaty/zsv via linux+mingw64 as specified in https://github.com/liquidaty/zsv/blob/main/.github/workflows/ci.yml.
@liquidaty - From my point of view, the main significance of Appveyor was that it made it easy for Windows users to snarf any recent "snapshot" of jq of interest, not just the official versions.
I would like to join the communication space of maintainers if exists (Slack or Discord?).
Me too
OK I've spent a lot more time than I had planned on looking into this appveyor issue and here are my conclusions:
I also think, it is taking a disporportionate amount of time and attention write all these messages and discussions and attempt to get consensus, vs just fixing the issues. So, I have set up my own repo and am going to remove appveyor and do whatever other changes are needed for github actions to a minimal level of CI/CD. Until those basic changes are done, I am going to keep the repo private, because it's going to be in a broken state and I don't want anyone to try to use it and get turned off by that. Once CI/CD is working in that private repo, I will make it public and then begin porting the obvious and non-controversial PRs into that repo. If and when any of the maintainers of this repo or jqlang would like to take those changes, they are welcome to do so (or make me a maintainer and I'll do it directly).
If anyone would like to help with that, feel free to let me know.
I would like to join the communication space of maintainers if exists (Slack or Discord?).
Me too
If you set up a slack or discord, I'll join it. EDIT: Owen will set it up and schedule it.
The other thing I need to do is set up a mirror from jqlang/jq to stedolan/jq and update the README to note that we're moving issues/PRs/dev activity to jqlang/jq but that stedolan/jq will remain canonical as long as there is one maintainer left with push rights for stedolan/jq.
👋 Feel free to join this discord 🎉 : https://discord.gg/yg6yjNmgAC. Please name your server nickname the same as your GitHub username so that we know who we are talking to 😄
@nicowilliams - Thanks for your continuing efforts. I would like to ask a big favor that I'm hoping would not take too much of your time - to tag the current version with an "official" release number (e.g. 1.6.1). It would make a huge difference in several respects. I won't go into the details as I'm sure you can easily surmise them. (Of course, if you have time to sneak in any additional enhancements before creating 1.6.1, so much the better :-)
If you are don't have time to create a new version yourself, is there any chance that someone else could do so?
A bit of wisdom for new maintainers:
Thanks for sharing. I got a bit curious about your wisdoms as i've tried (and failed) various ways to extend jq while working on https://github.com/wader/fq
- don't add any more non-function-like language elements like
try
/catch
--try
/catch
should have been a functiontry(exp; catch)
andtry(exp; catch; finally)
After writing lot of jq code i think i'm quite satisfied what it currently has. But if i could dream there are some things i've thought about that might be neat/useful:
...
in javascript)match
syntax that can combine conditional and destructingBut as i said, i'm very pleased with current jq.
- ditto
break
- don't add any more polymorphism -- polymorphism in a dynamically-typed language creates problems
By polymorphism you mean additional types or how different type interact with each other? both?
do not add new types unless those are essentially sub-types of JSON types
- for example, a "binary data" type should be indistinguishable from an array of small integers 0-255
(this was something I discussed with @stedolan and he was quite adamant about this, and now so am I).
For fq i've added a binary type that can have both byte or bit units. First I naively exposed the type the to "standard jq" but it turned out be a bad idea, lots of weird behaviors happened (ex type/0
returned "binary"). This was later changed so the the type was indistinguishable to a string unless you use some new functions the know about the duality.
If I get some motivation and time it would be interesting to try the binary as array of ints idea for fq. It already kind of works like that if you use explode/0
or tobytes/0
(turns things into binary).
So I agree, adding a new type that is not JSON is probably a bad idea.
@wader
By polymorphism you mean additional types or how different type interact with each other? both?
I mean adding behaviors to operators that work on multiple input types.
For fq i've added a binary type that can have both byte or bit units.
JSON only has the types that jq has, but we can have a binary type that is represented in jv/jq as an array of small unsigned integers (0..255
) and internally use a byte array to represent it. Then we can have tobinary
and toutf8
functions to convert from strings to binary and vice-versa, and we can have tobinary
also accept arrays of numbers, and we can have a toarray
to convert binary values that wouldn't allow setting/appending values that are not small integers (which would otherwise raise an error if the array was a binary). As well we'd have hex and base32 and base64 codecs. Maintaining the fiction that binary is an array of small integers is important when it comes to doing JSON I/O.
[...] lots of weird behaviors happened (ex type/0 returned "binary").
Exactly!
Binary has to be a "sub-type" of array (or string, but I think really of array). If a UTF-8 string is converted to binary, then that could be treated as a sub-type of string as long as you don't set or append elements that render it non-UTF-8, but checking that every time would be annoying, so I think it's best to go with binary as a sub-type of array.
@liquidaty If you're still looking for bugfix PRs, #1588 and #2116 are the same bug with trivially easy test cases (an error reporting routine is asserting and crashing).
@chickenandpork wrote:
I’m still interested in helping
Great. In case you didn't notice, @nicowilliams asked in this thread:
is there a PR for making the Windows build work again?
If you could offer a PR addressing the issue(*), it might even be incorporated into the stedolan version!
Thanks.
(*) Presumably #2250 (AppVeyor continuous integration tests all fail with GPG errors)
@pkoppstein I hadn't noticed the response back in May; I haven't owned a windows box for likely 19 years, so I'm the opposite of helpful with windows. Now, bazel, that's got my interest, and it might re-enable some Windows compatibility. I cut a quick message into #general on the discord.
This is an offshoot of #2305. Please read that for background. cc: @stedolan @nicowilliams @wtlangford
I am posting this issue to organize a plan to create a new JQ fork with two primary objectives:
The plan to create a new for is done out of necessity, not desire-- again, see #2305 for details. This is NOT an attempt to hijack or otherwise replace this repo, and the ultimate goal will be to either merge back into this repo, or to otherwise provide a successor with the blessing of this repo's owners/maintainers. If at any point in this process those maintainers would like to merge this effort back into this repo, that would be welcome
As a start, I would propose that we:
Request for comment
This entire issue post is a request for comment to see if we can get this off the ground. I will start with the below proposals. These are certainly incomplete and in need of further refinement / fleshing out, so please offer your suggestions / comments
Decision framework
I'm just going to throw out the simplest way to start: on any decisions that are not obvious, the core team votes (on the other hand, how do we decide the core team? kind of chicken & egg...). Maybe we start with the core team being, whoever are the first few volunteers who are willing commit meaningful time/effort/value to this?
As for decision guidelines, I would propose that a core value is impact-driven prioritization. Surely it is impossible to agree on exactly what outcomes have what impact, but we can also surely agree that a fatal bug fix is more important than a cosmetic one, and an enhancement with 100 likes and dozens of comments is probably more impactful than one with no likes and no comments.
Core set of necessary roles
Folks who can fill these roles?
Please volunteer. I'm happy to pitch in for any role, though surely others are more skilled than I at CI/CD or code review (and probably all the others too). @pkoppstein @wader @tst2005 @chickenandpork (apologies in advance for anyone, which there are sure to be, whom I should have mentioned and missed here-- pls do not take personally but rather blame my sleepiness): any takers?
Preliminary target timelines
Suggest May 1, 2023 for version 1.6.2. If there are more bug-fix PRs than can fit in that time, can always plan for 1.6.3 some time thereafter.
Suggest May 15, 2023 for version 1.7. Similarly, If there are more feature-enhancement PRs than can fit in that time, can always plan for 1.7.1 some time thereafter.
identify existing PRs for bug fixes and enhancements to target for 1.6.2 and 1.7, respectively
Note: I have not spent much time reviewing PRs, so I've just started by exporting the PRs to jq_prs-20230307.json.txt and spitting out in markdown below, and then mostly arbitrarily choosing a few to get started
--nul-output
documentationtruncatestream
builtin functioninput
&inputs
to manual--indent 0
implicitly enabling compact-outputfetch
is{scalar,value,..}
. Fixes leaf_paths bug. Leaf paths