Skip to content

Latest commit

 

History

History
849 lines (574 loc) · 28.1 KB

CHANGELOG.md

File metadata and controls

849 lines (574 loc) · 28.1 KB

Changelog

[0.10.7] - 2024-06-08Z

Changed

  • For ABC cargo-compete no longer extract time limits and the relative/absolute errors, because they are not "specific integers or strings". (qryxip/snowchains#164)

[0.10.6] - 2023-08-13Z

Changed

  • Reworked the submit configuration. (#205)

    submit.transpile still works but is deprecated.

    [submit]
    kind = "file"
    path = "{{ src_path }}"
    language_id = "5054" # Atcoder 202301
    [submit]
    kind = "command"
    args = ["cargo", "+1.70.0", "equip", "--exclude-atcoder-202301-crates", "--remove", "docs", "--minify", "libs", "--bin", "{{ bin_name }}"]
    language_id = "5054" # Atcoder 202301

    Now the default of submit is:

    [submit]
    kind = "file"
    path = "{{ src_path }}"
    language_id = "4050" # AtCoder 202004

    For today's AGC064, you have to:

    • Update compete.toml:
      • template.new.edition
      • template.new.dependencies
      • test.toolchain
      • submit (as above. note that you also have to write language_id = "5054")
    • Update template-cargo-lock.toml

    before cargo compete new.

    Refer to rust-lang-ja/atcoder-proposal@202301-update-2023-07-17-freeze. This repository should be used in the real AtCoder judge system.

[0.10.5] - 2023-08-12Z

Fixed

[0.10.4] - 2022-02-19Z

Fixed

  • Fixed the problem where test files are mixed up for recent ABC. (#186 by @aoriso)

[0.10.3] - 2022-01-29Z

Fixed

[0.10.2] - 2021-12-15Z

Changed

  • (also applied to the previous versions unless --locked) Updated serde-yaml crate to v0.8.23.

     match:
       Float:
    -    relative_error: 0.000001
    -    absolute_error: 0.000001
    +    relative_error: 1e-6
    +    absolute_error: 1e-6

    dtolnay/serde-yaml@6b83603

Fixed

  • Updated Rust edition, Rust version, and the language ID for Codeforces. (#181 by @nebocco)

[0.10.1] - 2021-12-09Z

Fixed

[0.10.0] - 2021-11-06Z

Added

  • Added template.new.edition field. (#175)

    # `edition` for `Cargo.toml`.
    edition = "2018"
  • Added test.toolchain field. (#173)

    # Toolchain for the test. (optional)
    toolchain = "1.42.0"

Changed

  • cargo compete init no longer generate rust-toolchains. (#173)

Fixed

  • Updated the Rust versions for cargo compete init. (#175)

  • Inserts a newline between bin and dependencies. (#175)

     [[bin]]
     name = "practice-b"
     path = "src/bin/b.rs"
    +
     [dependencies]

[0.9.1] - 2021-09-21Z

Fixed

  • When using oj-api, prioritize alphabets from get-contest over ones from get-problem. (#166 by @bouzuya)

    Now you can use cargo-compete for AtCoder Problems.

[0.9.0] - 2021-03-31Z

Added

  • Added template.new.dev-dependencies. (#152)

    profile = '''
    [dev]
    opt-level = 3
    '''
    [template.new]
    dependencies = '''
    proconio = "0.3.7"
    '''
    dev-dependencies = '''
    atcoder-202004-lock = { git = "https://github.com/qryxip/atcoder-202004-lock" }
    '''
  • Enabled running for example targets. (#157)

    [package.metadata.cargo-compete.example]
    atcoder-abc188-a = { problem = "https://atcoder.jp/contests/abc188/tasks/abc188_a" }
  • Added add.target-kind configuration. (#157)

Changed

  • Modified the template for the init command. (#156)

     #[submit.transpile]
     #kind = "command"
    -#args = ["cargo", "equip", "--resolve-cfgs", "--remove", "docs", "--minify", "libs", "--rustfmt", "--check", "--bin", "{{ bin_name }}"]
    +#args = ["cargo", "equip", "--exclude-atcoder-crates", "--resolve-cfgs", "--remove", "docs", "--minify", "libs", "--rustfmt", "--check", "--bin", "{{ bin_name }}"]
     ##language_id = ""
  • Updated rust-toolchains for Codeforces and yukicoder. (#153)

  • Now download command requires --overwrite flag to overwrite existing test files. (#158)

    cargo compete d
    error: `/home/ryo/src/local/competitive/atcoder/arc115/testcases/a.yml` already exists. run with `--overwrite` to overwritecargo compete d --overwrite
           Saved 2 test cases to /home/ryo/src/local/competitive/atcoder/arc115/testcases/{a.yml, a/}
           Saved 2 test cases to /home/ryo/src/local/competitive/atcoder/arc115/testcases/{b.yml, b/}
           Saved 1 test case to /home/ryo/src/local/competitive/atcoder/arc115/testcases/{c.yml, c/}
           Saved 2 test cases to /home/ryo/src/local/competitive/atcoder/arc115/testcases/{d.yml, d/}
           Saved 2 test cases to /home/ryo/src/local/competitive/atcoder/arc115/testcases/{e.yml, e/}
           Saved 5 test cases to /home/ryo/src/local/competitive/atcoder/arc115/testcases/{f.yml, f/}

[0.8.8] - 2021-03-10Z

Added

[0.8.7] - 2021-02-26Z

Changed

  • Made Extend::SystemTestCases.problem optional. (#qryxip/snowchains#133, #141)

     extend:
       - type: SystemTestCases
    -    problem: https://atcoder.jp/contests/agc001/tasks/agc001_a

Fixed

[0.8.6] - 2021-02-25Z

Added

  • Added SystemTestCases variant to extend in test suite files. (qryxip/snowchains#131, #138)

    System test cases are stored under { cache directory }/cargo-compete/system-test-cases. They are automatically downloaded if missing when testing code.

    extend:
      - type: SystemTestCases
        problem: "https://atcoder.jp/contests/abc191/tasks/abc191_a"

Changed

  • cargo compete test command without --full option will append { type: Text, ... } to extend and will create empty in and out directories. (#138)

    cargo compete n arc110 --problems a
        Created `arc110` package at /home/ryo/src/competitive/atcoder/./arc110
        Saved 2 test cases to /home/ryo/src/competitive/atcoder/./arc110/testcases/{a.yml, a/}tree ./arc110/testcases
    ./arc110/testcases
    ├── a
    │   ├── in
    │   └── out
    └── a.yml
    
    3 directories, 1 file
    ---
    type: Batch
    timelimit: 2s
    match: Lines
    
    cases:
      - name: sample1
        in: |
          3
        out: |
          7
      - name: sample2
        in: |
          10
        out: |
          39916801
    
    extend:
      - type: Text
        path: "./a"
        in: /in/*.txt
        out: /out/*.txt
  • SystemTestCases will be used for --full option. (#138)

Fixed

  • Fixed a problem where cargo compete download command saves nothing. (#139)

[0.8.5] - 2021-02-23Z

Fixed

[0.8.4] - 2021-02-19Z

Added

  • Added template field to compete.toml.

    [template]
    src = '''
    fn main() {
        todo!();
    }
    '''
    
    [template.new]
    profile = '''
    [dev]
    opt-level = 3
    '''
    dependencies = '''
    proconio = { version = "=0.3.6", features = ["derive"] }
    # ...
    '''
    
    [template.new.copy-files]
    "./template-cargo-lock.toml" = "Cargo.lock"
  • Made new and new.template optional.

Deprecated

  • Deprecated the new.template config.

    Use template instead.

Fixed

[0.8.3] - 2021-02-18Z

Added

  • cargo-compete now reads these environment variables if they exist, and use them. (#129)

    • $DROPBOX_ACCESS_TOKEN
    • $YUKICODER_API_KEY
    • $CODEFORCES_API_KEY
    • $CODEFORCES_API_SECRET

Fixed

  • Added #[serde(default)] to PartialBatchTestCase::out: Option<Arc<str>>. (qryxip/snowchains/#128)

    Previously, explicit out: ~ had been allowed but the field itself was required.

[0.8.2] - 2021-02-15Z

Added

  • Added Checker variant to Match. (qryxip/snowchains#124)

    match:
      Checker:
        cmd: cat "$ACTUAL_OUTPUT" | cargo run --bin check-a
        shell: Bash
    match:
      Checker:
        cmd: ~/.cache/online-judge-tools/library-checker-problems/math/sqrt_mod/checker "$INPUT" "$ACTUAL_OUTPUT" "$EXPECTED_OUTPUT"
        shell: Bash

[0.8.1] - 2021-02-14Z

Fixed

  • Added a workaround for large process input/output. (qryxip/snowchains#121)

  • Fixed a problem where string values in YAMLs are unnecessarily quoted. (qryxip/snowchains#121)

    This problem was caused by a change in serde-yaml v0.8.16, which was released in February 2, 2021.

[0.8.0] - 2021-01-24Z

Added

  • Added add command. (#114)

    # for Library-Checker
    [add]
    url = "https://judge.yosupo.jp/problem/{{ args[0] }}"
    #is-contest = ["false"] # optional
    bin-name = '{{ args[0] }}'
    #bin-alias = '{{ args[0] }}' # optional
    #bin-src-path = './src/bin/{{ bin_alias }}.rs' # optional
    cargo compete a --full many_aplusb
        Running `/home/ryo/tools/python/3.8.6/oj/bin/oj-api get-problem 'https://judge.yosupo.jp/problem/many_aplusb' --system` in /home/ryo/src/competitive/library-checker
        Added `many_aplusb` (bin) for https://judge.yosupo.jp/problem/many_aplusb
        Saved 7 test cases to /home/ryo/src/competitive/library-checker/testcases/{many_aplusb.yml, many_aplusb/}
    # for yukicoder
    [add]
    url = '{% case args[0] %}{% when "contest" %}https://yukicoder.me/contests/{{ args[1] }}{% when "problem" %}https://yukicoder.me/problems/no/{{ args[1] }}{% endcase %}'
    is-contest = ["bash", "-c", '[[ $(cut -d / -f 4) == "contests" ]]'] # optional
    bin-name = '{% assign segments = url | split: "/" %}{{ segments[5] }}'
    #bin-alias = '{% assign segments = url | split: "/" %}{{ segments[5] }}' # optional
    #bin-src-path = './src/bin/{{ bin_alias }}.rs' # optional
    cargo compete a contest 296
        Added `1358` (bin) for https://yukicoder.me/problems/no/1358
        Added `1359` (bin) for https://yukicoder.me/problems/no/1359
        Added `1360` (bin) for https://yukicoder.me/problems/no/1360
        Added `1361` (bin) for https://yukicoder.me/problems/no/1361
        Added `1362` (bin) for https://yukicoder.me/problems/no/1362
        Added `1363` (bin) for https://yukicoder.me/problems/no/1363
        Added `1364` (bin) for https://yukicoder.me/problems/no/1364
        Added `1365` (bin) for https://yukicoder.me/problems/no/1365
        Saved 1 test case to /home/ryo/src/competitive/yukicoder/testcases/1358.yml
        Saved 3 test cases to /home/ryo/src/competitive/yukicoder/testcases/1359.yml
        Saved 3 test cases to /home/ryo/src/competitive/yukicoder/testcases/1360.yml
        Saved 3 test cases to /home/ryo/src/competitive/yukicoder/testcases/1361.yml
        Saved 3 test cases to /home/ryo/src/competitive/yukicoder/testcases/1362.yml
        Saved 1 test case to /home/ryo/src/competitive/yukicoder/testcases/1363.yml
        Saved 3 test cases to /home/ryo/src/competitive/yukicoder/testcases/1364.yml
        Saved 3 test cases to /home/ryo/src/competitive/yukicoder/testcases/1365.ymlcargo compete a problem 9001
        Added `9001` (bin) for https://yukicoder.me/problems/no/9001
        Saved 1 test case to /home/ryo/src/competitive/yukicoder/testcases/9001.yml

Changed

  • Made package.metadata.cargo-compete.config optional. (#112)

    [package.metadata.cargo-compete]
    -config = "../compete.toml"
  • Added new formats for package.metadata.cargo-compete.bin. (#113)

    [package.metadata.cargo-compete.bin]
    practice-a = { alias = "a", problem = "https://atcoder.jp/contests/practice/tasks/practice_1" }
    practice-b = { alias = "b", problem = "https://atcoder.jp/contests/practice/tasks/practice_2" }
    [package.metadata.cargo-compete.bin]
    practice-a = { problem = "https://atcoder.jp/contests/practice/tasks/practice_1" }
    practice-b = { problem = "https://atcoder.jp/contests/practice/tasks/practice_2" }

    The old format is still valid.

Fixed

  • Fixed a problem about hyphen-separated contest IDs. (#114)

[0.7.1] - 2021-01-21Z

Changed

Fixed

  • Fixed URL parsing for Codeforces. (qryxip/snowchains#119)
  • The init command creates target paths. (#105)
  • Fixed a problem where generated package names are set to "contest" for Codeforces. (#108 by @tamuhey)

[0.7.0] - 2021-01-16Z

Added

  • Added bin_name and bin_alias variables for test-suite. (#96)

  • Enabled downloading/submitting with online-judge-tools. (#98)

    oj-api in $PATH will be used if the domain of a problem URL is unknown. To use this new function, you need to install online-judge-tools first.

    [package.metadata.cargo-compete.bin]
    aplusb = { name = "aplusb", problem = "https://judge.yosupo.jp/problem/aplusb" }

Changed

  • Simplified package.metadata.cargo-compete.bin.*.problem. (#96)

    • Removed package.metadata.cargo-compete.bin.*.problem.{platform, contest, index}.
    • URLs are now required.
    • The problem = { url = ".." } format is still supported.
    • contest in test-suite for yukicoder will be always null.
     [package.metadata.cargo-compete.bin]
    -a = { name = "arc110-a", problem = { platform = "atcoder", contest = "arc110", index = "A", url = "https://atcoder.jp/contests/arc110/tasks/arc110_a" } }
    -b = { name = "arc110-b", problem = { platform = "atcoder", contest = "arc110", index = "B", url = "https://atcoder.jp/contests/arc110/tasks/arc110_b" } }
    -c = { name = "arc110-c", problem = { platform = "atcoder", contest = "arc110", index = "C", url = "https://atcoder.jp/contests/arc110/tasks/arc110_c" } }
    -d = { name = "arc110-d", problem = { platform = "atcoder", contest = "arc110", index = "D", url = "https://atcoder.jp/contests/arc110/tasks/arc110_d" } }
    -e = { name = "arc110-e", problem = { platform = "atcoder", contest = "arc110", index = "E", url = "https://atcoder.jp/contests/arc110/tasks/arc110_e" } }
    -f = { name = "arc110-f", problem = { platform = "atcoder", contest = "arc110", index = "F", url = "https://atcoder.jp/contests/arc110/tasks/arc110_f" } }
    +a = { name = "arc110-a", problem = "https://atcoder.jp/contests/arc110/tasks/arc110_a" }
    +b = { name = "arc110-b", problem = "https://atcoder.jp/contests/arc110/tasks/arc110_b" }
    +c = { name = "arc110-c", problem = "https://atcoder.jp/contests/arc110/tasks/arc110_c" }
    +d = { name = "arc110-d", problem = "https://atcoder.jp/contests/arc110/tasks/arc110_d" }
    +e = { name = "arc110-e", problem = "https://atcoder.jp/contests/arc110/tasks/arc110_e" }
    +f = { name = "arc110-f", problem = "https://atcoder.jp/contests/arc110/tasks/arc110_f" }

Deprecated

  • Deprecated problem variable for test-suite. (#96)

    Use bin_alias instead.

    # Path to the test file (Liquid template)
    #
    # Variables:
    #
    # - `manifest_dir`: Package directory
    # - `contest`:      Contest ID (e.g. "abc100")
    # - `bin_name`:     Name of a `bin` target (e.g. "abc100-a")
    # - `bin_alias`:    "Alias" for a `bin` target defined in `pacakge.metadata.cargo-compete` (e.g. "a")
    # - `problem`:      Alias for `bin_alias` (deprecated)
    #
    # Additional filters:
    #
    # - `kebabcase`: Convert to kebab case (by using the `heck` crate)
    test-suite = "{{ manifest_dir }}/testcases/{{ bin_alias }}.yml"

Removed

  • Removed the migrate v04 command. (#100)

  • Removed the submit.via-binary configration. (#100)

    Use cargo-executable-payload instead.

    [submit.transpile]
    kind = "command"
    args = ["cargo", "executable-payload", "--bin", "{{ bin_name }}"]

[0.6.5] - 2020-12-05Z

Added

  • Introduced serde_ignored crate.

    As Cargo does, cargo-compete warns for unused keys in compete.toml and in package.metadata.

    cargo compete o
    warning: unused key in compete.toml: oepn
  • [test, submit] Added test.profile option.

    Now you can test your programs with release mode by default.

    [new.template]
    profile = '''
    [release]
    debug-assertions = true
    overflow-checks = true
    '''
    
    # ...
    
    [test]
    # Profile for `cargo build`. ("dev" | "release")
    #
    # Defaults to `"dev"`.
    profile = "release"

    Profiles - The Cargo Book

[0.6.4] - 2020-11-24Z

Added

  • [new] Added new.template.profile.

    [new.template]
    lockfile = "./template-cargo-lock.toml"
    # `profile` for `Cargo.toml`.
    #
    # By setting this, you can run tests with `opt-level=3` while enabling `debug-assertions` and `overflow-checks`.
    profile = '''
    [dev]
    opt-level = 3
    '''

    Profiles - The Cargo Book

Fixed

  • Problem indexes for yukicoder contests will be alphabets. (qryxip/snowchains/#102)

    Previously, "problem no"s were set.

  • Stopped asking username and password when you have already logged in AtCoder. (qryxip/snowchains/#106)

[0.6.3] - 2020-10-12Z

Added

  • [open] Now supports stirng[][] output for the open configuration.

    # Open files with the command (`jq` command that outputs `string[] | string[][]`)
    open = '[["code", "-a", .manifest_dir], ["code"] + (.paths | map([.src, .test_suite]) | flatten)]'

[0.6.2] - 2020-10-09Z

Fixed

  • Updated the dependencies.

[0.6.1] - 2020-09-20Z

Fixed

  • [submit] submit.via-binary will be correctly recognized. Previously, cargo-compete tried to read submit.via-bianry.

[0.6.0] - 2020-09-06Z

Added

  • [new] Added contest variable to new.path.

Changed

  • [new] Package names will be "contest{}" to adapt to rust-lang/cargo#7959.

    Modify new.path as following.

    -path = "./{{ package_name }}"
    +path = "./{{ contest }}"

Fixed

  • [new] new.path will work correctly.
  • [new] new command for yukicoder will work properly.

[0.5.1] - 2020-09-04Z

Added

  • [submit] Added submit.transpile field.

    You will be able to convert Rust code before submitting.

    [submit.transpile]
    kind = "command"
    args = ["cargo", "equip", "--oneline", "mods", "--rustfmt", "--check", "--bin", "{{ bin_name }}"]
    #language_id = ""

[0.5.0] - 2020-08-31Z

Added

  • [migrate] Added migrate v04 command. (#58)
  • [new, open] Added git_workdir variable for open in compete.toml. (#56)

Changed

  • cargo-compete no longer manage workspaces. Instead, each package will just share the same target directory. Run cargo compete migrate v04 to migrate packages. (#58)
  • Changed the format of compet.toml. (#58)

[0.4.7] - 2020-08-25Z

Added

[0.4.6] - 2020-08-23Z

Fixed

  • [submit] Added workaround for the problem that C-c does not work. (#52)
  • [sumibt, watch] Fixed a cosmetic problem. (qryxip/snowchains#86)

[0.4.5] - 2020-08-20Z

Added

  • [test, submit] Enabled specifying a bin with src_path instead of index for package.metadata.cargo-compete.bin. (#49)

    $ cargo compete s a
    $ cargo compete s --src ./contest/src/bin/a.rs

Fixed

  • [new, download] Against AtCoder, retrieving sample cases proceeds when encountered scraping errors. (qryxip/snowchains_core#80)

[0.4.4] - 2020-08-19Z

Changed

  • Improved error messages. (#47)

Added

  • Now each command can be run against a virtual manifest when the workspace has exactly one member. (#47)

[0.4.3] - 2020-08-18Z

Fixed

[0.4.2] - 2020-08-17Z

Added

  • [new] Now empty virtual workspaces are supported.

[0.4.1] - 2020-08-12Z

Changed

  • [init] Now cargo compete init creates a .gitignore when it is missing.
  • [new, open] CWD for jq is set to the workspace root.

[0.4.0] - 2020-08-09Z

Changed

  • [compete.toml] Changed the behavior of exclude.
  • [rename] Renamed migrate packages command to migrate cargo-atcoder.

Added

  • [compete.toml] skip variant to new-workspace-members.

Fixed

  • [migrate cargo-atcoder] Now cargo compete migrate also generates a template package as cargo compete init does.

[0.3.2] - 2020-08-08Z

Added

  • Added migrate packages command.

[0.3.1] - 2020-08-07Z

Changed

  • On submit command, now it snows the result before watching the submission. (#19)

Fixed

[0.3.0] - 2020-08-06Z

Changed

compete.toml

  • Changed the format. (#17)

Added

New commands

  • Added retrieve submission summaries command. (#16)

compete.toml

  • Added exclude value to new-workspace-member. (#14)
  • Added manifest_dir variable for test-suite. (#15)

[0.2.2] - 2020-08-05Z

Added

  • Added --testcases <NAME>... option to test command and submit command. (#12)

[0.2.1] - 2020-08-04Z

Fixed

  • Previously cargo compete test was trying to test cross-compiled program even on Windows and macOS. Now it just execute "$CARGO" build without --target. (#10)

[0.2.0] - 2020-08-04Z

Changed

  • Splitted the download command into new, open, and download. (#3)
  • Renamed workspace-metadata.toml to compete.toml. (#7)
    • Now test-suites are Liquid templates. (#4)
    • Now opens are jq commands. (#5)
    • Renamed template.code to template.src. (#8)
    • Now template.manifest instead of template.dependencies is used for each Cargo.toml. (#8)

Fixed

  • Fixed package.repository of this package. (#2)