ylw510 opened a new pull request, #10957:
URL: https://github.com/apache/arrow-rs/pull/10957

   # Rationale for this change
   
   The top-level `arrow` crate already exposes `ARROW_VERSION` via 
`env!("CARGO_PKG_VERSION")` (see #6379). Dependents that only use `arrow-array` 
(common for Rust ADBC drivers that need a lean dependency set) currently have 
no equivalent API, so they fall back to invoking `cargo metadata` in a build 
script to report `DriverArrowVersion`.
   
   That approach is fragile for non-Cargo build systems and adds unnecessary 
clean-build overhead. Exposing the same constant from `arrow-array` makes 
version reporting trivial for everyone implementing Rust ADBC drivers (and any 
other crate that depends on `arrow-array` without the umbrella `arrow` crate).
   
   # What changes are included in this PR?
   
   * Add `pub const ARROW_VERSION: &str = env!("CARGO_PKG_VERSION")` to 
`arrow-array`, matching the existing constant on the top-level `arrow` crate.
   
   # Are there any user-facing changes?
   
   Yes: a new public constant on `arrow-array`. No breaking changes.
   
   Usage:
   
   ```rust
   use arrow_array::ARROW_VERSION;
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to