Skip to content

Commit 2d79f6b

Browse files
committed
fix: remove repo from sup child specs (started via kura_repo_worker in _app)
1 parent c66813f commit 2d79f6b

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

src/rebar3_nova_new.erl

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -526,15 +526,7 @@ generate_sup(Name, #{kura := true}) ->
526526
" supervisor:start_link({local, ?SERVER}, ?MODULE, []).\n\n",
527527
"init([]) ->\n",
528528
" SupFlags = #{strategy => one_for_all},\n",
529-
" ChildSpecs = [\n",
530-
" #{id => ",
531-
Name,
532-
"_repo,\n",
533-
" start => {",
534-
Name,
535-
"_repo, start_link, []},\n",
536-
" type => worker}\n",
537-
" ],\n",
529+
" ChildSpecs = [],\n",
538530
" {ok, {SupFlags, ChildSpecs}}.\n"
539531
],
540532
rebar3_nova_utils:write_file(Path, Content);

test/rebar3_nova_new_SUITE.erl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ kura_flag(_Config) ->
101101
AppSrc = read_file(Name, "src/testapp_kura.app.src"),
102102
assert_contains(AppSrc, "kura"),
103103

104-
SupErl = read_file(Name, "src/testapp_kura_sup.erl"),
105-
assert_contains(SupErl, "testapp_kura_repo"),
104+
AppErl = read_file(Name, "src/testapp_kura_app.erl"),
105+
assert_contains(AppErl, "kura_repo_worker:start(testapp_kura_repo)"),
106+
assert_contains(AppErl, "kura_migrator:migrate(testapp_kura_repo)"),
106107

107108
DevConfig = read_file(Name, "config/dev_sys.config.src"),
108109
assert_contains(DevConfig, "pgo"),
@@ -253,7 +254,7 @@ combined_kura_arizona_ci(_Config) ->
253254
assert_contains(Router, "_main_controller:index/1"),
254255

255256
SupErl = read_file(Name, "src/testapp_combo_sup.erl"),
256-
assert_contains(SupErl, "testapp_combo_repo"),
257+
assert_contains(SupErl, "supervisor"),
257258

258259
ok.
259260

0 commit comments

Comments
 (0)