-
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
release: v0.6.0 #49
Open
zoedsoupe
wants to merge
6
commits into
main
Choose a base branch
from
feat/update-elixir
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
release: v0.6.0 #49
+2,365
−810
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
force-pushed
the
feat/update-elixir
branch
from
January 3, 2025 01:02
993b446
to
56e1a0a
Compare
zoedsoupe
force-pushed
the
feat/update-elixir
branch
from
January 3, 2025 01:15
56e1a0a
to
534f2fb
Compare
filipecabaco
previously approved these changes
Jan 9, 2025
zoedsoupe
force-pushed
the
feat/update-elixir
branch
from
January 10, 2025 22:33
ecf1bf1
to
6d698b0
Compare
this branch/PR kinda turned into a feature/release branch, so i changed the title and edit |
zoedsoupe
force-pushed
the
feat/update-elixir
branch
from
January 10, 2025 22:35
6d698b0
to
81a7946
Compare
## Problem 1. Limited Extensibility for HTTP Requests: The existing Supabase.Fetcher lacked robust support for custom decoders, error parsers, and HTTP client backends, leading to potential limitations when integrating advanced use cases. 2. Missing Configurability for Supabase Services: Service-specific URLs and configurations were not seamlessly integrated into the Supabase.Fetcher.Request builder, potentially leading to inconsistent setups for applications. 3. Inconsistent Error Handling: The lack of a centralized error management system meant error messages could be fragmented and harder to debug. 4. Absence of Detailed Test Coverage: Existing tests did not fully validate the behavior of streaming, file uploads, and custom configurations. ## Solution 1. Enhanced HTTP Request Builder: - Introduced a fully extensible request builder API in Supabase.Fetcher.Request that allows chaining methods for custom headers, body decoders, error parsers, and HTTP clients. - Added support for service-specific URL handlers (with_<service>_url/2) to standardize endpoint configurations for services like auth, storage, and database. 2. Improved Error Handling: - Centralized error management via the Supabase.Error module, defining a unified structure for error codes, messages, metadata, and service-specific origins. - Implemented error parsers in Supabase.ErrorParser for handling transport and HTTP errors seamlessly. 3. Streaming and File Upload Support: - Added robust support for streaming large files and consuming streamed responses using Finch.stream/5 in Supabase.Fetcher.Adapter.Finch. - Introduced file upload utilities that handle file streams, content-length headers, and MIME type detection automatically. 4. Tests for Comprehensive Coverage: - Enhanced test coverage with unit tests for request building, service-specific configurations, custom decoders, and error parsers. - Included tests for file upload, streaming, and error handling scenarios, ensuring edge cases are well-tested. 5. Documentation and Clarity: - Updated module and function documentation to describe key features and example use cases, making it easier for developers to adopt the changes. - Added clear examples for implementing custom decoders and error parsers, and using the enhanced request builder API. ## Rationale 1. Developer Productivity: The improved request builder and service-specific configurations reduce boilerplate code and improve consistency across integrations. 2. Error Debugging: Centralized error handling and detailed metadata in error messages enhance troubleshooting and debugging workflows. 3. Future-Proof Design: By introducing behaviors and allowing custom implementations for HTTP clients, body decoders, and error parsers, the library becomes extensible for future needs. 4. Reliability: The expanded test coverage ensures that core features like streaming, file uploads, and error management work as expected across a variety of scenarios. 5. Alignment with Supabase Ecosystem: These changes make the library a more powerful and idiomatic choice for Elixir developers integrating with Supabase, aligning well with Supabase’s flexibility and developer-first approach.
zoedsoupe
force-pushed
the
feat/update-elixir
branch
from
January 10, 2025 22:42
81a7946
to
dcc50c3
Compare
zoedsoupe
force-pushed
the
feat/update-elixir
branch
2 times, most recently
from
January 12, 2025 23:56
f7656bc
to
a77ff35
Compare
zoedsoupe
force-pushed
the
feat/update-elixir
branch
from
January 13, 2025 01:27
a77ff35
to
e17d8bd
Compare
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 project currently uses an outdated version of Elixir, which may lack recent features and improvements introduced in newer releases. Upgrading to a more recent version can enhance performance, security, and maintainability.
Solution
This pull request updates the project's Elixir version to 1.18. This version introduces several enhancements, including:
Type System Improvements: Elixir 1.18 introduces type checking of function calls and gradual inference of patterns and return types, enhancing code reliability.
Language Server Enhancements: The new compiler lock and listener features improve development tooling by allowing multiple Elixir instances to share compilation results, reducing duplicate efforts.
Built-in JSON Support: A new
JSON
module provides functions to encode and decode JSON, streamlining data handling without external dependencies.ExUnit Enhancements: Support for parameterized tests allows running the same test module multiple times under different parameters, improving test coverage and flexibility.
Rationale
Upgrading to Elixir 1.18 ensures the project benefits from the latest language features and performance improvements. The enhancements in type checking, development tooling, and testing capabilities contribute to a more robust and efficient codebase. Additionally, built-in JSON support reduces reliance on external libraries, simplifying maintenance.
For a comprehensive overview of the new features in Elixir 1.18, you might find the following video informative: