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

✨ Adds generator for JSON version of the validator spec #22528

Merged
merged 3 commits into from
Jun 4, 2019

Conversation

fstanis
Copy link
Contributor

@fstanis fstanis commented May 28, 2019

This makes it easier to consume by scripts to e.g. pull the list of all tags allowed by a specific format or generate autocomplete definitions for playground.amp.dev.

@danielrozenberg
Copy link
Member

Looks like the import of json_format fails on Travis - maybe one of @Gregable @honeybadgerdontcare @rsimha know how to add it?

It's also missing from the check on this line:

for m in ['descriptor', 'text_format']:

@rsimha
Copy link
Contributor

rsimha commented May 28, 2019

It's also missing from the check on this line:

for m in ['descriptor', 'text_format']:

Good catch.

I think this section in validator/README.md needs to be updated, and the required package needs to be added to this list for Travis runs:

amphtml/.travis.yml

Lines 23 to 31 in df19f09

addons:
apt:
packages:
# Use unbuffer (from expect-dev) for log coloring (github.com/travis-ci/travis-ci/issues/7967)
- expect-dev
- google-cloud-sdk
- openssl
- protobuf-compiler
- python-protobuf

@fstanis
Copy link
Contributor Author

fstanis commented May 28, 2019

Any idea which package specifically we need to add? I was 99% sure it's part of python-protobuf.

@rsimha
Copy link
Contributor

rsimha commented May 28, 2019

Any idea which package specifically we need to add? I was 99% sure it's part of python-protobuf.

According to https://stackoverflow.com/questions/2456664/google-protobuf-in-linux, it's in protobuf-compiler. But we already install that package, so I'm not sure where it really is.

Over to @honeybadgerdontcare @Gregable 😃

@Gregable
Copy link
Member

I have no idea, sorry.

@fstanis
Copy link
Contributor Author

fstanis commented May 28, 2019

After digging a little bit, it seems that the last published version of python-protobuf for xenial is the (now ancient) 2.6.1-1.3 which had no JSON support.

pip install protobuf gets the latest version, so I hope this will work with Travis...

@fstanis
Copy link
Contributor Author

fstanis commented May 28, 2019

Well, that seems to have worked. Also updated README and build.py message.

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

Successfully merging this pull request may close these issues.

5 participants