-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Upgrade typed_struct to TypedStruct? #157
Comments
I've seen a few formatter issues that people have brought up with the fork, that still haven't been addressed in that repo. I'd ideally like to allow folks to select which library they'd want. Mix doesn't support "features" like I've hacked up a small "conditional" dep trick in the @use_new_typed_struct System.get_env("BURRITO_USE_NEW_TYPED_STRUCT") != nil
# ...
defp deps do
[
get_typed_struct(),
{:req, ">= 0.4.0"},
{:jason, "~> 1.2"},
{:ex_doc, ">= 0.0.0", only: :dev}
]
end
# ...
defp get_typed_struct() do
# NOTE: This is here for those who want to use the new `:typedstruct` forked library
# to do so, set BURRITO_USE_NEW_TYPED_STRUCT=1 in your environment.
if @use_new_typed_struct do
{:typedstruct, "~> 0.5", runtime: false}
else
{:typed_struct, "~> 0.2.0 or ~> 0.3.0", runtime: false}
end
end So setting the env variable If this seems satisfactory to you, I'd go forward and merge this in. I don't want to drop the original library since it works fine, but I see the case for supporting the new one. |
Does that mean that when I do a |
It should! I did some tests locally and it appears to function as intended |
I tried to build my app with burrito, and ran into the following:
I am using the new(er) TypedStruct which is a drop-in replacement for the "classic" typed_struct, and am hence seeing this warning. Quoting from TypedStruct's README:
I have been using the new version with code of mine developed against the old typed_struct without any problems. I hence thought I'd notify you of the new version, and at the same time suggest that instead of:
you could opt to instead use:
Hoping to have helped, and looking forward to your thoughts.
The text was updated successfully, but these errors were encountered: