moissela
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
Hi @kernel and sorry for the delay, I've been very busy.
Just released v0.6.0 with configurable defaults on standard arguments, new uuid_argument macro (for prefixed mode when automatic prefix based on resource name is needed), some bug fixes and the new deactivable strict mode.
Let me know 😉
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
Ok, I agree
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
thank you! I've some time to work on AshUUID this afternoon (italian time zone)
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
I think #4 will be resolved through removing the global configured prefix and the new "non-strict mode" config that I'll add, can you fill an issue also for #4 ?
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
yes, per-resource prefix default generation through macro came next the global configured default that was present from beginning and now I think we can clear that config 🙂
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
For the issue I need only the example case, I'll take care of test cases on myself
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
I think we can remove the global configured prefix default because it make no sense.
If a project needs prefixed ids is because that ids should clarify which resource belongs to, so having a global unique prefix make no sense.
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
@kernel can you submit an issue with a small resource and an action with an AshUUID argument, describing your actual problem?
So that I've a reproducible example of your case that I can add to tests
I will try to release a fix for that (and the new strict mode for 4) today
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
If so, yes @kernel : I can change
constraints/0
for using configured defaults129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
Ash will call CustomType.constraints/0 for getting constraints defaults and merge them with user's overrides?
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
so, based on your advice @Zach Daniel I think I now understand something that I didn't understand when I developed AshUUID and I would like you to confirm it for me
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
ah no! you're referencing mine AshUUID.Config.get_config/1 @Zach Daniel , right?
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
which module the
get_config
fn came from? is your only an example?129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
@Zach Daniel Is there already an example of configurable extension so that I can take a look at code?
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
both as default and as override
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
and I will add a new "strict: true | false" config for 4)
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
I will try to fix 1) 2) 3) with a new uuid_argument macro tomorrow
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
yes, without another macro it could be difficult
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
I think that I can add an uuid_argument macro for using configured defaults while keeping that overridable also in arguments
129 replies
AEAsh Elixir
•Created by moissela on 8/9/2023 in #showcase
AshUUID: extension for using UUID v4 and v7, with encoding and prefixing support
Here it should be
argument :tag_id, AshUUID.UUID, allon_nil?: false
I think, because :uuid
is the Ash uuid standard type129 replies