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

Issues within the setup example for an existing elixir-application. #2209

Open
itoxiq opened this issue Dec 25, 2024 · 1 comment
Open

Issues within the setup example for an existing elixir-application. #2209

itoxiq opened this issue Dec 25, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@itoxiq
Copy link

itoxiq commented Dec 25, 2024

Hello there :)

Currently when following the documentation for adding the sync-service to an existing elixir application, the following issue arises.

The example uses the Electric.Utils.obfuscate_password method like this.

database_config = [
   ...
]

config :electric,
  connection_opts: Electric.Utils.obfuscate_password(database_config)

But as far as i know the configuration is evaluated before the dependencies are compiled -> you can't use code from dependencies in the configuration and will lead to the following error.

(UndefinedFunctionError) function Electric.Utils.obfuscate_password/1 is undefined (module Electric.Utils is not available)
@tmm
Copy link

tmm commented Dec 28, 2024

workaround

config :electric,
  connection_opts: [
    password: fn -> "postgres" end, # <- load and wrap in function
    # other opts
    # ...
  ]

@balegas balegas added the documentation Improvements or additions to documentation label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants