Skip to content

Commit

Permalink
fix(cli): tweaks for single file compilation mode (#495)
Browse files Browse the repository at this point in the history
Make output directory to be the directory of the source file.
Enable external receivers.
  • Loading branch information
anton-trunov authored Jun 26, 2024
1 parent d68008c commit f306e19
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Removed the `LValue` grammatical category and replaced it with `Expression`: PR [#479](https://github.com/tact-lang/tact/pull/479)
- Compilation results are placed into the source file directory when compiling without `tact.config.json` file: PR [#495](https://github.com/tact-lang/tact/pull/495)
- External receivers are enabled for single file compilation: PR [#495](https://github.com/tact-lang/tact/pull/495)

### Fixed

Expand Down
1 change: 1 addition & 0 deletions bin/test/success.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"name": "success",
"path": "./success.tact",
"output": "./success_output",
"options": { "external": true },
"mode": "full"
}
]
Expand Down
1 change: 1 addition & 0 deletions bin/test/success.config.with.decompilation.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"name": "success",
"path": "./success.tact",
"output": "./success_output",
"options": { "external": true },
"mode": "fullWithDecompilation"
}
]
Expand Down
2 changes: 1 addition & 1 deletion bin/test/success.tact
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ contract HelloWorld {
get fun greeting(): String {
return "hello world";
}

external("foobar") {}
}
4 changes: 2 additions & 2 deletions src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ async function configForSingleFile(
{
name: path.basename(fileName, ".tact"),
path: fileName,
output: process.cwd(),
options: { debug: true },
output: path.dirname(fileName),
options: { debug: true, external: true },
mode: "full",
},
],
Expand Down

0 comments on commit f306e19

Please sign in to comment.