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

use bracketed object accessor syntax for older jq versions #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asnelling
Copy link

As described in #166, the scripts may fail when parsing a device's config.json due to incorrect syntax with jq version 1.3 or below. This updates the filter strings passed to jq to use syntax that is compatible with both older and newer versions of jq.

Rationale

Although this repo ships with a jq v1.5 executable, it's nice to be able to use the system installed jq from your favorite distro's official package repositories. Particularly, official Android documentation suggests Ubuntu 14.04, whose official repositories only provide jq v1.3.

@asnelling
Copy link
Author

The below commit includes a test script using the current latest jq version 1.6 as well as jq version 1.3, which is the last release before updates to the object access syntax.

asnelling/android-prepare-vendor@905ba00

I did not include this commit to avoid the "how to implement testing" can of worms.

@thestinger
Copy link
Contributor

Although this repo ships with a jq v1.5 executable, it's nice to be able to use the system installed jq from your favorite distro's official package repositories.

Using the system version doesn't require supporting incredibly ancient versions of the tool.

Particularly, official Android documentation suggests Ubuntu 14.04, whose official repositories only provide jq v1.3.

I don't think that's good advice but rather very out-of-date information. You're assuming that the documentation that you're talking about is not many years out of date. This is what it says:

The Android build is routinely tested in house on recent versions of Ubuntu LTS (14.04) and Debian testing.

The fact that they're talking about Debian testing alongside Ubuntu 14.04 is a bit of a hint that the instructions are out-of-date. Debian jessie was released in 2015, stretch in 2017 and buster is the current stable. The current Debian testing is bullseye. I think that's a big hint that the instructions are very out-of-date. It's possible to build on Ubuntu 14.04, but I don't know why you would use it.

Ubuntu 14.04 doesn't have the build dependencies, and the instructions on that page for obtaining build dependencies are clearly extremely out-of-date and incorrect.

In general, you need to read the Android Open Source Project build documentation with the awareness that many parts of it are very out-of-date and primarily focused on development builds rather than creating production releases.

@anestisb
Copy link
Owner

@asnelling do you believe that we actually need this? Working now on adding support for Android 10 and Pixel4 devices and don't really want to run more unnecessary tests.

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.

3 participants