-
Notifications
You must be signed in to change notification settings - Fork 266
chore: introduce nightly
feature flag to provide error backtrace
#1340
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @BugenZhao IIRC, this will require unstable rust toolchain? If so, I don't think we should introduce this.
Is it a good idea to expose |
Signed-off-by: xxchan <xxchan22f@gmail.com> ## Which issue does this PR close? #1340 ## What changes are included in this PR? ## Are these changes tested? --------- Signed-off-by: xxchan <xxchan22f@gmail.com>
Signed-off-by: xxchan <xxchan22f@gmail.com> ## Which issue does this PR close? apache#1340 ## What changes are included in this PR? ## Are these changes tested? --------- Signed-off-by: xxchan <xxchan22f@gmail.com>
I don't think this change imposes actual "requirement" on the nightly toolchain: it's completely optional and not enabled by default. Additionally, gating code that requires unstable language features behind a feature named "nightly" is also a common practice in the community. |
Detecting nightly features is not recommended by the Rust community, as nightly features can be renamed or removed at any time. For example: tkaitchuck/aHash#200
Similar things have happened many times before. We don't want to disrupt our users, especially those using the nightly version of rustc. I understand the motivation behind this change, but since we have already provided an alternative, perhaps we can wait until this feature is stabilized. |
Just to be clear: I'm also not introducing any sort of auto detection of feature here. It's totally opt-in, which is instead recommended according to your reference:
Also there are some discussions at https://users.rust-lang.org/t/is-it-suitable-to-require-nightly-in-public-crate/97768:
|
What changes are included in this PR?
In nightly toolchain, there's an unstable feature
error_generic_member_access
which allows accessing the error to extract additional information. A common convention is toprovide
error backtrace here.This PR introduces a new non-default feature named
nightly
toiceberg
crate. When it's enabled, we will provide the backtrace if it's captured iniceberg::Error
.Are these changes tested?