Drop nightly requirement
This commit is contained in:
@@ -23,7 +23,7 @@ repository = "https://github.com/hakoerber/git-repo-manager"
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
# Required for `std::path::Path::is_symlink()`. Will be released with 1.57.
|
# Required for `std::path::Path::is_symlink()`. Will be released with 1.57.
|
||||||
rust-version = "1.57"
|
rust-version = "1.58"
|
||||||
|
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
|
|
||||||
|
|||||||
2
Justfile
2
Justfile
@@ -4,7 +4,7 @@ set shell := ["/bin/bash", "-c"]
|
|||||||
|
|
||||||
static_target := "x86_64-unknown-linux-musl"
|
static_target := "x86_64-unknown-linux-musl"
|
||||||
|
|
||||||
cargo := "cargo +nightly"
|
cargo := "cargo"
|
||||||
|
|
||||||
check: fmt-check lint test
|
check: fmt-check lint test
|
||||||
{{cargo}} check
|
{{cargo}} check
|
||||||
|
|||||||
@@ -93,15 +93,7 @@ for tier in ["dependencies", "dev-dependencies"]:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
cmd = subprocess.run(
|
cmd = subprocess.run(
|
||||||
[
|
["cargo", "update", "--offline", "--aggressive", "--package", name],
|
||||||
"cargo",
|
|
||||||
"update",
|
|
||||||
"-Z",
|
|
||||||
"no-index-update",
|
|
||||||
"--aggressive",
|
|
||||||
"--package",
|
|
||||||
name,
|
|
||||||
],
|
|
||||||
check=True,
|
check=True,
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=True,
|
text=True,
|
||||||
@@ -135,15 +127,7 @@ while True:
|
|||||||
spec = f"{package['name']}:{package['version']}"
|
spec = f"{package['name']}:{package['version']}"
|
||||||
try:
|
try:
|
||||||
cmd = subprocess.run(
|
cmd = subprocess.run(
|
||||||
[
|
["cargo", "update", "--offline", "--aggressive", "--package", spec],
|
||||||
"cargo",
|
|
||||||
"update",
|
|
||||||
"-Z",
|
|
||||||
"no-index-update",
|
|
||||||
"--aggressive",
|
|
||||||
"--package",
|
|
||||||
spec,
|
|
||||||
],
|
|
||||||
check=True,
|
check=True,
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=True,
|
text=True,
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Feature branches are not required, there are also changes happening directly on
|
|||||||
|
|
||||||
You will need the following tools:
|
You will need the following tools:
|
||||||
|
|
||||||
* Rust (obviously) (easiest via `rustup`), with the nightly toolchain
|
* Rust (obviously) (easiest via `rustup`)
|
||||||
* Python3
|
* Python3
|
||||||
* [`just`](https://github.com/casey/just), a command runner like `make`. See
|
* [`just`](https://github.com/casey/just), a command runner like `make`. See
|
||||||
[here](https://github.com/casey/just#installation) for installation
|
[here](https://github.com/casey/just#installation) for installation
|
||||||
@@ -52,18 +52,3 @@ mvdan.cc/sh/v3/cmd/shfmt@latest`, depending on your go build environment.
|
|||||||
|
|
||||||
For details about rustup and the toolchains, see [the installation
|
For details about rustup and the toolchains, see [the installation
|
||||||
section](./installation.md).
|
section](./installation.md).
|
||||||
|
|
||||||
## FAQ
|
|
||||||
|
|
||||||
### Why nightly?
|
|
||||||
|
|
||||||
For now, GRM requires the nightly toolchain for two reasons:
|
|
||||||
|
|
||||||
* [`io_error_more`](https://github.com/rust-lang/rust/issues/86442) to get
|
|
||||||
better error messages on IO errors
|
|
||||||
* [`const_option_ext`](https://github.com/rust-lang/rust/issues/91930) to have
|
|
||||||
static variables read from the environment that fall back to hard coded
|
|
||||||
defaults
|
|
||||||
|
|
||||||
Honestly, both of those are not really necessary or can be handled without
|
|
||||||
nightly. It's just that I'm using nightly anyway.
|
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Building GRM currently requires the nightly Rust toolchain. The easiest way is
|
Building GRM requires the Rust toolchain to be installed. The easiest way is
|
||||||
using [`rustup`](https://rustup.rs/). Make sure that rustup is properly
|
using [`rustup`](https://rustup.rs/). Make sure that rustup is properly
|
||||||
installed.
|
installed.
|
||||||
|
|
||||||
Make sure that the nightly toolchain is installed:
|
Make sure that the stable toolchain is installed:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ rustup toolchain install nightly
|
$ rustup toolchain install stable
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, install the build dependencies:
|
Then, install the build dependencies:
|
||||||
@@ -22,13 +22,13 @@ Then, install the build dependencies:
|
|||||||
Then, it's a simple command to install the latest stable version:
|
Then, it's a simple command to install the latest stable version:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cargo +nightly install git-repo-manager
|
$ cargo install git-repo-manager
|
||||||
```
|
```
|
||||||
|
|
||||||
If you're brave, you can also run the development build:
|
If you're brave, you can also run the development build:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cargo +nightly install --git https://github.com/hakoerber/git-repo-manager.git --branch develop
|
$ cargo install --git https://github.com/hakoerber/git-repo-manager.git --branch develop
|
||||||
```
|
```
|
||||||
|
|
||||||
## Static build
|
## Static build
|
||||||
@@ -47,11 +47,11 @@ need `musl` and a few other build dependencies installed installed:
|
|||||||
The, add the musl target via `rustup`:
|
The, add the musl target via `rustup`:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ rustup +nightly target add x86_64-unknown-linux-musl
|
$ rustup target add x86_64-unknown-linux-musl
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, use a modified build command to get a statically linked binary:
|
Then, use a modified build command to get a statically linked binary:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cargo +nightly install git-repo-manager --target x86_64-unknown-linux-musl --features=static-build
|
$ cargo install git-repo-manager --target x86_64-unknown-linux-musl --features=static-build
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly"
|
channel = "stable"
|
||||||
targets = ["x86_64-unknown-linux-musl"]
|
targets = ["x86_64-unknown-linux-musl"]
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#![feature(io_error_more)]
|
|
||||||
#![forbid(unsafe_code)]
|
#![forbid(unsafe_code)]
|
||||||
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|||||||
@@ -128,8 +128,6 @@ pub fn find_repo_paths(path: &Path) -> Result<Vec<PathBuf>, String> {
|
|||||||
"Failed to open \"{}\": {}",
|
"Failed to open \"{}\": {}",
|
||||||
&path.display(),
|
&path.display(),
|
||||||
match e.kind() {
|
match e.kind() {
|
||||||
std::io::ErrorKind::NotADirectory =>
|
|
||||||
String::from("directory expected, but path is not a directory"),
|
|
||||||
std::io::ErrorKind::NotFound => String::from("not found"),
|
std::io::ErrorKind::NotFound => String::from("not found"),
|
||||||
_ => format!("{:?}", e.kind()),
|
_ => format!("{:?}", e.kind()),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user