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

ignore non-json lines in cargoBuildLog #234

Merged
merged 3 commits into from
Feb 11, 2023
Merged

Conversation

felschr
Copy link
Contributor

@felschr felschr commented Feb 9, 2023

Fix issues with non-JSON values in cargoBuildLog by ignoring non-json lines.

Motivation

In some cases using cargo with message-format=json prints some non-json lines: rust-lang/cargo#8179

When that's the case crane currently fails with:

searching for bins/libs to install from cargo build log at cargoBuildLogGbmv.json
parse error: Invalid numeric literal at line 390, column 6

Checklist

  • added tests to verify new behavior
  • added an example template or updated an existing one
  • updated docs/API.md (or general documentation) with changes
  • updated CHANGELOG.md

@ipetkov
Copy link
Owner

ipetkov commented Feb 10, 2023

Thanks for the contribution @felschr, overall looks good to me!

Are you interested in adding a test case for this to make sure we don't regress?

@felschr
Copy link
Contributor Author

felschr commented Feb 10, 2023

Here we go, does this look good to you?

Copy link
Owner

@ipetkov ipetkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks again!

@ipetkov ipetkov merged commit 2b866ab into ipetkov:master Feb 11, 2023
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.

2 participants