Closed doxblek closed 1 year ago
I honestly don't think tools like cbindgen
should go ahead and install / update toolchains. I think providing a nice error message if the nightly toolchain is not used and/or not installed would be preferable. (But I'm not a maintainer here, just someone passing by )
I honestly don't think tools like
cbindgen
should go ahead and install / update toolchains. I think providing a nice error message if the nightly toolchain is not used and/or not installed would be preferable. (But I'm not a maintainer here, just someone passing by )
I think you are right. Probably it is better to switch to the nightly toolchain but not installing it automatically if it is missing. Along with a descriptive error message in case the toolchain is not installed to guide the user to install it on their own, this might be a good solution.
Could any maintainer give me feedback on that? Then I would update my PR accordingly
Yeah, also assuming rustup
exists is ok for dev machines, but not more generally. I think using nightly needs to be an explicit action on the user, so I think the code as-is is probably fine.
You can trivially use:
CARGO=$(rustup +nightly which cargo) cbindgen
I've submitted an alternative to this PR #818
Yeah, I don't think we want either. There are various ways of making -Zpretty=expanded
but we don't want to make people accidentally rely on them. This can be done on the caller quite easily if they want.
resolves https://github.com/eqrion/cbindgen/issues/812
See the attached issue