Skip to content

Commit 953f3af

Browse files
committed
0.27.0
1 parent 62f5765 commit 953f3af

File tree

27 files changed

+159
-65
lines changed

27 files changed

+159
-65
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,17 @@ cargo test
3737
```
3838

3939
## Building and testing with Docker
40+
4041
Build the binary in Docker and copy it to the current directory (this can be useful to create a binary linked with an older glibc):
42+
4143
```bash
4244
export DOCKER_BUILDKIT=1
4345
docker build . -f docker/Dockerfile -t tmc-langs-rust
44-
docker run --rm -v $PWD:/build/out tmc-langs-rust bash -c "cargo build && cp /build/target/debug/tmc-langs-cli /build/out/"
46+
docker run --rm -v "$PWD":/build/out tmc-langs-rust bash -c "cargo build && cp /build/target/debug/tmc-langs-cli /build/out/"
4547
```
48+
4649
Run tests in Docker:
50+
4751
```bash
4852
export DOCKER_BUILDKIT=1
4953
docker build . -f docker/Dockerfile -t tmc-langs-rust

Cargo.lock

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ members = [
1515
resolver = "2"
1616

1717
[workspace.package]
18+
version = "0.27.0"
1819
authors = [
1920
"University of Helsinki <[email protected]>",
2021
"Daniel Martinez <[email protected]>",

crates/bindings/tmc-langs-node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tmc-langs-node"
3-
version = "0.1.0"
3+
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
66
description = "Bindings to the tmc-langs library for Node"

crates/bindings/tmc-langs-node/src/helpers.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,20 @@ macro_rules! parse_args {
9999
parse_arg!($cx, $ty8, 8),
100100
);
101101
};
102+
($cx: ident, $id0: ident : $ty0: path, $id1: ident : $ty1: path, $id2: ident : $ty2: path, $id3: ident : $ty3: path, $id4: ident : $ty4: path, $id5: ident : $ty5: path, $id6: ident : $ty6: path, $id7: ident : $ty7: path, $id8: ident : $ty8: path, $id9: ident : $ty9: path) => {
103+
let ($id0, $id1, $id2, $id3, $id4, $id5, $id6, $id7, $id8, $id9) = (
104+
parse_arg!($cx, $ty0, 0),
105+
parse_arg!($cx, $ty1, 1),
106+
parse_arg!($cx, $ty2, 2),
107+
parse_arg!($cx, $ty3, 3),
108+
parse_arg!($cx, $ty4, 4),
109+
parse_arg!($cx, $ty5, 5),
110+
parse_arg!($cx, $ty6, 6),
111+
parse_arg!($cx, $ty7, 7),
112+
parse_arg!($cx, $ty8, 8),
113+
parse_arg!($cx, $ty9, 9),
114+
);
115+
};
102116
}
103117

104118
pub fn convert_err<E: Error>(cx: &mut FunctionContext, e: E) -> Throw {

crates/bindings/tmc-langs-node/src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ use std::{
1414
use thiserror::Error;
1515
use tmc_langs::{
1616
file_util, ClientError, Compression, Credentials, DownloadOrUpdateCourseExercisesResult,
17-
FeedbackAnswer, LangsError, Language, NewSubmission, SubmissionFinished, TmcClient, TmcConfig,
17+
FeedbackAnswer, LangsError, Language, NewSubmission, PrepareSubmission, SubmissionFinished,
18+
TmcClient, TmcConfig,
1819
};
1920

2021
#[derive(Debug, Error)]
@@ -185,6 +186,7 @@ fn prepare_submission(mut cx: FunctionContext) -> JsResult<JsValue> {
185186
stub_compression: Compression,
186187
submission_path: PathBuf,
187188
submission_compression: Compression,
189+
extract_submission_naively: bool,
188190
tmc_param: Vec<(String, Vec<String>)>,
189191
top_level_dir_name: Option<String>
190192
);
@@ -210,7 +212,11 @@ fn prepare_submission(mut cx: FunctionContext) -> JsResult<JsValue> {
210212
};
211213

212214
let res = tmc_langs::prepare_submission(
213-
(&submission_path, submission_compression),
215+
PrepareSubmission {
216+
archive: &submission_path,
217+
compression: submission_compression,
218+
extract_naively: extract_submission_naively,
219+
},
214220
&output_path,
215221
top_level_dir_name,
216222
tmc_params,

crates/helpers/tmc-server-mock/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tmc-server-mock"
3-
version = "0.1.0"
3+
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
66
license.workspace = true

crates/plugins/csharp/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tmc-langs-csharp"
3-
version = "0.1.0"
3+
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
66
license.workspace = true

crates/plugins/java/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tmc-langs-java"
3-
version = "0.1.0"
3+
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
66
license.workspace = true

crates/plugins/make/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tmc-langs-make"
3-
version = "0.1.0"
3+
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
66
license.workspace = true

0 commit comments

Comments
 (0)