Skip to content

Commit

Permalink
Release v0.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Sep 7, 2021
1 parent 21ba4b1 commit 8258627
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 52 deletions.
20 changes: 10 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

### Added

- Added `--mod-path <MODULE_PATH>` option.
- Added `--mod-path <MODULE_PATH>` option. ([#159](https://github.com/qryxip/cargo-equip/pull/159))

```diff
+ --mod-path <MODULE_PATH> Expand the libraries to the module [default: crate::__cargo_equip]
```

- Added `--mine <DOMAIN_AND_USERNAME>...` option.
- Added `--mine <DOMAIN_AND_USERNAME>...` option. ([#169](https://github.com/qryxip/cargo-equip/pull/169))

```diff
+ --mine <DOMAIN_AND_USERNAME>...
Expand All @@ -23,7 +23,7 @@

### Changed

- Enabled running for a `lib` crate.
- Enabled running for a `lib` crate. ([#156](https://github.com/qryxip/cargo-equip/pull/156))

Now you can easily produce standalone Rust source files like `my_library.rs`.

Expand All @@ -33,7 +33,7 @@
❯ cargo equip --minify libs --remove docs -o ./proconio.rs
```

- Changed potition of the generated doc comment.
- Changed potition of the generated doc comment. ([#161](https://github.com/qryxip/cargo-equip/pull/161))

```diff
-//! # Bundled libraries
Expand All @@ -49,15 +49,15 @@
}
```

- cargo-equip no longer uses [`package.authors`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-authors-field) to skip Copyright and License Notices.
- cargo-equip no longer uses [`package.authors`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-authors-field) to skip Copyright and License Notices. ([#164](https://github.com/qryxip/cargo-equip/pull/164))

Instead, add `--mine github.com/your-username` to the arguments.

- Now uses rust-analyzer `2021-07-12` for Rust 1.47 and `2021-08-09` for Rust 1.48+.
- Now uses rust-analyzer `2021-07-12` for Rust 1.47 and `2021-08-09` for Rust 1.48+. ([#163](https://github.com/qryxip/cargo-equip/pull/163))

### Fixed

- `#[macro_export]`ed macros will remain in [textual scope](https://doc.rust-lang.org/reference/macros-by-example.html#textual-scope).
- `#[macro_export]`ed macros will remain in [textual scope](https://doc.rust-lang.org/reference/macros-by-example.html#textual-scope). ([#170](https://github.com/qryxip/cargo-equip/pull/170))

```diff
#[macro_export]
Expand All @@ -70,7 +70,7 @@
+macro_rules!hello{($($tt:tt)*)=>(crate::__cargo_equip_macro_lib_hello!{$($tt)*})}
```

- Improved the minification function. ([#153](https://github.com/qryxip/cargo-equip/pull/153))
- Improved the minification function. ([#153](https://github.com/qryxip/cargo-equip/pull/153), [#157](https://github.com/qryxip/cargo-equip/pull/157))

```diff
-let _=| |();
Expand All @@ -81,11 +81,11 @@

[Now accepts `dyn for<'a> Trait<'a>`](https://github.com/dtolnay/syn/pull/1042).

- Enabled reading license files from `git`/`path` package sources.
- Enabled reading license files from `git`/`path` package sources. ([#156](https://github.com/qryxip/cargo-equip/pull/156))

Previously cargo-equip reaches a `todo!`.

- Now handles `path` dependencies correctly when checking an output.
- Now handles `path` dependencies correctly when checking an output. ([#156](https://github.com/qryxip/cargo-equip/pull/156), [#166](https://github.com/qryxip/cargo-equip/pull/166))

## [0.17.0] - 2021-07-03Z

Expand Down
34 changes: 17 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-equip"
version = "0.17.0"
version = "0.18.0"
edition = "2018"
license = "MIT OR Apache-2.0"
description = "A Cargo subcommand to bundle your code into one `.rs` file for competitive programming."
Expand All @@ -26,7 +26,7 @@ maplit = "1.0.2"
once_cell = "1.8.0"
petgraph = "0.6.0"
prettytable-rs = "0.8.0"
proc-macro2 = { version = "1.0.28", features = ["span-locations"] }
proc-macro2 = { version = "1.0.29", features = ["span-locations"] }
quote = "1.0.9"
rand = "0.8.4"
rustminify = "0.1.0"
Expand All @@ -36,13 +36,13 @@ serde_json = "1.0.67"
shell-escape = "0.1.5"
smol_str = { version = "0.1.18", features = ["serde"] }
spdx = "0.6.0"
structopt = "0.3.22"
syn = { version = "1.0.75", features = ["extra-traits", "full", "parsing", "visit"] }
structopt = "0.3.23"
syn = { version = "1.0.76", features = ["extra-traits", "full", "parsing", "visit"] }
tempfile = "3.2.0"
termcolor = "1.1.2"
toml_edit = "0.2.1"
which = "4.2.2"
xshell = "0.1.14"
xshell = "0.1.17"

[dev-dependencies]
assert_cmd = "2.0.0"
Expand Down
19 changes: 9 additions & 10 deletions README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ mod sub {
> --bin sqrt_mod `# binクレートを指定` | xsel -b
```

[Submit Info #52332 - Library-Checker](https://judge.yosupo.jp/submission/52332)
[Submit Info #59239 - Library-Checker](https://judge.yosupo.jp/submission/59239)

## 動作するクレート

Expand Down Expand Up @@ -220,25 +220,20 @@ ac-library-rs-parted-twosat = { git = "https://github.com/qryxip/ac-library
ライブラリ同様にglob importを挿入します。

```rust
crate::__cargo_equip::prelude_for!(crate);
pub use __cargo_equip::prelude::*;

mod sub {
crate::__cargo_equip::prelude_for!(crate);
}
//

pub mod __cargo_equip {
pub mod crates {
//
}
//

macro_rules! prelude_for {
(crate) => (pub use crate::__cargo_equip::crates::*);
pub(crate) prelude {
pub use crate::__cargo_equip::crates::*;
}
pub(crate) use prelude_for;
}
#[macro_export]
macro_rules! __prelude_for_main_crate(() => (pub use crate::__bundled::*;));
```

```rust
Expand All @@ -265,6 +260,7 @@ fn main() -> _ {
cargo equip --bin "$name"
```

<!--
コードはこのように展開されます。
`extern_crate_name`が`bin`/`example`側から与えられていないクレートは`__package_name_0_1_0`のような名前が与えられます。
Expand Down Expand Up @@ -376,6 +372,7 @@ const _: () = {
#[macro_export] macro_rules! __macro_def_input_input(/* … */);
};
```
-->

## `#[cfg(…)]`の解決

Expand Down Expand Up @@ -449,6 +446,7 @@ fn fib(n: i64) -> i64 {
}
```

<!--
<details>
Expand Down Expand Up @@ -579,6 +577,7 @@ const _: () = {
```
</details>
-->

- `rust-analyzer(.exe)`は自動でダウンロードされます。
- `proc-macro`クレートは1.47.0以上のRustでコンパイルされる必要があります。
Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ mod sub {
> --bin sqrt_mod `# Specify the bin crate` | xsel -b
```

[Submit Info #52332 - Library-Checker](https://judge.yosupo.jp/submission/52332)
[Submit Info #59239 - Library-Checker](https://judge.yosupo.jp/submission/59239)

## Works With

Expand Down Expand Up @@ -211,25 +211,20 @@ The constraints for `bin`s/`example`s are:
cargo-equip also inserts glob imports as it does into libraries.

```rust
crate::__cargo_equip::prelude_for!(crate);
pub use __cargo_equip::prelude::*;

mod sub {
crate::__cargo_equip::prelude_for!(crate);
}
//

pub mod __cargo_equip {
pub mod crates {
//
}
//

macro_rules! prelude_for {
(crate) => (pub use crate::__cargo_equip::crates::*);
pub(crate) prelude {
pub use crate::__cargo_equip::crates::*;
}
pub(crate) use prelude_for;
}
#[macro_export]
macro_rules! __prelude_for_main_crate(() => (pub use crate::__bundled::*;));
```

```rust
Expand All @@ -253,6 +248,7 @@ Then execute `cargo-equip`.
cargo equip --bin "$name"
```

<!--
cargo-equip outputs code like this.
It gives tentative `extern_crate_name`s like `__package_name_0_1_0` to dependencies of the dependencies.
Expand Down Expand Up @@ -364,6 +360,7 @@ const _: () = {
#[macro_export] macro_rules! __macro_def_input_input(/* … */);
};
```
-->

## Resolving `#[cfg(…)]`

Expand Down Expand Up @@ -437,6 +434,7 @@ fn fib(n: i64) -> i64 {
}
```

<!--
<details>
Expand Down Expand Up @@ -567,6 +565,7 @@ const _: () = {
```
</details>
-->

- `rust-analyzer(.exe)` is automatically downloaded.
- `proc-macro` crates need to be compile with Rust 1.47.0+.
Expand Down

0 comments on commit 8258627

Please sign in to comment.