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 something (anything but bash) for bash json parsing #2510

Open
Tracked by #2053
chcosta opened this issue Apr 12, 2019 · 5 comments
Open
Tracked by #2053

Use something (anything but bash) for bash json parsing #2510

chcosta opened this issue Apr 12, 2019 · 5 comments
Milestone

Comments

@chcosta
Copy link
Member

chcosta commented Apr 12, 2019

We have places in Arcade where we have to parse Json before an sdk is acquired. Powershell makes this easy on Windows. On Bash, the parsing is fragile and error prone. We should consider adopting a dependency on a more robust parsing tool in Arcade.

Something like jq

From chcosta@737e293#r33161980

chcosta referenced this issue in chcosta/arcade Apr 12, 2019
@alexperovich
Copy link
Member

We could probably use python for json parsing we need. All helix machines are guaranteed to have it because helix requires it, and most linuxes have it. I don't think the same is true of jq.

@chcosta chcosta changed the title Use jq for bash json parsing Use something (anything but bash) for bash json parsing Apr 12, 2019
@tmat
Copy link
Member

tmat commented Apr 12, 2019

All helix machines are guaranteed to have it because helix requires it, and most linuxes have it.

The fact that it is on helix machines is irrelevant. We would need to make this work for all OSS contributors on all platforms that CoreCLR supports and actually more. I don't think reading a version from a text file warrants making it more difficult to port CoreCLR on a new platform.

@alexperovich
Copy link
Member

Porting coreclr to a new platform will require python, because all the builds run through helix. Even worse really, the azure devops agent is written in C# and runs on .NET Core, so a new platform would require a complex bootstrapping thing or cross-compilation.

Every linux operating system we have brought up for helix has had python. They didn't all agree on the version, but JSON parsing is easy to do in a version tolerant way. I haven't seen jq on any linuxes I have worked on, it always required an install.

@tmat
Copy link
Member

tmat commented Apr 12, 2019

Porting coreclr to a new platform will require python, because all the builds run through helix.

Well, yes, eventually it will. But not when you're starting and want just to run build locally.

I'm fine with Python if we have solid data on its availability without installation on all Linux distros we support. I'd still prefer not to have the dependency at all though.

@markwilkie
Copy link
Member

Moving out beyond P7

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

No branches or pull requests

5 participants