-
Notifications
You must be signed in to change notification settings - Fork 303
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
Chore/improve version checking #613
Chore/improve version checking #613
Conversation
It's far from being ready but I have a question @fzyzcjy : some methods return a |
Totally agree! The original (very old) version was a command line app so it used anyhow, and later we added support such that it can be used as a lib, so the thiserror is used as well. Mixing the two does not sound wise. I guess most libraries (not applications) use thiserror? So we should stick to it as well. But seems that thiserror does not have good support about backtraces... |
Yeah this is not an easy pick especially that I would like to avoid refactoring too much bits. impl From<anyhow::Error> for Error {
fn from(e: anyhow::Error) -> Self {
if let Some(e) = e.downcast_ref::<Error>() {
return e.clone();
}
Error::StringError(e.to_string())
}
} |
So far this PR will ensure that a dependency e.g.
I have the feeling that semver_constraints crate could allow to improve the logic by checking directly in Should we go step by step and review / maybe merge this one first ? @fzyzcjy |
The logic in this PR already looks quite good to me, and I am ready to briefly review and then merge it. Good job! In my humble opinion, I guess it may also be a great choice to have a look at some other issues (feature requests / bugs), compared with further improving this version checking in future PRs. |
utterly agree ^^ |
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.
Neat code :) Only some nits and I am ready to merge it
🎉 |
This PR aims at improving version checking for frb_codegen.
It follows up this discussion on former PR.
Checklist
./frb_example/pure_dart
example, more specifically,rust/src/api.rs
anddart/lib/main.dart
../book
folder) are updated.Remark: If the PR is submitted but I do not reply for a few days, maybe I just did not see it, so please ping me.