-
Notifications
You must be signed in to change notification settings - Fork 67
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
Importing config from dependecy #43
Comments
@grundrauschen I'm not sure I follow. A couple things:
Importing schemas is something I would be interested in supporting, though I would like to have a real world example to base it on. Could you perhaps provide an example of your specific use case? |
@bitwalker: I try to explain it further to make it more specific. The settings of a dependency, which are defined in the dependency's config.exs are of course available through Because the project I am working on is closed-source, I can't send you a link right now, but I try to explain our use case. We have to set specific settings for the environment for a dependency like IP-addresses to listen on log levels and so forth. The main application now wants to use these service and has some settings to be set by the operator itself, but the operator should also be able to set the IP-address of the logging service, the main application depends on, in the config file of the application, too. Because the logging service might change the translations or add new settings to be configured by the So when a new version of the magic logging service comes out, I can just make a I hope my explanation was somehow enlightened. |
@grundrauschen Yep makes sense, it should certainly be possible to import mappings and translations from multiple schema files. So my thought is that the syntax would be something like this: [ import: [:some_app],
extends: [:some_dep],
mappings: [...],
translations: [...] ]
|
@grundrauschen These (and many other) changes have been implemented in the |
hello, this is great news. |
@grundrauschen Probably a bug, could you describe your project layout a bit more? Also when you are seeing the error specifically? I'm assuming your schema file looks something like the following, correct?: [ extends: [:my_dep],
imports: [],
mappings: [...],
transforms: [...] ] Given the above, it will attempt to locate the |
@grundrauschen Found the problem(s), and pushed some fixes to the v1 branch. Could you pull and run your tests again? It's very much appreciated! |
Hello @bitwalker, I tried the newest HEAD of the branch and When I try to use it with exrm (master branch) I get the following error message, but assume it is because exrm is not working on the v1 branch at the moment, right?
In the
|
@grundrauschen Sorry about that, I was still working on deciding how to deprecate the conform dependency in exrm. If you use the following in your deps it should work as expected: [ ...,
{:exrm, github: "bitwalker/exrm", branch: "v1"},
{:conform, github: "bitwalker/conform", branch: "v1} ] The change in exrm here is to move the conform plugin to conform itself, and remove the direct dependency within exrm on conform. This way use of conform is completely optional. exrm still contains some conform specific code in the boot script, but it works whether conform is present or not. |
@grundrauschen ping :) |
@bitwalker: Sorry for not responing: I am in another team at the moment but will have a look at that change in the next days |
@grundrauschen No worries :) |
@bitwalker I was trying to use the It seems the current behavior is that, when building the release, an initial |
Is that the expected behavior? |
@matehat We probably need to ensure extended schemas are archived like imports are, so that they can be extracted on the target system and consumed. Since the |
This appears to no longer be an issue with distillery and conform (latest versions). |
Hello,
I know that if the config.exs imports a config from a submodule, conform imports the settings from the imported config and adds them to the schema when using
mix conform.new
. Never the less one would have to recreate the schema every time a dependency changes its settings or translations.As a feature request I would like to ask for a function to import configurations of dependencies to add them into the configuration of the main applications.
As an example of how it should be used:
deps/dependency/config/dependency.schema.exs
config/myapp.schema.exs
using
mix conform.configure
results inThe schemas must also be imported somehow of course to use the translations.
Sincerely,
Tobias
The text was updated successfully, but these errors were encountered: