-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactor/project restructure #11
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zoedsoupe
added a commit
that referenced
this pull request
Oct 5, 2023
* feat: remove umbrella project * refactor: use client to storage * fix: credo * refactor: documentation * feat: add bang option to init_client/1 * fix: improve ci * feat: supabase basic tests
zoedsoupe
added a commit
that referenced
this pull request
Oct 5, 2023
* feat: remove umbrella project * refactor: use client to storage * fix: credo * refactor: documentation * feat: add bang option to init_client/1 * fix: improve ci * feat: supabase basic tests
zoedsoupe
added a commit
that referenced
this pull request
Oct 10, 2023
* feat: remove umbrella project * refactor: use client to storage * fix: credo * refactor: documentation * feat: add bang option to init_client/1 * fix: improve ci * feat: supabase basic tests
zoedsoupe
added a commit
that referenced
this pull request
Oct 10, 2023
* main: Refactor/project restructure (#11)
zoedsoupe
added a commit
that referenced
this pull request
Oct 10, 2023
* Refactor/project restructure (#11) * feat: remove umbrella project * refactor: use client to storage * fix: credo * refactor: documentation * feat: add bang option to init_client/1 * fix: improve ci * feat: supabase basic tests * feat: split supabase storage
zoedsoupe
added a commit
that referenced
this pull request
Oct 10, 2023
* Refactor/project restructure (#11) * feat: remove umbrella project * refactor: use client to storage * fix: credo * refactor: documentation * feat: add bang option to init_client/1 * fix: improve ci * feat: supabase basic tests * feat: split supabase storage
zoedsoupe
added a commit
that referenced
this pull request
Oct 10, 2023
* Refactor/project restructure (#11) * feat: remove umbrella project * refactor: use client to storage * fix: credo * refactor: documentation * feat: add bang option to init_client/1 * fix: improve ci * feat: supabase basic tests * feat: split supabase storage
zoedsoupe
added a commit
that referenced
this pull request
Oct 11, 2023
* Refactor/project restructure (#11) * feat: remove umbrella project * refactor: use client to storage * fix: credo * refactor: documentation * feat: add bang option to init_client/1 * fix: improve ci * feat: supabase basic tests * feat: split supabase storage
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The first version of the project was a PoC of the architecture of
Supabase.Client
and the oldSupabase.Connection
modules.The old structure of this library was to split Supabase integrations completely different and independent applications. That idea wasn’t discarded but somehow put in the “backlog”. Indeed, a “monolith” implementation of all-in-one library makes more sense for the current project status as somethings are not well defined, for example the
Supabase.Phoenix.UI
future module. So i took the decision to splliting applications as soon as they grow and maybe become an underwhelmed library as the same time that you want to useSupabase.Storage
it will download and compile all Phoenix stuff. That doesn’t make sense for all. To sum: until the library could coexist in single package it will, but in the future it will be splitted.Solution
Supabase.Connection
and prefer only multipleSupabase.Client
, that now owns a:conn
fieldSupabase.Client
PIDsSupabase.Client
and handle errors in a better wayIt’s imoprtant to note that the “base API” or the main API that this library exposes didn’t change for compatibility reasons and the “upgrade” from those apps spllited to this all-in-one will be easy peasy like lemon squeez.
The higher and most important chenge is the absence of
Supabase.Connection
for the current version as it is part ofSupabase.Client
struct/Agent. That means that theSupabase.init_connection/2
was discarded andSupabase.init_client/2
does not receive a list of connections anymore, as you can pass connection details directly to theSupabase.init_client/1
:There’s also a bang version of the
Supabase.init_client!/1
that will try to fetch connection details from the:supabase
application config, that can be set up on aconfig.exs
orruntime.exs
. If it fails on fetching an error will be raised and documentation will be printed on how to find these connection details.