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

Suggest git submodule update --init in build failure #57

Merged
merged 4 commits into from
Oct 1, 2023

Conversation

noritada
Copy link
Owner

@noritada noritada commented Oct 1, 2023

This PR improves an error message from cargo build to suggest git submodule update --init.

Current:

Caused by:
  process didn't exit successfully: `/path/to/grib-rs/target/.../build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', build.rs:10:23
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

After improvement:

Caused by:
  process didn't exit successfully: `/path/to/grib-rs/target/.../build-script-build` (exit status: 1)
  --- stderr
  Error: "def/CCT is empty; run `git submodule update --init`"

Motivation

A senior member of the company I am working for asked me when he had an error trying to build grib-rs.
I could instantly imagine that the cause was the absence of submodules, but the error message certainly seemed confusing to users.

Copy link
Owner Author

@noritada noritada left a comment

Choose a reason for hiding this comment

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

Self-reviewed.

Copy link
Owner Author

@noritada noritada left a comment

Choose a reason for hiding this comment

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

Self-reviewed again.

@noritada noritada merged commit b2ea60d into master Oct 1, 2023
5 checks passed
@noritada noritada deleted the fix/build-error-when-submodules-are-unavailable branch October 1, 2023 09:08
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.

1 participant