Skip to content
This repository has been archived by the owner on May 31, 2018. It is now read-only.

replace cower search and json parsing code with jq #702

Closed
2 tasks
rmarquis opened this issue May 21, 2017 · 7 comments
Closed
2 tasks

replace cower search and json parsing code with jq #702

rmarquis opened this issue May 21, 2017 · 7 comments

Comments

@rmarquis
Copy link
Owner

rmarquis commented May 21, 2017

Pacaur uses some internal crappy, ugly but working (and suprisingly robust) json parser code - mostly because I didn't want to use jshon and associated deps and that it has some shortcoming.

However, jq in [community] is a nice alternative with very little footprint. It is also becoming a somewhat standard in the AUR ecosystem (used by asp, aurutils, ...).
Also, nowadays cower is used mainly for its powerful search feature, which could probably be replicated using jq. Consider replacing the current code with some jq calls.

  • replace in-house json parsing code
  • replicate cower search feature (maybe as an external program)
@rmarquis rmarquis added the todo label May 21, 2017
@rmarquis rmarquis added this to the 4.8.x - new features milestone May 21, 2017
@ismaelgv
Copy link
Contributor

Moving this new feature from 5.0 milestone to 4.8?

@rmarquis
Copy link
Owner Author

That 4.8 milestone is quite theoretical - don't know if that will be done at all.
This said, this change is quite easy. It's only 4 lines of code to replace. It would add a new dep so I don't want to add it to the current 4.7.x branch, which is bugfix and minor improvements only.

@rmarquis
Copy link
Owner Author

Since jq provides regex support, we might think about using it to replicate the powerful search function of cower and get rid of cower as AUR dependency.

@ismaelgv
Copy link
Contributor

I think that is a nice idea, you kill two birds with one stone. I suppose some extra work on this issue too.

@rmarquis rmarquis changed the title replace in-house json parsing code with jq replace cower search and json parsing code with jq May 30, 2017
@rmarquis
Copy link
Owner Author

Yes. I don't have the time to work on this right now, but if jq is to be used in the future then it makes sense to make the full use of it.

@AladW
Copy link
Contributor

AladW commented Jun 5, 2017

Well, I'll be curious on how you guys implement it. I couldn't jq my way out of a paper bag but a nice person sent me patches. 😄

@rmarquis
Copy link
Owner Author

rmarquis commented Jun 6, 2017

I'm actually doing a 180 degree turn here, and dropping this idea. See #708.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants