Figuring out something to do about the manually sync'd RUSTLS_CRATE_VERSION constant in build.rs has been on my mind for a while.
As explained in the new build.rs comment I was originally thinking about populating the const automatically, but I decided against that because it seemed like it would require brittle by-hand parsing, or taking a new dep (unfortunately, it can't be a development dependency if used in build.rs). Both seemed like bad options so I landed on adding an integration test to catch if we forget to update the constant. This has the added advantage of also replacing an existing looser unit test with one that matches the full expected value from rustls_version() without adding any new hardcoded constants to maintain.
Figuring out something to do about the manually sync'd
RUSTLS_CRATE_VERSION
constant inbuild.rs
has been on my mind for a while.As explained in the new
build.rs
comment I was originally thinking about populating theconst
automatically, but I decided against that because it seemed like it would require brittle by-hand parsing, or taking a new dep (unfortunately, it can't be a development dependency if used inbuild.rs
). Both seemed like bad options so I landed on adding an integration test to catch if we forget to update the constant. This has the added advantage of also replacing an existing looser unit test with one that matches the full expected value fromrustls_version()
without adding any new hardcoded constants to maintain.