Ns/versionize clean#1326
Conversation
f444677 to
2c36486
Compare
d4d7ea2 to
102815c
Compare
10cccb0 to
c365b14
Compare
c365b14 to
935b754
Compare
IceTDrinker
left a comment
There was a problem hiding this comment.
Haven't checked the lint tool for now
| .PHONY: install_tfhe_lints # Install custom tfhe-rs lints | ||
| install_tfhe_lints: | ||
| (cd utils/cargo-tfhe-lints-inner && cargo install --path .) && \ | ||
| cd utils/cargo-tfhe-lints && cargo install --path . |
There was a problem hiding this comment.
does it try to reinstall everytime ? My main question here being that if the tool gets updated does the install step try to update the already installed tool ?
Alternatively is the installation mandatory or could it be run as a standalone executable maybe ?
Separate question: does it require a dedicated toolchain as was shown in the tutorial ?
There was a problem hiding this comment.
Yes this is reinstalled every times but if its code did not change it is instant.
For the moment I don't think it can be run as a standalone tool because of the way the command line arguments are parsed: let tool_args = std::env::args().skip(2).collect::<Vec<_>>();.
This assumes that the command is invoked with cargo tfhe-lints [args] and will not work with ./target/carg-tfhe-lints [args].
Yes it needs a specific toolchain which is the one used by rustc-tools. The toolchain is specified in the toolchain.txt. Only the cargo-tfhe-lints-inner tool needs this, I should remove the toolchain.txt in cargo-tfhe-lints.
| integer_key: self.key.versionize_owned(), | ||
| integer_key: (*self.key).clone().versionize_owned(), |
There was a problem hiding this comment.
I'm confused here, why the clone ?
There was a problem hiding this comment.
self.key is wrapped in an Arc here. So I have to extract the inner type to call versionize_owned. MSRV for the tfhe crate is 1.75 so I cannot use this: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.unwrap_or_clone
There was a problem hiding this comment.
However I should at least impl<T: Versionize> Versionize for Arc<T> in tfhe-versionable I think
There was a problem hiding this comment.
you are allowed to bump the version and you can do the impl if you want to as well
There was a problem hiding this comment.
if you don't need the MSRV bump then don't bump
There was a problem hiding this comment.
I added the impl for Arc, this simplifies the code in tfhe since the manual impl is not needed anymore.
I also updated the MSRV.
cf2b141 to
1aced21
Compare
4787b94 to
fbda08e
Compare
fbda08e to
208f69f
Compare
IceTDrinker
left a comment
There was a problem hiding this comment.
Thanks a lot for your patience and thorough corrections !
For the generated code
BREAKING CHANGE: `versionize_owned` now takes its argument by value.
BREAKING CHANGE: The `Upgrade` trait now requires to specify the Error type as an associated type (similar to `TryFrom`)
208f69f to
61aeb93
Compare
closes: please link all relevant issues
PR content/description
Various small improvements for the versioning feature. The main ones are:
serialize_ownedmethod now takes an owned value. This reduces the number of clone needed for serializationCheck-list: