Skip to content
New issue

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

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

Already on GitHub? # to your account

khepri_mnesia_migration.app: Do not depend on Mnesia or Khepri #1

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

dumbbell
Copy link
Member

@dumbbell dumbbell commented Sep 1, 2023

Why

khepri_mnesia_migration obviously relies on Mnesia and Khepri to perform its task. However, we don't want to explicitly depend on them because in an Erlang release, this will cause Mnesia and Khepri to be started automatically by default.

Given the context where this application is used, it possible the user does not want both to be running at all time. Therefore, we leave them alone. The user of khepri_mnesia_migration already depends on Mnesia and Khepri. Thus we let the user handle the dependency and the start of Mnesia and Khepri.

How

Mnesia and Khepri are removed from the applications entry in the app(4) file.

We add khepri to the plt_extra_apps configuration parameter in rebar.config so that Dialyzer still knows about it.

@dumbbell dumbbell added the enhancement New feature or request label Sep 1, 2023
@dumbbell dumbbell added this to the v0.1.1 milestone Sep 1, 2023
@dumbbell dumbbell self-assigned this Sep 1, 2023
@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (d9d6b59) 74.74% compared to head (bb4f5ef) 74.74%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #1   +/-   ##
=======================================
  Coverage   74.74%   74.74%           
=======================================
  Files          13       13           
  Lines         586      586           
=======================================
  Hits          438      438           
  Misses        148      148           
Flag Coverage Δ
erlang-24 74.74% <ø> (ø)
erlang-25 74.74% <ø> (ø)
erlang-26 74.74% <ø> (ø)
os-ubuntu-latest 74.74% <ø> (ø)
os-windows-latest 74.74% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

[Why]
khepri_mnesia_migration obviously relies on Mnesia and Khepri to perform
its task. However, we don't want to explicitly depend on them because in
an Erlang release, this will cause Mnesia and Khepri to be started
automatically by default.

Given the context where this application is used, it possible the user
does not want both to be running at all time. Therefore, we leave them
alone. The user of khepri_mnesia_migration already depends on Mnesia and
Khepri. Thus we let the user handle the dependency and the start of
Mnesia and Khepri.

[How]
Mnesia and Khepri are removed from the `applications` entry in the
app(4) file.

We add `khepri` to the `plt_extra_apps` configuration parameter in
`rebar.config` so that Dialyzer still knows about it.
@dumbbell dumbbell force-pushed the remove-mnesia-and-khepri-as-deps-in-app-file branch from 8845da7 to bb4f5ef Compare September 1, 2023 08:26
@dumbbell dumbbell marked this pull request as ready for review September 1, 2023 08:39
@dumbbell dumbbell merged commit d03253a into main Sep 1, 2023
@dumbbell dumbbell deleted the remove-mnesia-and-khepri-as-deps-in-app-file branch September 1, 2023 08:39
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant