ex_oauth2_provider icon indicating copy to clipboard operation
ex_oauth2_provider copied to clipboard

Update dependencies

Open fastjames opened this issue 3 years ago • 5 comments

In order to support use of the library in newer elixir projects (and use of dependent libraries such as phoenix_oauth2_provider, update library dependencies to the most recent available versions.

fastjames avatar Jun 21 '22 19:06 fastjames

Hat tip to @aaronsakowski who did the actual work. I read and followed his repo changes to create this PR.

fastjames avatar Jun 21 '22 19:06 fastjames

Thanks for putting together the PR @fastjames!

aaronsakowski avatar Jun 21 '22 20:06 aaronsakowski

Thanks for putting together the PR @fastjames!

Glad to help! I have a branch for https://github.com/danschultzer/phoenix_oauth2_provider that should provide the same updates, ready to PR once this is merged.

fastjames avatar Jun 21 '22 21:06 fastjames

@fastjames Hopefully this is helpful - I noticed the migrations rely on the attrs defined in the modules so this PR will cause the migrations to be generated with those columns now as nullable. If you update ExOauthProvider2.Schema.fields macro to filter out the unsupported values like null then it'll be compatible with latest Ecto and migrations will still have the ability to be non-nullable, or support really any of it's API. I just updated my fork (which has tests for the migrations) and ran into this. https://github.com/heroinbob/ex_oauth2_provider/blob/0.8.1/lib/ex_oauth2_provider/schema.ex#L39

Thanks!

heroinbob avatar Jun 28 '22 19:06 heroinbob

@fastjames Hopefully this is helpful - I noticed the migrations rely on the attrs defined in the modules so this PR will cause the migrations to be generated with those columns now as nullable. If you update ExOauthProvider2.Schema.fields macro to filter out the unsupported values like null then it'll be compatible with latest Ecto and migrations will still have the ability to be non-nullable, or support really any of it's API. I just updated my fork (which has tests for the migrations) and ran into this. https://github.com/heroinbob/ex_oauth2_provider/blob/0.8.1/lib/ex_oauth2_provider/schema.ex#L39

Thanks!

Yes, that is especially helpful since I am not actively using the library yet (so I don't get feedback from my own use). I have added a commit that implements the filter logic you demonstrated in your fork. Thanks for the pointer!

fastjames avatar Jun 30 '22 16:06 fastjames

@fastjames Hopefully this is helpful - I noticed the migrations rely on the attrs defined in the modules so this PR will cause the migrations to be generated with those columns now as nullable. If you update ExOauthProvider2.Schema.fields macro to filter out the unsupported values like null then it'll be compatible with latest Ecto and migrations will still have the ability to be non-nullable, or support really any of it's API. I just updated my fork (which has tests for the migrations) and ran into this. https://github.com/heroinbob/ex_oauth2_provider/blob/0.8.1/lib/ex_oauth2_provider/schema.ex#L39

Thanks!

FYI made a PR with just this change: https://github.com/danschultzer/ex_oauth2_provider/pull/98

jgautsch avatar Sep 26 '22 21:09 jgautsch

Thanks for the work @fastjames and @aaronsakowski! I resolved this in a different way in #100 (described why in https://github.com/danschultzer/ex_oauth2_provider/pull/98#issuecomment-1666591731).

danschultzer avatar Aug 05 '23 20:08 danschultzer