Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make integration #4083

Open
wants to merge 462 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
462 commits
Select commit Hold shift + click to select a range
073054a
make_like.bash tests passed
vporton Apr 25, 2024
6d06759
tracing removed
vporton Apr 25, 2024
662dbe9
debugging
vporton Apr 25, 2024
358881f
bug fixing (does not compile)
vporton Apr 25, 2024
b4ecb96
bug fix (untested)
vporton Apr 25, 2024
50ce05f
rewriting to fix a bug
vporton Apr 25, 2024
f8ca306
bug in a e2e test fixed
vporton Apr 25, 2024
7a187ba
bug in a e2e test fixed
vporton Apr 25, 2024
c855cf4
bug fix in tests
vporton Apr 26, 2024
7c5e027
tests passed
vporton Apr 26, 2024
b7f2109
more tests
vporton Apr 26, 2024
da92149
more tests
vporton Apr 26, 2024
c499e7d
fixing wrong deployment
vporton Apr 26, 2024
3b9b47b
fixing a bug
vporton Apr 26, 2024
4868c2d
bug fix
vporton Apr 26, 2024
5c535ed
removed outdated FIXME
vporton Apr 26, 2024
3b64f01
bug fix
vporton Apr 26, 2024
12b5d0c
removed an outdated TODO
vporton Apr 26, 2024
973df62
eliminate a superfluous condition
vporton Apr 26, 2024
7ab36ec
bug fix
vporton Apr 26, 2024
f150763
bug fix
vporton Apr 26, 2024
dfc8aef
removed a wrong FIXME
vporton Apr 26, 2024
c0db95b
cargo fmt
vporton Apr 26, 2024
882514b
eliminated Clippy warnings
vporton Apr 26, 2024
5ad7844
remove an outdated comment
vporton Apr 26, 2024
85f439a
don't update .did file if not changed
vporton Apr 26, 2024
e1d9e9f
ignore canisters with unchanged .did
vporton Apr 26, 2024
9097b69
docs
vporton Apr 26, 2024
83e908e
rebuild only if Candid changed
vporton Apr 26, 2024
fbf5e4e
added (failed) tests
vporton Apr 26, 2024
8bfedb8
Merge branch 'master' into build-only-necessary
vporton Apr 26, 2024
0d490ad
bug fix
vporton Apr 26, 2024
2638986
tests passed
vporton Apr 26, 2024
61f7bc3
removed tracing
vporton Apr 26, 2024
410c6df
more tests
vporton Apr 26, 2024
79f1faf
bug fix
vporton Apr 26, 2024
c595c35
merged master
vporton Apr 26, 2024
b2b48db
half-done bug fix
vporton Apr 26, 2024
4bd860b
bug fix (untested)
vporton Apr 26, 2024
c42605c
added (failing) test add_dependency.bash
vporton Apr 27, 2024
de1f6c8
Merge branch 'build-only-necessary' of github.com:vporton/sdk into bu…
vporton Apr 27, 2024
fc75b7d
English grammar
vporton Apr 27, 2024
f178964
better test
vporton Apr 27, 2024
4419e5a
Merge branch 'build-only-necessary-dev' into build-only-necessary
vporton Apr 27, 2024
f491334
Merge branch 'build-only-necessary-dev' into preserve-candid
vporton Apr 27, 2024
a918624
Merge branch 'build-only-necessary' into preserve-candid
vporton Apr 27, 2024
df9dd8d
removed an undersophisticated error
vporton Apr 27, 2024
84609b5
removed tracing
vporton Apr 27, 2024
67257e9
bug fix (introduced another bug)
vporton Apr 27, 2024
76a95d1
bug fix (introduced another bug)
vporton Apr 27, 2024
836a737
removed tracing
vporton Apr 28, 2024
af79910
alleged bug fix
vporton Apr 28, 2024
3b00420
bug fixes
vporton Apr 28, 2024
863e6b5
Merge branch 'build-only-necessary-dev' into build-only-necessary
vporton Apr 28, 2024
81ea12f
Merge branch 'build-only-necessary' into preserve-candid
vporton Apr 28, 2024
345bf4f
merged branches
vporton Apr 28, 2024
f568ffb
cargo fmt
vporton Apr 28, 2024
36b0c51
removed unused self parameter
vporton Apr 28, 2024
abd6b6f
Merge branch 'build-only-necessary-dev' into build-only-necessary
vporton Apr 28, 2024
80aac35
merge
vporton Apr 28, 2024
6b3a965
make #3733 bug repeatable
vporton Apr 29, 2024
d3a8812
dfx.json simplified
vporton Apr 29, 2024
14262e4
removed unused source files from sample code
vporton Apr 29, 2024
2fdf11b
simplified sample code
vporton Apr 29, 2024
7ad5e49
yet simplified sample code
vporton Apr 29, 2024
5e5a8de
removed unnecessary configuration from sample
vporton Apr 29, 2024
b39ac77
created a minimal example for bug #3733
vporton Apr 29, 2024
4965c02
renamed
vporton Apr 29, 2024
b27c8a2
Merge remote-tracking branch 'upstream/master' into dont-deploy
vporton Apr 29, 2024
ffd9b4e
merge upstream
vporton May 4, 2024
9a21ebf
merged master
vporton May 6, 2024
9fb8c37
fixing an error (does not compile now)
vporton May 6, 2024
08e4204
made compilable
vporton May 6, 2024
0770004
test wrong_ids.bash passed
vporton May 6, 2024
224fa18
simplified
vporton May 6, 2024
ec41d45
removed tracing
vporton May 6, 2024
8b416b3
removed unused variable
vporton May 6, 2024
16330bc
added test broken_canister_dep.bash
vporton May 6, 2024
8aa8c63
passed a e2e test
vporton May 6, 2024
975c274
Merge branch 'build-only-necessary-dev' into preserve-candid
vporton May 6, 2024
acdf371
CHANGELOG
vporton May 7, 2024
f4fad29
trying to fix bugs
vporton May 7, 2024
544b1a9
misc
vporton May 7, 2024
6c78437
removed tracing
vporton May 7, 2024
0f6fd14
code formatting
vporton May 7, 2024
559869a
cargo fmt & cpilly
vporton May 7, 2024
eed2047
attempted bug fix in `dfx build`
vporton May 7, 2024
c0a7a86
bug fix
vporton May 7, 2024
092d91f
bug fix
vporton May 9, 2024
f9def45
a bug fix introducing new bugs
vporton May 9, 2024
f968255
bug fix
vporton May 9, 2024
cd093c5
removed tracing
vporton May 9, 2024
8fe9f5f
removed unused import
vporton May 9, 2024
27c1b32
cargo clippy
vporton May 9, 2024
9d7770d
cargo fmt
vporton May 9, 2024
bbbdd8a
bug fix
vporton May 9, 2024
61d3441
bug fix
vporton May 9, 2024
4742995
removed tracing
vporton May 9, 2024
011f850
removed tracing
vporton May 9, 2024
22b167b
Revert "removed tracing"
vporton May 9, 2024
fa90db2
reduced tracing
vporton May 9, 2024
126fc0c
FIXME comment
vporton May 9, 2024
4195401
started my graph library
vporton May 9, 2024
3287d4a
refactoring
vporton May 9, 2024
a14a2f3
refactored (probably with errors)
vporton May 9, 2024
8be21aa
bug fixes
vporton May 9, 2024
101f5f5
refactor with possible bugfixes
vporton May 9, 2024
5525f85
small refactor
vporton May 9, 2024
f0ffa2a
bug fix
vporton May 9, 2024
75a828b
misc dev
vporton May 9, 2024
c469252
removed commented out code
vporton May 9, 2024
b219349
bug fix
vporton May 9, 2024
24df5c0
misc debugging
vporton May 9, 2024
f9c51f2
small refactor
vporton May 9, 2024
1fb5ccf
refactor
vporton May 9, 2024
cac0af7
bug fix
vporton May 10, 2024
4d87be9
removed tracing
vporton May 10, 2024
e79b5c0
Merge branch 'master' into build-only-necessary
vporton May 10, 2024
d1caf26
misc
vporton May 10, 2024
a903bad
bug fix and commented code removal
vporton May 10, 2024
cb777c9
removed outdated TODO comment
vporton May 10, 2024
cbd73b1
refactor
vporton May 10, 2024
5810bb0
refactor
vporton May 10, 2024
231fc52
function renamed
vporton May 10, 2024
6eb4106
Merge branch 'build-only-necessary' of github.com:vporton/sdk into bu…
vporton May 10, 2024
2c4a0d2
added `imports` to env
vporton May 10, 2024
ca55305
moved imports data to Environment
vporton May 10, 2024
5134b39
simplified
vporton May 10, 2024
49681b4
comment
vporton May 10, 2024
86589b3
Merge branch 'build-only-necessary-dev' into build-only-necessary
vporton May 10, 2024
51862b4
removed an outdated FIXME comment
vporton May 14, 2024
20eb813
removed an outdated FIXME comment
vporton May 14, 2024
e4afa4c
removed a done TODO comment
vporton May 14, 2024
4a9881a
reafctor
vporton May 14, 2024
c24b3ec
comment
vporton May 14, 2024
1dc9736
messages and comments
vporton May 14, 2024
0971460
removed a wrong TODO
vporton May 14, 2024
1d0b8f8
comments
vporton May 14, 2024
e4c401f
better error message
vporton May 14, 2024
36c69bd
removed unneeded TODO comment
vporton May 14, 2024
4100443
comment
vporton May 14, 2024
8fb62b2
removed unused code
vporton May 14, 2024
b07fe2f
comment correction
vporton May 14, 2024
ecb803d
removed an undoable TODO
vporton May 14, 2024
6d8560d
variable rename
vporton May 14, 2024
9c42521
removed superfluous TODO comment
vporton May 14, 2024
7f9ad79
Merge branch 'build-only-necessary-dev' into build-only-necessary
vporton May 14, 2024
0aec121
better error message
vporton May 14, 2024
027a249
Merge branch 'build-only-necessary-dev' into build-only-necessary
vporton May 14, 2024
d913a7f
Merge remote-tracking branch 'upstream/master' into build-only-necess…
vporton May 14, 2024
dfecd10
removed commented out code
vporton May 15, 2024
6bb29af
removed an inappropriate TODO comment
vporton May 15, 2024
7508357
Merge remote-tracking branch 'upstream/master' into build-only-necess…
vporton May 15, 2024
4d86bda
merge
vporton May 15, 2024
2134dc4
Merge remote-tracking branch 'upstream/master' into build-only-necess…
vporton May 25, 2024
27c9e4d
more error context
vporton May 25, 2024
8e9d0e0
fixed a regression (after adding more error contexts)
vporton May 25, 2024
94e656b
possible bug fix
vporton May 25, 2024
2cfbcf2
debugging
vporton May 25, 2024
39ced7e
debugging
vporton May 25, 2024
33fd5b5
"deploy writes all environment variables to .env" test passed
vporton May 25, 2024
89cbac6
removed warning
vporton May 25, 2024
3b57d0c
removed an overestimated TODO comment
vporton May 25, 2024
c8fe66d
clippy
vporton May 25, 2024
fdd2ce3
cargo fmt
vporton May 25, 2024
222654c
removed commented out code
vporton May 26, 2024
568cd6b
corrected test
vporton May 26, 2024
be01eea
bug fix
vporton May 26, 2024
fb9a28a
Merge branch 'master' into build-only-necessary
vporton May 31, 2024
9338d4b
removed an apparently fixed FIXME
vporton May 31, 2024
80c6f1a
Merge branch 'build-only-necessary' of github.com:vporton/sdk into bu…
vporton May 31, 2024
5731e86
removed an outdated TODO comment
vporton Jun 9, 2024
1e057d0
removed an outdated TODO comment
vporton Jun 9, 2024
78352ae
more logging
vporton Jun 9, 2024
bb51187
TODO comment
vporton Jun 9, 2024
7299111
bug fix
vporton Jun 16, 2024
dbca709
new command line options
vporton Jan 26, 2025
a70ccd6
Merge remote-tracking branch 'upstream/master' into make-integration2
vporton Jan 26, 2025
dfb9ec3
fix bugs
vporton Jan 26, 2025
7433784
read_dependencies()
vporton Jan 26, 2025
8ea457d
Add 'old/' from commit '7299111abec4c300b15b3e6d89f14d1d4c087203'
vporton Jan 26, 2025
9722f2c
add get_dependencies
vporton Jan 27, 2025
76457e0
read_all_dependencies
vporton Jan 27, 2025
60f71b3
output all dependencies
vporton Jan 27, 2025
13e7381
output some bild rules
vporton Jan 27, 2025
8521c9c
most (all?) rules are done
vporton Jan 27, 2025
de54cfc
bug fix
vporton Jan 27, 2025
ee119c0
fixes
vporton Jan 27, 2025
c6ddab7
bug fix
vporton Jan 27, 2025
36ed949
success building some canisters
vporton Jan 27, 2025
60601c7
removed old/ subtree
vporton Jan 27, 2025
f9e0d1f
fix bug
vporton Jan 28, 2025
cac719d
remove warnings
vporton Jan 28, 2025
8c2408a
misc
vporton Jan 28, 2025
b4c9b79
output generate@ rules
vporton Jan 28, 2025
c2ea21f
bug fixes in generate@
vporton Jan 28, 2025
b75d5fb
add generate@ dependencies to rules
vporton Jan 28, 2025
d23d7f3
use relative paths
vporton Jan 28, 2025
54f04d4
misc
vporton Jan 28, 2025
bfb3ee2
remove tracing
vporton Jan 28, 2025
d2a7c90
remove unused import
vporton Jan 28, 2025
4e1ab70
fix bug
vporton Jan 28, 2025
28d4771
fix bugs
vporton Jan 28, 2025
cb47f82
fix bug
vporton Jan 28, 2025
2ef2a5b
Merge remote-tracking branch 'upstream/master' into make-merge upstream
vporton Jan 28, 2025
708b457
fix after merge upstream
vporton Jan 28, 2025
5ca650a
CHANGELOG.md
vporton Jan 28, 2025
93e2a00
cli-reference
vporton Jan 28, 2025
5e5f3f5
bug fix
vporton Jan 29, 2025
9da9139
refactor
vporton Jan 29, 2025
7b4050f
$(DEPLOY_FLAGS)
vporton Jan 29, 2025
4f21c99
bug fix
vporton Jan 29, 2025
04d29e4
bug fixes
vporton Jan 29, 2025
f0e6617
bug fix
vporton Jan 29, 2025
d9f34aa
remove outdated FIXME
vporton Jan 29, 2025
4ef5f76
remove outdated FIXME
vporton Jan 29, 2025
bc91f69
bug fix
vporton Jan 29, 2025
f595c87
remove outdated FIXME
vporton Jan 29, 2025
b2b01bc
remove superfluous FIXME
vporton Jan 29, 2025
cc22a39
remove superfluous TODOs
vporton Jan 29, 2025
34fbb9c
remove obvious comment
vporton Jan 29, 2025
ebe8c24
change wrong identifier
vporton Jan 29, 2025
68e48c9
remove workaround of fixed bug
vporton Jan 29, 2025
fac40ce
add TODO comment
vporton Jan 29, 2025
9c40e3c
refactor
vporton Jan 29, 2025
7c23640
bug fix
vporton Jan 29, 2025
e8e46f7
bug fix
vporton Jan 29, 2025
cd28912
bug fix
vporton Jan 29, 2025
df421f7
bug fix
vporton Jan 29, 2025
2be04f3
fix bug
vporton Jan 29, 2025
e63fd25
bug fix
vporton Jan 29, 2025
7d92d01
fix extra recompilations bug
vporton Jan 29, 2025
8943c39
Merge remote-tracking branch 'upstream/master' into make-integration2
vporton Jan 29, 2025
1a97f02
FIXME
vporton Jan 29, 2025
093dce0
rename variable
vporton Jan 29, 2025
dbefcf5
fix bug
vporton Jan 29, 2025
834d2bc
fix bug
vporton Jan 29, 2025
2ff4793
merge
vporton Jan 29, 2025
0bba2e8
Merge remote-tracking branch 'upstream/master' into make-integration2
vporton Jan 30, 2025
c51fa89
fix non-recompilation of asets
vporton Jan 30, 2025
029c670
fix bug
vporton Jan 30, 2025
a468c3e
fix bug
vporton Jan 30, 2025
464370c
FIXME
vporton Jan 30, 2025
a9f59b2
remove redundant code
vporton Jan 30, 2025
af0ef28
network option
vporton Jan 30, 2025
800b247
merge
vporton Feb 1, 2025
ab3428c
remove commented code
vporton Feb 1, 2025
6f6dbe9
fix bug
vporton Feb 1, 2025
b8cfa10
bug fix
vporton Feb 2, 2025
d13e6a4
fix bug
vporton Feb 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

# UNRELEASED

### feat: Make integration

* Flags `--no-compile` and `--no-deps`

* Command `rules` that outputs time-efficient GNU Make rules.

### feat: `skip_cargo_audit` flag in dfx.json to skip `cargo audit` build step

### fix: `dfx canister install` and `dfx deploy` with `--no-asset-upgrade` no longer hang indefinitely when wasm is not up to date
Expand Down
7 changes: 4 additions & 3 deletions docs/cli-reference/dfx-build.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ dfx build [flag] [option] [--all | canister_name]

You can use the following optional flags with the `dfx build` command.

| Flag | Description |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--check` | Builds canisters using a temporary, hard-coded, locally-defined canister identifier for testing that your program compiles without connecting to the IC. |
| Flag | Description |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--check` | Builds canisters using a temporary, hard-coded, locally-defined canister identifier for testing that your program compiles without connecting to the IC. |
| `--no-deps` | Don't build dependencies, only this canister. |

## Options

Expand Down
1 change: 1 addition & 0 deletions docs/cli-reference/dfx-deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ You can use the following options with the `dfx deploy` command.
| `--next-to <canister-principal>` | Create canisters on the same subnet as this canister. |
| `--skip-pre-upgrade` | Skip the pre_upgrade hook on upgrade. This requires the upgrade/auto mode. |
| `--wasm-memory-persistence <mode>` | Keep or replace the Wasm main memory on upgrade. Possible values: keep, replace. This requires the upgrade/auto mode. |
| `--no-compile` | Don't compile before deploying. |

### Specifies the argument to pass to the init entrypoint

Expand Down
8 changes: 8 additions & 0 deletions docs/cli-reference/dfx-generate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ The `dfx generate` command looks for the configuration under the `declarations`
dfx generate [canister_name]
```

## Options

You can use the following options with the `dfx deploy` command.

| Argument | Description |
|----------------|-----------------------------------------------------------|
| `--no-compile` | Don't compile the canister(s) before generating bindings. |

## Arguments

You can specify the following arguments for the `dfx generate` command.
Expand Down
28 changes: 28 additions & 0 deletions docs/cli-reference/dfx-rules.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

# dfx rules

<MarkdownChipRow labels={["Reference"]} />

**Warning:** This is an experimental feature.

Use the `dfx rules` command to output GNU Make rules for efficient compilation of canisters.

The rules, that can be used:
* `canister@NAME` - compile a canister.
* `deploy@NAME` - deploy a canister.
* `generate@NAME` - generate bindings for a canister.

TODO

## Basic usage

``` bash
dfx rules [-o MAKEFILE]
```

**Warning:** The MAKEFILE is overwritten by the above command.

| Argument | Description |
|------------------------------|---------------------------------|
| `-o FILE` or `--output FILE` | Use this file instead of stdout |
8 changes: 4 additions & 4 deletions src/dfx/assets/prepare_assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ fn write_binary_cache(
async fn download_and_check_sha(client: Client, source: Source) -> Bytes {
let retry_policy = ExponentialBackoffBuilder::new()
.with_initial_interval(Duration::from_secs(1))
.with_max_interval(Duration::from_secs(16))
.with_multiplier(2.0)
.with_max_elapsed_time(Some(Duration::from_secs(300)))
.with_max_interval(Duration::from_secs(64))
.with_multiplier(1.5)
.with_max_elapsed_time(Some(Duration::from_secs(3600)))
.build();

let response = retry(retry_policy, || async {
match client.get(&source.url).send().await {
match client.get(&source.url).timeout(Duration::from_secs(3600)).send().await {
Ok(response) => Ok(response),
Err(err) => Err(backoff::Error::transient(err)),
}
Expand Down
25 changes: 20 additions & 5 deletions src/dfx/src/commands/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ pub struct CanisterBuildOpts {
#[arg(long)]
check: bool,

/// Don't compile the dependencies, only this canister.
#[arg(long)]
no_deps: bool,

/// Output environment variables to a file in dotenv format (without overwriting any user-defined variables, if the file already exists).
#[arg(long)]
output_env_file: Option<PathBuf>,
Expand All @@ -48,10 +52,21 @@ pub fn exec(env: &dyn Environment, opts: CanisterBuildOpts) -> DfxResult {

let build_mode_check = opts.check;

// Option can be None in which case --all was specified
let required_canisters = config
.get_config()
.get_canister_names_with_dependencies(opts.canister_name.as_deref())?;
let required_canisters = if opts.no_deps {
// Option can be None in which case --all was specified
let canister = opts.canister_name.as_deref();
match canister {
Some(canister) => vec![canister.to_string()],
// inefficient:
None => config
.get_config()
.get_canister_names_with_dependencies(None)?
}
} else {
config
.get_config()
.get_canister_names_with_dependencies(opts.canister_name.as_deref())?
};
let canisters_to_load = add_canisters_with_ids(&required_canisters, &env, &config);

let canisters_to_build = required_canisters
Expand Down Expand Up @@ -90,7 +105,7 @@ pub fn exec(env: &dyn Environment, opts: CanisterBuildOpts) -> DfxResult {
.with_build_mode_check(build_mode_check)
.with_canisters_to_build(canisters_to_build)
.with_env_file(env_file);
runtime.block_on(canister_pool.build_or_fail(&env, logger, &build_config))?;
runtime.block_on(canister_pool.build_or_fail(&env, logger, &build_config, opts.no_deps))?;

Ok(())
}
5 changes: 5 additions & 0 deletions src/dfx/src/commands/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ pub struct DeployOpts {
#[command(flatten)]
subnet_selection: SubnetSelectionOpt,

/// Skip compilation before deploying.
#[arg(long)]
no_compile: bool,

/// Always use Candid assist when the argument types are all optional.
#[arg(
long,
Expand Down Expand Up @@ -183,6 +187,7 @@ pub fn exec(env: &dyn Environment, opts: DeployOpts) -> DfxResult {
opts.no_asset_upgrade,
&mut subnet_selection,
opts.always_assist,
opts.no_compile,
))?;

if matches!(deploy_mode, NormalDeploy | ForceReinstallSingleCanister(_)) {
Expand Down
8 changes: 6 additions & 2 deletions src/dfx/src/commands/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ pub struct GenerateOpts {
/// If you do not specify a canister name, generates types for all canisters.
canister_name: Option<String>,

/// Don't compile Motoko before generating.
#[arg(long)]
no_compile: bool,

#[command(flatten)]
network: NetworkOpt,
}
Expand Down Expand Up @@ -64,7 +68,7 @@ pub fn exec(env: &dyn Environment, opts: GenerateOpts) -> DfxResult {
BuildConfig::from_config(&config, env.get_network_descriptor().is_playground())?
.with_canisters_to_build(canisters_to_generate);

if build_config
if !opts.no_compile && build_config
.canisters_to_build
.as_ref()
.map(|v| !v.is_empty())
Expand All @@ -73,7 +77,7 @@ pub fn exec(env: &dyn Environment, opts: GenerateOpts) -> DfxResult {
let canister_pool_build = CanisterPool::load(&env, true, &build_dependees)?;
slog::info!(log, "Building canisters before generate for Motoko");
let runtime = Runtime::new().expect("Unable to create a runtime");
runtime.block_on(canister_pool_build.build_or_fail(&env, log, &build_config))?;
runtime.block_on(canister_pool_build.build_or_fail(&env, log, &build_config, opts.no_compile))?;
}

for canister in canister_pool_load.canisters_to_build(&generate_config) {
Expand Down
3 changes: 3 additions & 0 deletions src/dfx/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ mod new;
mod ping;
mod quickstart;
mod remote;
mod rules;
mod schema;
mod start;
mod stop;
Expand Down Expand Up @@ -57,6 +58,7 @@ pub enum DfxCommand {
Ping(ping::PingOpts),
Quickstart(quickstart::QuickstartOpts),
Remote(remote::RemoteOpts),
Rules(rules::RulesOpts),
Schema(schema::SchemaOpts),
Start(start::StartOpts),
Stop(stop::StopOpts),
Expand Down Expand Up @@ -90,6 +92,7 @@ pub fn exec(env: &dyn Environment, cmd: DfxCommand) -> DfxResult {
DfxCommand::Ping(v) => ping::exec(env, v),
DfxCommand::Quickstart(v) => quickstart::exec(env, v),
DfxCommand::Remote(v) => remote::exec(env, v),
DfxCommand::Rules(v) => rules::exec(env, v),
DfxCommand::Schema(v) => schema::exec(v),
DfxCommand::Start(v) => start::exec(env, v),
DfxCommand::Stop(v) => stop::exec(env, v),
Expand Down
Loading