pre icon indicating copy to clipboard operation
pre copied to clipboard

pre no longer compiles as of `nightly-2024-07-22`

Open aticu opened this issue 9 months ago • 0 comments

As mentioned by @dancrossnyc in #39, pre fails to build in the latest nightlies. After testing this seems to be the case since nightly-2024-07-22. The problem is that &'static str does not seem to be supported as a type for const generics anymore (possibly due to https://github.com/rust-lang/rust/pull/128020).

The nightly implementation of pre fundamentally relies on this ability. The simplest "fix" would be to disable nightly support in pre. This is a breaking change since some features (that also no longer work in recent nightlies) need the nightly support. Still this seems like the only actionable course right now. The steps required to do this would roughly be (from the top of my head, it's been a while since I've touched the code here):

  1. Fully disable checking for nightly versions in the build.rs (not emitting cargo:rustc-cfg=nightly should just fully disable nightly support)
  2. Optionally remove remnants that rely on cfg(nightly), since they are unreachable then
  3. Update tests and fix fallout
  4. Update version to 2.0.0 since this is a breaking change

Since it took over half a year for anyone to notice the problem, I don't see this as urgent. Unfortunately I will not have time to fix this in the foreseeable future. If anyone needs a fix for this before I get to it, feel free to post a PR following the steps I laid out above. I will probably have time to review a PR.

aticu avatar Apr 11 '25 21:04 aticu