From cde4d0f1fb8993cd9f5fe029f63b420a9f47d894 Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Thu, 16 Mar 2023 21:26:56 -0400 Subject: [PATCH] v0.1.0 --- .github/workflows/release.yml | 4 ++-- .gitignore | 2 ++ Cargo.lock | 7 ++++--- Cargo.toml | 4 ++-- README.md | 13 ++++++++----- src/main.rs | 4 ++-- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 17cd04d..dc43bc6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,7 +46,7 @@ jobs: PUSH: ${{ startsWith(github.ref, 'refs/tags/v') }} run: | if [[ ${PUSH} == true ]]; then - cargo publish --token ${CRATES_IO_TOKEN} -p "${pkg}" + cargo publish --token ${CRATES_IO_TOKEN} else - cargo publish --dry-run --token ${CRATES_IO_TOKEN} -p "${pkg}" + cargo publish --dry-run --token ${CRATES_IO_TOKEN} fi diff --git a/.gitignore b/.gitignore index d4b51c9..9977ae3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ /target +# Binary, created in release workflow +icemelter shell.nix .envrc diff --git a/Cargo.lock b/Cargo.lock index b5e5d60..314a445 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -135,7 +135,7 @@ checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" [[package]] name = "icemelter" -version = "0.0.0" +version = "0.1.0" dependencies = [ "anyhow", "clap", @@ -580,8 +580,9 @@ dependencies = [ [[package]] name = "treereduce" -version = "0.1.0" -source = "git+https://github.com/langston-barrett/treereduce#ca1964aeded5463ea6e7cf369815c66084dec405" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9da25532a7b94cffe84824cfc6c3481f74fb1fed3880b301b93883428c63c1ee" dependencies = [ "log", "regex", diff --git a/Cargo.toml b/Cargo.toml index 6131804..78037c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "icemelter" -version = "0.0.0" +version = "0.1.0" description = "Tool to minimize files that trigger internal compiler errors (ICEs)" keywords = ["ice", "rustc"] edition = "2021" @@ -22,4 +22,4 @@ tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["json"] } tree-sitter = "0.20" tree-sitter-rust = "0.20" -treereduce = { git = "https://github.com/langston-barrett/treereduce" } +treereduce = "0.2" diff --git a/README.md b/README.md index 70ccb56..ba47c9b 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,14 @@ errors (ICEs). ## WIP -Icemelter is a work in progress! These following things should get done before -it's ready to use: +Icemelter is a work in progress! It can already effectively minimize ICEs, but +these things should get done before it's ready for widespread use: - [x] Match `internal compiler error:` on stderr by default - [ ] Avoid introducing new syntax/type/scope errors - [ ] Logging - [ ] More docs +- [ ] `--fast` flag ## Usage @@ -31,6 +32,8 @@ Here's an example that uses a different compiler and adds a flag: icemelter ice.rs -- rustc +nightly --crate-type=lib ``` +For more options, see `--help`. + ## Installation ### From a release @@ -44,7 +47,7 @@ Rust compiler and the [Cargo][cargo] build tool. [rustup][rustup] makes it very easy to obtain these. Then, to install the reducer for the language ``, run: -``` +```sh cargo install icemelter ``` @@ -55,14 +58,14 @@ This will install binaries in `~/.cargo/bin` by default. To build from source, you'll need the Rust compiler and the [Cargo][cargo] build tool. [rustup][rustup] makes it very easy to obtain these. Then, get the source: -```bash +```sh git clone https://github.com/langston-barrett/icemelter cd icemelter ``` Finally, build everything: -```bash +```sh cargo build --release ``` diff --git a/src/main.rs b/src/main.rs index 0344cd5..14571e8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -147,10 +147,10 @@ pub fn main() -> Result<()> { Config { check: chk, jobs: args.jobs, - min_reduction: 2, + min_reduction: 1, replacements: HashMap::new(), }, - Some(8), + None, // max passes ) { Err(e) => eprintln!("Failed to reduce! {e}"), Ok((reduced, _)) => {