mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
Do not define info inside extension because of compile dependency (#1120)
This commit is contained in:
parent
aa09589fbd
commit
815ceff61d
1 changed files with 6 additions and 4 deletions
|
@ -83,16 +83,18 @@ defmodule MyApp.Extensions.Base do
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
defmodule Info do
|
|
||||||
use Spark.InfoGenerator, extension: MyApp.Extensions.Base, sections: [:base]
|
|
||||||
|
|
||||||
# This will define `base_timestamps?/1`.
|
|
||||||
end
|
|
||||||
|
|
||||||
use Spark.Dsl.Extension,
|
use Spark.Dsl.Extension,
|
||||||
transformers: [MyApp.Extensions.Base.AddTimestamps],
|
transformers: [MyApp.Extensions.Base.AddTimestamps],
|
||||||
sections: [@base]
|
sections: [@base]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defmodule MyApp.Extensions.Base.Info do
|
||||||
|
use Spark.InfoGenerator, extension: MyApp.Extensions.Base, sections: [:base]
|
||||||
|
|
||||||
|
# This will define `base_timestamps?/1`.
|
||||||
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
Now we can use this configuration in our transformer, like so:
|
Now we can use this configuration in our transformer, like so:
|
||||||
|
|
Loading…
Reference in a new issue