-
Notifications
You must be signed in to change notification settings - Fork 276
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
Bump MSRV to 1.56.1 #693
Bump MSRV to 1.56.1 #693
Conversation
Should also update clippy.toml and both READMEs. |
62d6469
to
795e960
Compare
As we have done in other parts of the ecosystem bump the MSRV to Rust `v1.56.1`. Done for `secp256k1` and `secp256k1-sys`.
795e960
to
a2b78f4
Compare
Ok, done properly now git grep '1\.48'
CHANGELOG.md:22: * Bump MSRV to 1.48 [#595](https://github.com/rust-bitcoin/rust-secp256k1/pull/595)
secp256k1-sys/CHANGELOG.md:17: * Bump MSRV to 1.48 [#595](https://github.com/rust-bitcoin/rust-secp256k1/pull/595) |
Heh, this breaks the vendoring script, which looks for patterns like The offending line is line 11 of secp256k1-sys/vendor-libsecp.sh which goes
We need to tighten this To save you time I asked the chatbot to do it, which gave me
which looks a lot more legit than my old code. |
The bot is way better at writing shell that we are - glad I don't depend on writing shell for a paycheck. |
Lol, yeah. Shell has gotta be the biggest area where I'm not even close to its skill (and don't want to be :P). |
We just added `rust-version = ` to the `secp256k1-sys` manifest, doing so causes a grep statement from the vendor script to match this line - we don't want that. Tighten up the grep statement by only matching on `version` at the start of the line.
Oh, but lol, I think in this case it still won't work. I think we need to change the initial |
The bot was wrong! I used |
Hah, jinx. |
Ha, real time chatting on github. |
jinx again |
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.
ACK 2d0c783
@@ -8,7 +8,7 @@ else | |||
SECP_VENDOR_GIT_ROOT="$(realpath "$SECP_VENDOR_GIT_ROOT")" | |||
fi | |||
SECP_SYS="$SECP_VENDOR_GIT_ROOT"/secp256k1-sys | |||
DEFAULT_VERSION_CODE=$(grep version "$SECP_SYS/Cargo.toml" | sed 's/\./_/g' | sed 's/.*"\(.*\)".*/\1/') | |||
DEFAULT_VERSION_CODE=$(grep "^version" "$SECP_SYS/Cargo.toml" | sed 's/\./_/g' | sed 's/.*"\(.*\)".*/\1/') |
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.
This is also wrong - toml allows leading whitespaces.
Just kidding. I mean it is strictly wrong but nobody cares.
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.
Would be nice if there were a tool like jq
but for TOML.
We could try using Nix, which has a fromTOML
builtin function, but I'd guess that most people do not want to maintain complicated logic in the Nix language, which combines laziness and dynamic typing in a truly impossible-to-read-or-debug way.
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.
I just realized, would it make sense to rewrite our scripts in Nushell? It can convert Toml and a bunch of other formats to its own structured data representation. So this line would be just let version = (open Cargo.toml | get package.version)
. Also it handles structured data and error much better than bash but it's not as annoying when launching external programs as Python is. Though one big downside is we'd need to keep tests which we want contributors to run in bash to not annoy them too much.
I tried it out a long time ago (and even contributed a bit) so don't remember it that much but I'd love to learn it properly. I also have a nushell script wrapping lncli
and converting string-encoded integers to normal integers (yes, they do that 🤦 ) if anyone is interested and I wanted to have a bitcoin-cli
wrapper too. (IDK if it encodes ints as strings but at least outputting structured data would be nice.)
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.
Sounds very interesting. I think I'd probably go Nix first, despite its shortcomings as a language, since it's a litte more mainstream (at least, within this project it is much more well-known). In Nix it's easy to hand off to bash and share code with bash.
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.
Maybe Nushell is more appealing to learn than Nix based on your complaints? :) I find Nushell very readable. It does have dynamic typing but it's at least strong typing and some commands know their types upfront IIRC so they can report error messages nicely.
As we have done in other parts of the ecosystem bump the MSRV to Rust
v1.56.1
.Done for
secp256k1
andsecp256k1-sys
.This was originally in #688 but there are too many things going on so here it is separately.