Skip to content

Releases: qryxip/cargo-equip

v0.20.1

06 Aug 12:14
d2e3279
Compare
Choose a tag to compare

Fixed

  • Fixed --exclude-atcoder-202301-crates. (#200)

    Previously, it was for the "7/3 freeze".

v0.20.0

06 Aug 07:12
5e323ef
Compare
Choose a tag to compare

Added

  • Added --exclude-atcoder-202301-crates. (#197)

            --exclude-atcoder-202301-crates               Alias for `--exclude {crates available on AtCoder 202301}`
  • Added --toolchain-for-proc-macro-srv. (#195)

            --toolchain-for-proc-macro-srv <TOOLCHAIN>    Toolchain for expanding procedural macros

Changed

  • Updated the embedded Rust Analyzer to 2023-07-31 (0.0.166). (#195)

    For Rust <1.64, --toolchain-for-proc-macro-srv is required for macro expansion.

    cargo +1.42.0 equip 2>&1 | tail -n 1
      Rust ≧1.64.0 is required for expanding procedural macros. Specify one with `--toolchain-for-proc-macro-srv`

    This update should fix the issue where macro expansion segfaults.

  • Renamed --toolchain to --toolchain-for-udeps. (#195)

    cargo equip --toolchain nightly
    warning: `--toolchain` was renamed to `--toolchain-for-udeps`
  • cargo-equip now warns for resolver = "2" and edition = "2015". (#196)

    Note that both has been unsupported.

    warning: Currently cargo-equip only support Feature Resovler v1, and may go search more crates than real Cargo does. Please watch https://github.com/qryxip/cargo-equip/issues/94
    warning: Rust 2015 is unsupported

Fixed

v0.19.0

26 Mar 13:45
57a4bb6
Compare
Choose a tag to compare

Added

Changed

  • Embedded rust-analyzer for expanding procedural macros. (#183)

    Previously, cargo-equip downloaded rust-analyzer(.exe) from GitHub Releases and used it.

  • Requires additional 1.48+ toolchain for compiling proc-macro crates when cargo-equip is used for an old toolchain such as 1.42. (#183)

    Previously, 1.47 was compatible.

Fixed

v0.18.1

23 Dec 17:45
10f84e1
Compare
Choose a tag to compare

Added

Fixed

  • Now outputs from lib/bin crates are checked without test flag. (#177)

    Previously, #[test]s without #[cfg(test)] are unintentionally checked.

  • Fixed a problem where file paths are not masked in the # License and Copyright Notices section. (#178 by @SGThr7)

v0.18.0

07 Sep 15:57
8258627
Compare
Choose a tag to compare

Added

  • Added --mod-path <MODULE_PATH> option. (#159)

    +        --mod-path <MODULE_PATH>           Expand the libraries to the module [default: crate::__cargo_equip]
  • Added --mine <DOMAIN_AND_USERNAME>... option. (#169)

    +        --mine <DOMAIN_AND_USERNAME>...
    +            Do not include license and copyright notices for the users.
    +
    +            Supported formats:
    +            * github.com/{username}
    +            * gitlab.com/{username}

Changed

  • Enabled running for a lib crate. (#156)

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

    cargo metadata --format-version 1 | jq -r .resolve.root | awk '{ print $1, $2 }'
    proconio 0.4.3cargo equip --minify libs --remove docs -o ./proconio.rs
  • Changed potition of the generated doc comment. (#161)

    -//! # Bundled libraries
    -//! ⋮
     use __cargo_equip::prelude::*;
    
     fn main() {}
    +/// # Bundled libraries
    +/// ⋮
     #[allow(unused)]
     mod __cargo_equip {
         // ⋮
     }
  • cargo-equip no longer uses package.authors to skip Copyright and License Notices. (#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+. (#163)

Fixed

  • #[macro_export]ed macros will remain in textual scope. (#170)

     #[macro_export]
    -macro_rules! hello {
    +macro_rules! /*hello*/__cargo_equip_macro_lib_hello {
         () => {
             ::std::println!("Hello!")
         };
     }
    +macro_rules!hello{($($tt:tt)*)=>(crate::__cargo_equip_macro_lib_hello!{$($tt)*})}
  • Improved the minification function. (#153, #157)

    -let _=| |();
    +let _=||();
  • (also applied to the previous versions unless --locked) Updated syn to v1.0.74. (#155)

    Now accepts dyn for<'a> Trait<'a>.

  • Enabled reading license files from git/path package sources. (#156)

    Previously cargo-equip reaches a todo!.

  • Now handles path dependencies correctly when checking an output. (#156, #166)

v0.17.0

03 Jul 19:28
d5a712e
Compare
Choose a tag to compare

Changed

  • Improved the help. (#143)

    Now you can read the detailed help with --help while cargo equip -h still prints a short and concise overview.

  • Changed the format. (#144)

    • Moved __bundled to __cargo_equip::crates.
    • Moved __bundled::*::__macros to __cargo_equip::macros.
    • Now creates __cargo_equip::prelude and glob-uses it instead of declaring __prelude_for_main_crate!.
    • Unified __bundled::*::{__external_local_inner_macros, __pseudo_extern_prelude} into __cargo_equip::preludes.
    //! # Bundled libraries
    //! ︙
    
    pub use __cargo_equip::prelude::*;
    
    // ︙
    
    // The following code was expanded by `cargo-equip`.
    
    mod __cargo_equip {
        pub(crate) mod crates {/* … */}
        pub(crate) mod macros {/* … */}
        pub(crate) mod prelude {/* … */}
        mod preludes {/* … */}
    }
    
    #[cfg_attr(any(), rustfmt::skip)]
    const _: () = {
        // ︙
    };
  • Updated rust-analyzer to 2021-06-28. (#145)

v0.16.0

26 Jun 10:06
82c5f4c
Compare
Choose a tag to compare

Changed

  • --resolve-cfgs --rustfmt --check by default. (#139)

    Instead, added --no-resolve-cfgs, --no-rustfmt, and --no-check.

    cargo-equip --resolve-cfgs --rustfmt --check
    warning: `--resolve-cfgs` is deprecated. `#[cfg(..)]`s are resolved by default
    warning: `--rustfmt` is deprecated. the output is formatted by default
    warning: `--check` is deprecated. the output is checked by default
  • Removed the warning message for pub(crate) in libraries. (#138)

  • Updated --exclude-{atcoder, codingame}-crates. (#140)

    Added …#proconio:0.3.8 to --exclude-atcoder-crates.

  • Updated rust-analyzer to 2021-06-21. (#141)

v0.15.0

11 Jun 16:30
06470bd
Compare
Choose a tag to compare

Changed

  • cargo-equip now inserts #[allow(unused_imports)] for only seemingly procedural macros.

    use proconio::{fastout, input};

    use proconio::{/*fastout,*/ input};
    #[allow(unused_imports)]
    use proconio::fastout;

v0.14.0

06 Jun 08:16
3be2f9b
Compare
Choose a tag to compare

Added

  • Scopes for macros are now preserved. (#126)

    Now you can use macros anywhere.

    use proconio::input;
    
    fn main() {
        input! {
            n: usize,
        }
    }
  • Dummy macros are now expanded for proc-macro crates. (#126)

    Now you can also use procedural macros.

    use proconio::fastout;
    
    #[fastout]
    fn main() {
        println!("Hi");
    }
  • Now #[[warn/deny/forbid](missing-(crate-level-)docs)] attributes are removed when --remove docs is enabled. (#126)

    Now you can remove doc comments from smallvec.

  • Modules in main crates are now supported. (#129)

    mod sub {
        use smallvec::{smallvec, SmallVec};
    
        pub(crate) fn f() {
            let _: SmallVec<[(); 0]> = smallvec![];
        }
    }

Changed

  • Dropped the support for Rust 2015. (#126)

  • #[allow(unused_imports)] will be always inserted. (#126)

  • Updated rust-analyzer to 2021-05-31. (#130)

Fixed

v0.13.1

22 May 18:01
d621a8f
Compare
Choose a tag to compare

Fixed