AMythicDev / minus

An asynchronous, runtime data feedable terminal paging library for Rust
https://crates.io/crates/minus/
Apache License 2.0
317 stars 23 forks source link

Adding rust-toolchain and improve flake #112

Closed TornaxO7 closed 9 months ago

TornaxO7 commented 9 months ago

I'd be happy if this could be merged, because that would help nix users to contribute faster.

AMythicDev commented 9 months ago

This is fine. However I think it would be better if I it was possible to setup a devShell with the current Rust version. So if you can introduce the necessary changes, that should be all for this PR.

TornaxO7 commented 9 months ago

This is fine. However I think it would be better if I it was possible to setup a devShell with the current Rust version. So if you can introduce the necessary changes, that should be all for this PR.

hm... but you wrote in the README that the MSRV is set to 1.67.0 so using the tools with this version should be better to ensure we don't use features in the latest stable release which don't exist in 1.67.0.

AMythicDev commented 9 months ago

Sorry for the bad wording. Actually I meant both the msrv and the latest stable/nightly whichever is good.

AMythicDev commented 9 months ago

Ok. I think nightly should be the other varient of devShell.

TornaxO7 commented 9 months ago

Sorry for the bad wording. Actually I meant both the msrv and the latest stable/nightly whichever is good.

so you mean, that there should be multiple dev shells:

AMythicDev commented 9 months ago

I think we are good with just msrv and nightly.

AMythicDev commented 9 months ago

@TornaxO7 Can I get this completed by today so that I can merge it?

TornaxO7 commented 9 months ago

Aye! I'll be home soon

TornaxO7 commented 9 months ago

@arijit79 updated

AMythicDev commented 9 months ago

Merged

AMythicDev commented 9 months ago

Huh! I actually merged this without going for the CI and now the main branch fails in CI probably because the ci workflow action must be taking the rust-*-toolchain.toml files into consideration.

In my opinion it's better if we just specify the rust version and msrv in the nix files and roll that up rather than having multiple rust-*-toolchain.toml files. What do you say?

TornaxO7 commented 9 months ago

hm... tbh. I'd really like to stick to only one rust-toolchain.toml file which includes the msrv since this includes the necessary tools which should be supported.

AMythicDev commented 9 months ago

I too think so. But I kinda didn't get the idea of explicitly writing the tools like rust-analyzer that one should use to build minus. Like I know a lot of people use VSCode's version of rust-analyzer which although is similar to the original rust-analyzer but has a few patches here and there to better integrate it with all the environments in which VSCode runs.

Another reason for rust-analyzer I know of is that it's a bit weird on NixOS systems. On NixOS, if you use the official rust packages or the oxallica overlay and use the official rust-analyzer, it gives a segfault. And hence you need to do a lot of hacks to get the latest version of rust-analyzer on NixOS. This is part of the reason why I switched from NixOS to fedora. (The other reason being that I switched to a laptop for work :-) but still use NixOS on my PC).

TornaxO7 commented 9 months ago

Another reason for rust-analyzer I know of is that it's a bit weird on NixOS systems. On NixOS, if you use the official rust packages or the oxallica overlay and use the official rust-analyzer, it gives a segfault.

That's the reason why rust-analyzer is added as a component there by the flake! It also resolves a proc-macro error for my editor (helix) :)