Sigils & Structs in Mix Configuration

76 views
Skip to first unread message

jon...@maennchen.ch

unread,
Mar 7, 2017, 4:51:00 PM3/7/17
to elixir-lang-core
Is it possible to load custom Structs / Sigils into a Mix configuration?

We'd like to offer a configuration option for the library quantum.

For runtime configuration a struct and also a sigil exists to allow easy configuration of cronjobs.

Example run every 7 minutes:
~e[*/7]

Example run every 2 seconds in in every second minute (e => supports seconds):
~e[*/2 */2]e

We however can't import our structs and sigils into the mix configuration.

Is there any way to achieve the same behaviour in the mix configuration?

Related GitHub Issue on quantum: https://github.com/c-rack/quantum-elixir/issues/156

Michał Muskała

unread,
Mar 7, 2017, 4:54:59 PM3/7/17
to elixir-lang-core
This is a classic chicken an egg problem - the configuration can affect how the thing is compiled, but to provide the sigil/struct you need to compile it first.

There was some talk about separating compile-time and run-time configuration, which would help here. But I don't think it ever got anywhere.

Michał.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/2215603b-9428-4ed5-9c83-541f53343e82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages