- 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)
-
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 writelanguage_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. - Update compete.toml:
- Fixed the problem where
submit
command segfaults (#200 by @yosuke-oka)
- (also applied to the previous versions unless
--locked
) Accepts "Ex" problems of ABC. (qryxip/snowchains#147) - (also applied to the previous versions unless
--locked
) Allows" \n"
as output text. (qryxip/snowchains#149 by @nebocco)
-
(also applied to the previous versions unless
--locked
) Updatedserde-yaml
crate to v0.8.23.match: Float: - relative_error: 0.000001 - absolute_error: 0.000001 + relative_error: 1e-6 + absolute_error: 1e-6
-
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"
cargo compete init
no longer generaterust-toolchain
s. (#173)
-
Updated the Rust versions for
cargo compete init
. (#175) -
Inserts a newline between
bin
anddependencies
. (#175)[[bin]] name = "practice-b" path = "src/bin/b.rs" + [dependencies]
-
When using
oj-api
, prioritizealphabet
s fromget-contest
over ones fromget-problem
. (#166 by @bouzuya)Now you can use cargo-compete for AtCoder Problems.
-
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)
-
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-toolchain
s 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 overwrite ❯ cargo 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/}
-
Added
SplitWhitespace
variant toMatch
. (qryxip/snowchains#136) -
cargo-compete now warns when the expected output and the actual one are not matched and whitespace-separated words do. (qryxip/snowchains#137)
2/2 ("sample2") Wrong Answer (0 ms) stdin: 3 3 3 3 3 expected: EMPTY actual: note: whitespace-separated words matched. try setting `match` to `SplitWhitespace` error: 1/2 tests failed
-
Made
Extend::SystemTestCases.problem
optional. (#qryxip/snowchains#133, #141)extend: - type: SystemTestCases - problem: https://atcoder.jp/contests/agc001/tasks/agc001_a
- Fixed around Ctrl-c. (#qryxip/snowchains#135)
-
Added
SystemTestCases
variant toextend
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 whentest
ing code.extend: - type: SystemTestCases problem: "https://atcoder.jp/contests/abc191/tasks/abc191_a"
-
cargo compete test
command without--full
option will append{ type: Text, ... }
toextend
and will create emptyin
andout
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 a problem where
cargo compete download
command saves nothing. (#139)
-
Added
template
field tocompete.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
andnew.template
optional.
-
Deprecated the
new.template
config.Use
template
instead.
-
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
-
Added
#[serde(default)]
toPartialBatchTestCase::out: Option<Arc<str>>
. (qryxip/snowchains/#128)Previously, explicit
out: ~
had been allowed but the field itself was required.
-
Added
Checker
variant toMatch
. (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
-
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.
-
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.yml ❯ cargo 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
-
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 a problem about hyphen-separated contest IDs. (#114)
- Improved around Dropbox. (qryxip/snowchains#116)
- 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)
-
Added
bin_name
andbin_alias
variables fortest-suite
. (#96) -
Enabled
download
ing/submit
ting 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" }
-
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
intest-suite
for yukicoder will be alwaysnull
.
[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" }
- Removed
-
Deprecated
problem
variable fortest-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 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 }}"]
-
Introduced
serde_ignored
crate.As Cargo does, cargo-compete warns for unused keys in
compete.toml
and inpackage.metadata
.❯ cargo compete o warning: unused key in compete.toml: oepn
-
[
test
,submit
] Addedtest.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"
-
[
new
] Addednew.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 '''
-
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)
-
[
open
] Now supportsstirng[][]
output for theopen
configuration.# Open files with the command (`jq` command that outputs `string[] | string[][]`) open = '[["code", "-a", .manifest_dir], ["code"] + (.paths | map([.src, .test_suite]) | flatten)]'
- Updated the dependencies.
- Now it supports "小数誤差許容問題" in yukicoder. (qryxip/snowchains#96)
- [
submit
]submit.via-binary
will be correctly recognized. Previously,cargo-compete
tried to readsubmit.via-bianry
.
- [
new
] Addedcontest
variable tonew.path
.
-
[
new
] Package names will be"contest{}"
to adapt to rust-lang/cargo#7959.Modify
new.path
as following.-path = "./{{ package_name }}" +path = "./{{ contest }}"
- [
new
]new.path
will work correctly. - [
new
]new
command for yukicoder will work properly.
-
[
submit
] Addedsubmit.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 = ""
- [
migrate
] Addedmigrate v04
command. (#58) - [
new
,open
] Addedgit_workdir
variable foropen
incompete.toml
. (#56)
cargo-compete
no longer manage workspaces. Instead, each package will just share the sametarget
directory. Runcargo compete migrate v04
to migrate packages. (#58)- Changed the format of
compet.toml
. (#58)
- [
retrieve testcases
] Enabled downloading all of the test cases on Dropbox. (qryxip/snowchains#89)
- [
submit
] Added workaround for the problem that C-c does not work. (#52) - [
sumibt
,watch
] Fixed a cosmetic problem. (qryxip/snowchains#86)
-
[
test
,submit
] Enabled specifying abin
withsrc_path
instead of index forpackage.metadata.cargo-compete.bin
. (#49)$ cargo compete s a
$ cargo compete s --src ./contest/src/bin/a.rs
- [
new
,download
] Against AtCoder, retrieving sample cases proceeds when encountered scraping errors. (qryxip/snowchains_core#80)
- Improved error messages. (#47)
- Now each command can be run against a virtual manifest when the workspace has exactly one member. (#47)
- Support ABC003 and ABC007 to ABC010. (qryxip/snowchains_core#76)
- [
new
] Now empty virtual workspaces are supported.
- [
init
] Nowcargo compete init
creates a.gitignore
when it is missing. - [
new
,open
] CWD forjq
is set to the workspace root.
- [
compete.toml
] Changed the behavior ofexclude
. - [rename] Renamed
migrate packages
command tomigrate cargo-atcoder
.
- [
compete.toml
]skip
variant tonew-workspace-members
.
- [
migrate cargo-atcoder
] Nowcargo compete migrate
also generates a template package ascargo compete init
does.
- Added
migrate packages
command.
- On
submit
command, now it snows the result beforewatch
ing the submission. (#19)
- Fixed the parser for AtCoder submissions. (qryxip/snowchains#71)
- Changed the format. (#17)
- Added
retrieve submission summaries
command. (#16)
- Added
exclude
value tonew-workspace-member
. (#14) - Added
manifest_dir
variable fortest-suite
. (#15)
- Added
--testcases <NAME>...
option totest
command andsubmit
command. (#12)
- 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)
- Splitted the
download
command intonew
,open
, anddownload
. (#3) - Renamed
workspace-metadata.toml
tocompete.toml
. (#7)
- Fixed
package.repository
of this package. (#2)