Replace UUID.uuid4/0 by Ecto.UUID.generate/0#14
Conversation
|
Sorry for the delay! Lost track of this among other work I've been doing. |
|
I think it's a bit much to include Ecto just for the sake of generating UUIDs. It could be an optional dependency or just copy over some code. |
|
I was also considering using uniq, but then realized that that depends on |
|
@maartenvanvliet I think having it as an optional (or configurable) dependency adds more complication, as ecto's function is |
|
What do you think would be the downsides of having Ecto as a dependency? Ofc I understand it's a huge library to depend on just to get a single utility from that lib. But pragmatically most projects depend on Ecto, also one doesn't have to start the Ecto application, and in the end, isn't it just some files copied? There is the dependency version to manage, but this utility function won't change so we can be open to any version of Ecto. Just curious about your thoughts. |
The
elixir-uuidproject is dead: zyro/elixir-uuid#56From Elixir 1.12, that lib generates a warning.
Replace it by
Ecto.UUID.generate/0? Elixir projects depend already on Ecto.