Skip to content

refactor!: Use Relic instead of direct dependency on dart:io HttpServer - #3625

Merged
nielsenko merged 8 commits into
serverpod:mainfrom
nielsenko:relic-integrate
Jul 4, 2025
Merged

nielsenko merged 8 commits into
serverpod:mainfrom
nielsenko:relic-integrate

Conversation

@nielsenko

@nielsenko nielsenko commented Jun 9, 2025 •

Copy link
Copy Markdown
Collaborator

Description

This PR replaces the direct dependencies on HttpServer (from dart:io) with relic(a heavily modified fork of shelf). For now the underlying web-server below relic is still HttpServer, and there are still a few places where dart:io types are used on the public interface (such as SecurityContext, etc.).

The port to relic is minimal in the sense, that most of existing logic is kept as is. There are many places where we could utilize the features in relic more, but that can/will come in later PRs.

Closes: #

Pre-launch Checklist

  • I read the Contribute page and followed the process outlined there for submitting PRs.
  • This update contains only one single feature or bug fix and nothing else. (If you are submitting multiple fixes, please make multiple PRs.)
  • I read and followed the Dart Style Guide and formatted the code with dart format.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.
  • I added new tests to check the change I am making.
  • All existing and new tests are passing.
  • Any breaking changes are documented below.

Breaking changes

Any interface using dart:io's HttpServer (or related classes, such as dart:io's Request and Response) has been changed.

Some functionality previously available, such as ConnectionInfo is no longer available (no point in tracking the remote IP address and port of your load balancer).

Summary by CodeRabbit

  • New Features

    • Introduced a new web server framework with enhanced routing, server-side widgets, and improved request/response handling.
    • Added a consolidated import for web server components, simplifying integration.
  • Refactor

    • Migrated server and WebSocket internals to use new abstractions for improved modularity and extensibility.
    • Replaced legacy request and connection handling with modern, header-based client identification.
    • Updated method and class signatures across the codebase for consistency with new request types.
  • Bug Fixes

    • Improved static file serving with better MIME type handling and streaming support.
    • Enhanced error handling and logging for web and WebSocket requests.
  • Chores

    • Updated dependencies to include new packages for server and WebSocket functionality.
    • Adjusted version constraints and formatting in configuration files.
  • Tests

    • Updated integration and unit tests to align with the new server and WebSocket implementations.

@nielsenko
nielsenko force-pushed the relic-integrate branch 4 times, most recently from 708f5dd to a8c6cc3 Compare June 12, 2025 11:23
@coderabbitai

coderabbitai Bot commented Jun 12, 2025 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

This update overhauls Serverpod's web server and WebSocket handling by replacing direct dart:io usage with abstractions from the relic and web_socket packages. It introduces a new modular web server framework, updates request and session handling to use new types, and migrates static file serving, diagnostics, and tests to the new architecture. Numerous API signatures are updated for consistency, and several obsolete files and exports are removed.

Changes

File(s) / Path(s) Change Summary
packages/serverpod/lib/src/server/server.dart
.../websocket_request_handlers/endpoint_websocket_request_handler.dart
.../websocket_request_handlers/method_websocket_request_handler.dart
.../websocket_request_handlers/helpers/method_stream_manager.dart
.../session.dart
.../endpoint_dispatch.dart
.../endpoint.dart
.../operation_context.dart
.../operation_context_helpers.dart
.../cloud_storage/public_endpoint.dart
Major refactor: Replaces dart:io (HttpServer, HttpRequest, WebSocket) with relic and web_socket abstractions (RelicServer, Request, RelicWebSocket). Updates session, endpoint, diagnostics, and request/response handling to new types. Refactors WebSocket event processing, error handling, and context creation. Updates method/field signatures and class hierarchies for consistency and immutability.
packages/serverpod/lib/src/web_server/web_server.dart
.../web_widget.dart
web_server.dart
Adds a new modular web server implementation (WebServer, Route, ComponentRoute, ServerpodRouter, widgets) and a central export file for web server components.
packages/serverpod/lib/src/web_server/routes/static_directory.dart Refactors static file serving to use streaming, context-aware handling, and improved MIME type mapping. Method signature and error handling updated.
packages/serverpod/lib/src/util/request_extension.dart Adds extension to extract remote client info from HTTP headers on Request.
packages/serverpod/lib/src/util/http_request_extension.dart
.../diagnostic_events/connection_info.dart
.../src/relic/web_server.dart
.../relic.dart
Removes obsolete files: HttpRequest extension, connection info class, old relic web server implementation, and relic export aggregator.
packages/serverpod/lib/diagnostic_events.dart
.../src/server/diagnostic_events/diagnostic_events.dart
Removes export of obsolete connection_info.dart.
packages/serverpod/lib/server.dart
serverpod.dart
Updates exports: hides internal symbols, replaces relic exports with new web server exports, adds new request extension, and adjusts utility exports.
packages/serverpod/lib/src/server/features.dart Updates import to new web server, adjusts route-check logic.
packages/serverpod/lib/src/server/health_check.dart Updates connection info retrieval for health checks to use new server abstraction and null-aware access.
examples/auth_example/auth_example_server/lib/src/web/routes/root.dart
examples/chat/chat_server/lib/src/web/routes/root.dart
modules/serverpod_auth/serverpod_auth_server/lib/src/web/routes/route_google_sign_in.dart
templates/serverpod_templates/projectname_server_upgrade/lib/src/web/routes/root.dart
tests/serverpod_new_auth_test/serverpod_new_auth_test_server/lib/src/web/routes/root.dart
tests/serverpod_test_nonvector/serverpod_test_nonvector_server/lib/src/web/routes/root.dart
tests/serverpod_test_server/lib/src/web/routes/root.dart
tests/serverpod_test_server/test_integration/diagnostics/diagnostic_events_test.dart
Updates route handler method signatures from HttpRequest to Request. Removes dart:io imports.
modules/new_serverpod_auth/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart
modules/serverpod_auth/serverpod_auth_server/lib/src/business/email_auth.dart
Updates IP extraction logic to use new remoteInfo property on Request instead of HttpRequest extension.
tests/serverpod_test_server/lib/src/endpoints/echo_request.dart Updates header access to use Request and ensures consistent return type.
tests/serverpod_test_server/test_integration/security_context_test.dart Updates server port access to use new port property.
tests/serverpod_test_server/test_e2e/cloud_storage_test.dart Removes assertion on response body length for 404 file-not-found test.
tests/serverpod_test_server/test_integration/auth_module/email_auth_provider/account_request_test.dart Simplifies test description string.
tests/serverpod_test_server/test_integration/websockets/method_websockets/method_streams/reconnect_to_server_test.dart Reformats test description string.
packages/serverpod/lib/src/server/diagnostic_events/operation_context.dart
.../operation_context_helpers.dart
Diagnostic event context now uses remoteInfo string instead of ConnectionInfo object. Updates serialization and context creation accordingly.
packages/serverpod/pubspec.yaml
serverpod_client/pubspec.yaml
tests/serverpod_test_server/pubspec.yaml
templates/pubspecs/packages/serverpod/pubspec.yaml
templates/pubspecs/packages/serverpod_client/pubspec.yaml
templates/pubspecs/tests/serverpod_test_server/pubspec.yaml
Adds relic and/or web_socket as new dependencies.
modules/serverpod_auth/serverpod_auth_apple_flutter/pubspec.yaml
modules/serverpod_auth/serverpod_auth_firebase_flutter/pubspec.yaml
templates/pubspecs/modules/serverpod_auth/serverpod_auth_apple_flutter/pubspec.yaml
templates/pubspecs/modules/serverpod_auth/serverpod_auth_firebase_flutter/pubspec.yaml
Updates dependency version constraint formatting for material_design_icons_flutter.
packages/serverpod_client/test/integration/method_stream_manager_connection_test.dart
.../test_utils/test_web_socket_server.dart
.../test/integration/test_web_socket_server_test.dart
Refactors WebSocket tests to use RelicWebSocket and event-based message handling. Updates server/test harness to use new abstractions.
packages/serverpod_test/lib/src/test_stream_manager.dart Updates MethodStreamManager instantiation to use request instead of httpRequest.
tests/serverpod_new_auth_test/serverpod_new_auth_test_flutter/lib/serverpod_new_auth_test_flutter.dart Removes named library declaration.

Sequence Diagram(s)

High-Level Web Server Request Handling (New Flow)

sequenceDiagram
    participant Client
    participant RelicServer
    participant WebServer
    participant ServerpodRouter
    participant Route
    participant WebCallSession

    Client->>RelicServer: HTTP Request
    RelicServer->>WebServer: Request (NewContext)
    WebServer->>ServerpodRouter: Find Route for method/path
    alt Route found
        WebServer->>WebCallSession: Create session
        WebServer->>Route: handleCall(session, context)
        Route-->>WebServer: HandledContext (response)
        WebServer->>RelicServer: Return response
    else No route
        WebServer->>RelicServer: Return 404 response
    end
    RelicServer-->>Client: HTTP Response
Loading

WebSocket Upgrade and Handling (New Flow)

sequenceDiagram
    participant Client
    participant RelicServer
    participant WebServer
    participant RelicWebSocket
    participant WebSocketHandler

    Client->>RelicServer: WebSocket Upgrade Request
    RelicServer->>WebServer: NewContext.connect()
    WebServer->>RelicWebSocket: Establish connection
    WebServer->>WebSocketHandler: handleWebsocket(server, RelicWebSocket, Request, onClosed)
    WebSocketHandler->>RelicWebSocket: Listen for events
    loop While connected
        RelicWebSocket-->>WebSocketHandler: Text/Binary/Close Event
        WebSocketHandler-->>RelicWebSocket: Send response (sendText/sendBytes/tryClose)
    end
Loading

Static File Serving (New Flow)

sequenceDiagram
    participant Client
    participant RelicServer
    participant WebServer
    participant ServerpodRouter
    participant RouteStaticDirectory

    Client->>RelicServer: HTTP GET /static/file.txt
    RelicServer->>WebServer: Request (NewContext)
    WebServer->>ServerpodRouter: Find RouteStaticDirectory
    WebServer->>RouteStaticDirectory: handleCall(session, context)
    alt File exists
        RouteStaticDirectory->>WebServer: HandledContext (stream file, set MIME/cache headers)
        WebServer->>RelicServer: Return file response
    else File not found
        RouteStaticDirectory->>WebServer: HandledContext (404 response)
        WebServer->>RelicServer: Return 404 response
    end
    RelicServer-->>Client: HTTP Response (file or 404)
Loading

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@nielsenko
nielsenko force-pushed the relic-integrate branch 14 times, most recently from 0187423 to cf54c72 Compare June 19, 2025 07:57
@nielsenko nielsenko self-assigned this Jun 19, 2025
@nielsenko
nielsenko force-pushed the relic-integrate branch 10 times, most recently from 51155fd to 63d1e31 Compare June 30, 2025 07:21
@nielsenko
nielsenko force-pushed the relic-integrate branch 3 times, most recently from 45905de to 03387df Compare July 3, 2025 07:45
@nielsenko

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 3, 2025

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🧹 Nitpick comments (12)
tests/serverpod_test_server/test_integration/websockets/method_websockets/method_streams/reconnect_to_server_test.dart (1)

30-32: String split is fine; consider multi-line literals for readability.

Minor: triple-quoted or raw multi-line strings can avoid the adjacent-literal pattern, but current form is perfectly valid.

packages/serverpod/lib/src/util/request_extension.dart (1)

10-14: Well-implemented header-based client info extraction.

The implementation correctly follows RFC 7239 standards by preferring the Forwarded header over X-Forwarded-For, with appropriate null-aware access and a sensible fallback to 'unknown'. This provides consistent remote client information across the Request abstraction.

Consider adding documentation about the header precedence logic:

  /// Returns information about the remote client that made the request.
  ///
- /// The information is extracted from HTTP headers, preferring the
- /// `Forwarded` header, and using the `X-Forwarded-For` header as a fallback.
+ /// The information is extracted from HTTP headers following RFC 7239:
+ /// 1. `Forwarded` header (standard, preferred)
+ /// 2. `X-Forwarded-For` header (legacy fallback)
+ /// 3. 'unknown' if no headers are available
  /// If no information can be extracted, it returns 'unknown'.
packages/serverpod/lib/src/server/diagnostic_events/operation_context.dart (1)

98-104: Document remoteInfo and include in toString

Add a dart-doc explaining expected format (e.g. "ip:port"), and override toString in ClientCallOpContext to include it for easier debugging.

packages/serverpod_client/test/integration/method_stream_manager_connection_test.dart (1)

452-456: Consider moving textEvents extension to shared test utils

Multiple tests will likely need this helper. Relocating it to test_utils/relic_web_socket_extensions.dart avoids duplication.

packages/serverpod/lib/src/server/diagnostic_events/operation_context_helpers.dart (1)

120-121: Synthetic fallback URI may mislead tooling

Uri.http('localhost') lacks a path and can confuse logs/metrics.
Prefer Uri() or omit when unknown.

packages/serverpod/lib/src/web_server/web_widget.dart (2)

1-3: Prefer dart: imports before package: imports

Dart style recommends putting dart: imports first to avoid churn in automatic formatters.


54-60: Simplify WidgetList.toString

You can drop the manual loop and rely on List.join:

-    var rendered = <String>[];
-    for (var widget in widgets) {
-      rendered.add(widget.toString());
-    }
-    return rendered.join('\n');
+    return widgets.join('\n');

This is shorter and avoids an intermediate list allocation.

packages/serverpod_client/test/test_utils/test_web_socket_server.dart (1)

46-48: Include path component in constructed WebSocket URI

If tests rely on a non-root path (/), assemble it explicitly:

-    Uri.parse('ws://${InternetAddress.loopbackIPv4.host}:${adapter.port}');
+    Uri.parse('ws://${InternetAddress.loopbackIPv4.host}:${adapter.port}/');

Prevents subtle “404” or upgrade errors when clients append their own path.

packages/serverpod/lib/src/cloud_storage/public_endpoint.dart (1)

41-46: Consider fallback for unknown extensions

If the extension isn’t mapped the method always returns application/octet-stream.
Adding a configurable fallback or logging unknown types aids debugging static-file issues.

packages/serverpod/lib/src/web_server/web_server.dart (1)

52-56: Duplicate-route safety.

addRoute mutates a private _matchPath field and adds the route to the router without checking for an existing entry.
Consider guarding against accidental double-registration to avoid unpredictable routing.

packages/serverpod/lib/src/server/server.dart (2)

225-231: Hard-coding content-length: 0 looks suspicious.

Manually zeroing Content-Length for every OPTIONS pre-flight may break middleware that wants to set its own value or use chunked encoding.
Unless mandated by a specific client, you can omit the header entirely—HTTP allows empty bodies without it.


328-350: Labelled-continue switch is clever but opaque.

The multi-stage continue body/bytes/response dance works, yet it is hard to parse at a glance and will surprise many reviewers.
A small helper (e.g. _rawToResponse(value, headers)) would convey intent without relying on fall-through labels.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 41cee63 and 97ac4e3.

📒 Files selected for processing (55)
  • examples/auth_example/auth_example_server/lib/src/web/routes/root.dart (1 hunks)
  • examples/chat/chat_server/lib/src/web/routes/root.dart (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart (1 hunks)
  • modules/serverpod_auth/serverpod_auth_apple_flutter/pubspec.yaml (1 hunks)
  • modules/serverpod_auth/serverpod_auth_firebase_flutter/pubspec.yaml (1 hunks)
  • modules/serverpod_auth/serverpod_auth_server/lib/src/business/email_auth.dart (1 hunks)
  • modules/serverpod_auth/serverpod_auth_server/lib/src/web/routes/route_google_sign_in.dart (1 hunks)
  • packages/serverpod/lib/diagnostic_events.dart (0 hunks)
  • packages/serverpod/lib/relic.dart (0 hunks)
  • packages/serverpod/lib/server.dart (1 hunks)
  • packages/serverpod/lib/serverpod.dart (1 hunks)
  • packages/serverpod/lib/src/cloud_storage/public_endpoint.dart (3 hunks)
  • packages/serverpod/lib/src/relic/web_server.dart (0 hunks)
  • packages/serverpod/lib/src/server/diagnostic_events/connection_info.dart (0 hunks)
  • packages/serverpod/lib/src/server/diagnostic_events/diagnostic_events.dart (0 hunks)
  • packages/serverpod/lib/src/server/diagnostic_events/operation_context.dart (5 hunks)
  • packages/serverpod/lib/src/server/diagnostic_events/operation_context_helpers.dart (5 hunks)
  • packages/serverpod/lib/src/server/endpoint.dart (2 hunks)
  • packages/serverpod/lib/src/server/endpoint_dispatch.dart (7 hunks)
  • packages/serverpod/lib/src/server/features.dart (2 hunks)
  • packages/serverpod/lib/src/server/health_check.dart (2 hunks)
  • packages/serverpod/lib/src/server/server.dart (14 hunks)
  • packages/serverpod/lib/src/server/session.dart (5 hunks)
  • packages/serverpod/lib/src/server/websocket_request_handlers/endpoint_websocket_request_handler.dart (7 hunks)
  • packages/serverpod/lib/src/server/websocket_request_handlers/helpers/method_stream_manager.dart (4 hunks)
  • packages/serverpod/lib/src/server/websocket_request_handlers/method_websocket_request_handler.dart (11 hunks)
  • packages/serverpod/lib/src/util/http_request_extension.dart (0 hunks)
  • packages/serverpod/lib/src/util/request_extension.dart (1 hunks)
  • packages/serverpod/lib/src/web_server/routes/static_directory.dart (5 hunks)
  • packages/serverpod/lib/src/web_server/web_server.dart (1 hunks)
  • packages/serverpod/lib/src/web_server/web_widget.dart (1 hunks)
  • packages/serverpod/lib/web_server.dart (1 hunks)
  • packages/serverpod/pubspec.yaml (2 hunks)
  • packages/serverpod_client/pubspec.yaml (1 hunks)
  • packages/serverpod_client/test/integration/method_stream_manager_connection_test.dart (9 hunks)
  • packages/serverpod_client/test/integration/test_web_socket_server_test.dart (3 hunks)
  • packages/serverpod_client/test/test_utils/test_web_socket_server.dart (3 hunks)
  • packages/serverpod_test/lib/src/test_stream_manager.dart (1 hunks)
  • templates/pubspecs/modules/serverpod_auth/serverpod_auth_apple_flutter/pubspec.yaml (1 hunks)
  • templates/pubspecs/modules/serverpod_auth/serverpod_auth_firebase_flutter/pubspec.yaml (1 hunks)
  • templates/pubspecs/packages/serverpod/pubspec.yaml (2 hunks)
  • templates/pubspecs/packages/serverpod_client/pubspec.yaml (1 hunks)
  • templates/pubspecs/tests/serverpod_test_server/pubspec.yaml (1 hunks)
  • templates/serverpod_templates/projectname_server_upgrade/lib/src/web/routes/root.dart (1 hunks)
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_flutter/lib/serverpod_new_auth_test_flutter.dart (1 hunks)
  • tests/serverpod_new_auth_test/serverpod_new_auth_test_server/lib/src/web/routes/root.dart (1 hunks)
  • tests/serverpod_test_nonvector/serverpod_test_nonvector_server/lib/src/web/routes/root.dart (1 hunks)
  • tests/serverpod_test_server/lib/src/endpoints/echo_request.dart (1 hunks)
  • tests/serverpod_test_server/lib/src/web/routes/root.dart (1 hunks)
  • tests/serverpod_test_server/pubspec.yaml (1 hunks)
  • tests/serverpod_test_server/test_e2e/cloud_storage_test.dart (0 hunks)
  • tests/serverpod_test_server/test_integration/auth_module/email_auth_provider/account_request_test.dart (1 hunks)
  • tests/serverpod_test_server/test_integration/diagnostics/diagnostic_events_test.dart (3 hunks)
  • tests/serverpod_test_server/test_integration/security_context_test.dart (8 hunks)
  • tests/serverpod_test_server/test_integration/websockets/method_websockets/method_streams/reconnect_to_server_test.dart (1 hunks)
💤 Files with no reviewable changes (7)
  • packages/serverpod/lib/diagnostic_events.dart
  • packages/serverpod/lib/src/server/diagnostic_events/diagnostic_events.dart
  • tests/serverpod_test_server/test_e2e/cloud_storage_test.dart
  • packages/serverpod/lib/src/util/http_request_extension.dart
  • packages/serverpod/lib/relic.dart
  • packages/serverpod/lib/src/server/diagnostic_events/connection_info.dart
  • packages/serverpod/lib/src/relic/web_server.dart
🧰 Additional context used
🧠 Learnings (44)
📓 Common learnings
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: nielsenko
PR: serverpod/serverpod#3695
File: packages/serverpod_client/lib/src/file_uploader.dart:57-63
Timestamp: 2025-06-20T07:18:29.965Z
Learning: MultipartFile uploads in the Serverpod FileUploader require knowing the content length due to the inherent nature of the multipart protocol. When length is unknown, falling back to `await stream.toBytes()` is necessary. The main streaming benefit of the FileUploader refactor is realized in binary uploads (`_UploadType.binary`) where `StreamedRequest` allows immediate streaming without reading the full content into memory first.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
modules/serverpod_auth/serverpod_auth_firebase_flutter/pubspec.yaml (6)
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
templates/pubspecs/modules/serverpod_auth/serverpod_auth_firebase_flutter/pubspec.yaml (4)
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
tests/serverpod_test_server/test_integration/auth_module/email_auth_provider/account_request_test.dart (5)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts_admin.dart:130-143
Timestamp: 2025-06-17T11:38:13.087Z
Learning: In serverpod_auth_email_account EmailAccountsAdmin, tp prefers relying on database unique constraint exceptions over application-level pre-insert checks for email uniqueness, especially in contexts with longer-running transactions where TOCTOU issues could still occur.
tests/serverpod_test_server/pubspec.yaml (9)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
packages/serverpod/pubspec.yaml (8)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
templates/pubspecs/packages/serverpod/pubspec.yaml (8)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
packages/serverpod_client/pubspec.yaml (7)
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
tests/serverpod_test_server/test_integration/websockets/method_websockets/method_streams/reconnect_to_server_test.dart (3)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/test/integration/auth_migration_email_test.dart:0-0
Timestamp: 2025-06-20T12:49:16.373Z
Learning: In test files, when testing that an async method completes without error (especially when the test name/description mentions "completes without error"), use the pattern `await expectLater(asyncMethodCall(), completes)` instead of just `await asyncMethodCall()`. This makes the test intention explicit and provides better test failure messages. However, don't apply this pattern to setup calls or when testing side effects rather than completion behavior. For tests that check both completion and side effects, consider splitting into separate tests or prioritize the primary assertion.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/test/integration/auth_migration_email_test.dart:0-0
Timestamp: 2025-06-20T12:49:16.373Z
Learning: In test files, when testing that an async method completes without error (especially when the test name/description mentions "completes without error"), use the pattern `await expectLater(asyncMethodCall(), completes)` instead of just `await asyncMethodCall()`. This makes the test intention explicit and provides better test failure messages. However, don't apply this pattern to setup calls or when testing side effects rather than completion behavior.
templates/pubspecs/tests/serverpod_test_server/pubspec.yaml (6)
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
packages/serverpod_test/lib/src/test_stream_manager.dart (2)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
templates/pubspecs/packages/serverpod_client/pubspec.yaml (7)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
templates/pubspecs/modules/serverpod_auth/serverpod_auth_apple_flutter/pubspec.yaml (3)
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
templates/serverpod_templates/projectname_server_upgrade/lib/src/web/routes/root.dart (2)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
tests/serverpod_new_auth_test/serverpod_new_auth_test_flutter/lib/serverpod_new_auth_test_flutter.dart (6)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
modules/serverpod_auth/serverpod_auth_server/lib/src/web/routes/route_google_sign_in.dart (4)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
packages/serverpod/lib/src/server/features.dart (5)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
tests/serverpod_test_nonvector/serverpod_test_nonvector_server/lib/src/web/routes/root.dart (1)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
packages/serverpod/lib/server.dart (6)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
examples/chat/chat_server/lib/src/web/routes/root.dart (1)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
examples/auth_example/auth_example_server/lib/src/web/routes/root.dart (1)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart (2)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
packages/serverpod/lib/src/server/health_check.dart (7)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: exaby73
PR: serverpod/serverpod#3619
File: packages/serverpod/lib/src/server/health_check_manager.dart:101-105
Timestamp: 2025-06-12T12:35:14.157Z
Learning: In Serverpod’s HealthCheckManager, the ServerpodRole.serverless mode intentionally does not schedule subsequent health-checks or invoke the completion callback; only monolith continues scheduling and maintenance runs once then exits.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
modules/serverpod_auth/serverpod_auth_apple_flutter/pubspec.yaml (3)
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
modules/serverpod_auth/serverpod_auth_server/lib/src/business/email_auth.dart (4)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email/serverpod_auth_email_server/lib/src/endpoints/email_account_endpoint.dart:37-49
Timestamp: 2025-06-16T12:08:40.049Z
Learning: In serverpod_auth_email_server, the startRegistration method intentionally does not propagate EmailAccountRequestResult failures to the caller to prevent information leakage about account existence. Only server-side logging is performed for admin monitoring purposes.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: In Serverpod auth modules, failed login attempt logging (like `_logFailedSignIn`) is intentionally kept in separate transactions to prevent rollback when exceptions occur. This is because exceptions are widely used for normal control flow (e.g., invalid credentials), and the rate-limiting entries need to persist even when the outer transaction rolls back due to these expected exceptions.
tests/serverpod_test_server/test_integration/security_context_test.dart (6)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
tests/serverpod_new_auth_test/serverpod_new_auth_test_server/lib/src/web/routes/root.dart (4)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
packages/serverpod/lib/web_server.dart (3)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
packages/serverpod_client/test/integration/test_web_socket_server_test.dart (3)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
packages/serverpod/lib/src/server/websocket_request_handlers/helpers/method_stream_manager.dart (3)
Learnt from: nielsenko
PR: serverpod/serverpod#3695
File: packages/serverpod_client/lib/src/file_uploader.dart:57-63
Timestamp: 2025-06-20T07:18:29.965Z
Learning: MultipartFile uploads in the Serverpod FileUploader require knowing the content length due to the inherent nature of the multipart protocol. When length is unknown, falling back to `await stream.toBytes()` is necessary. The main streaming benefit of the FileUploader refactor is realized in binary uploads (`_UploadType.binary`) where `StreamedRequest` allows immediate streaming without reading the full content into memory first.
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
packages/serverpod/lib/serverpod.dart (6)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
packages/serverpod/lib/src/web_server/web_widget.dart (1)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
packages/serverpod_client/test/integration/method_stream_manager_connection_test.dart (4)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
packages/serverpod/lib/src/server/websocket_request_handlers/method_websocket_request_handler.dart (2)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
packages/serverpod/lib/src/server/diagnostic_events/operation_context_helpers.dart (6)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
packages/serverpod/lib/src/web_server/routes/static_directory.dart (2)
Learnt from: nielsenko
PR: serverpod/serverpod#3695
File: packages/serverpod_client/lib/src/file_uploader.dart:57-63
Timestamp: 2025-06-20T07:18:29.965Z
Learning: MultipartFile uploads in the Serverpod FileUploader require knowing the content length due to the inherent nature of the multipart protocol. When length is unknown, falling back to `await stream.toBytes()` is necessary. The main streaming benefit of the FileUploader refactor is realized in binary uploads (`_UploadType.binary`) where `StreamedRequest` allows immediate streaming without reading the full content into memory first.
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
packages/serverpod_client/test/test_utils/test_web_socket_server.dart (3)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
packages/serverpod/lib/src/server/websocket_request_handlers/endpoint_websocket_request_handler.dart (1)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
tests/serverpod_test_server/lib/src/web/routes/root.dart (1)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
packages/serverpod/lib/src/server/session.dart (2)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
packages/serverpod/lib/src/server/endpoint_dispatch.dart (6)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: exaby73
PR: serverpod/serverpod#3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.005Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: tp
PR: serverpod/serverpod#3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
packages/serverpod/lib/src/cloud_storage/public_endpoint.dart (4)
Learnt from: nielsenko
PR: serverpod/serverpod#3695
File: packages/serverpod_client/lib/src/file_uploader.dart:57-63
Timestamp: 2025-06-20T07:18:29.965Z
Learning: MultipartFile uploads in the Serverpod FileUploader require knowing the content length due to the inherent nature of the multipart protocol. When length is unknown, falling back to `await stream.toBytes()` is necessary. The main streaming benefit of the FileUploader refactor is realized in binary uploads (`_UploadType.binary`) where `StreamedRequest` allows immediate streaming without reading the full content into memory first.
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migration_email.dart:0-0
Timestamp: 2025-06-17T13:04:19.522Z
Learning: In serverpod_auth_migration profile image migration, the image must be fetched from the URL rather than just copying the URL because the database schema requires storing the storage bucket and relative path information in addition to the public URL. This storage information is necessary for proper cleanup when profiles are deleted. The fetch approach works fine in production but requires localhost exclusion in testing environments where no HTTP file server is running.
packages/serverpod/lib/src/web_server/web_server.dart (2)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
packages/serverpod/lib/src/server/server.dart (4)
Learnt from: tp
PR: serverpod/serverpod#3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.898Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Learnt from: tp
PR: serverpod/serverpod#3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.671Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Learnt from: tp
PR: serverpod/serverpod#3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Learnt from: nielsenko
PR: serverpod/serverpod#3695
File: packages/serverpod_client/lib/src/file_uploader.dart:57-63
Timestamp: 2025-06-20T07:18:29.965Z
Learning: MultipartFile uploads in the Serverpod FileUploader require knowing the content length due to the inherent nature of the multipart protocol. When length is unknown, falling back to `await stream.toBytes()` is necessary. The main streaming benefit of the FileUploader refactor is realized in binary uploads (`_UploadType.binary`) where `StreamedRequest` allows immediate streaming without reading the full content into memory first.
⏰ Context from checks skipped due to timeout of 90000ms (15)
  • GitHub Check: Serverpod integration tests (server) (3.32.1)
  • GitHub Check: Serverpod integration tests (server) (3.24.0)
  • GitHub Check: Unit tests IO (3.32.1, ubuntu-latest)
  • GitHub Check: Migration e2e tests (3.32.1)
  • GitHub Check: Serverpod E2E web tests (3.32.1)
  • GitHub Check: Migration e2e tests (3.24.0)
  • GitHub Check: Serverpod E2E web tests (3.24.0)
  • GitHub Check: Unit tests IO (3.24.0, windows-latest)
  • GitHub Check: Bootstrap tests (3.32.1, windows-latest, tests/bootstrap_project)
  • GitHub Check: Unit tests IO (3.32.1, windows-latest)
  • GitHub Check: dart analyze downgrade (3.32.1, windows-latest)
  • GitHub Check: dart analyze downgrade (3.24.0, windows-latest)
  • GitHub Check: serverpod generate (3.32.1)
  • GitHub Check: dart analyze latest (3.32.1, windows-latest)
  • GitHub Check: serverpod generate (3.24.0)
🔇 Additional comments (45)
templates/pubspecs/modules/serverpod_auth/serverpod_auth_apple_flutter/pubspec.yaml (1)

17-17: Version constraint correctly normalized

Switching to the compact form '>=6.0.0 <8.0.0' removes the invalid space between < and the version number and aligns with pub’s version-constraint grammar. Looks good.

modules/serverpod_auth/serverpod_auth_firebase_flutter/pubspec.yaml (1)

19-19: Dependency constraint style standardized – looks good

Switching to single quotes keeps pubspec.yaml formatting consistent across modules; no functional impact.

templates/pubspecs/modules/serverpod_auth/serverpod_auth_firebase_flutter/pubspec.yaml (1)

18-18: Template kept in sync – change approved

Template reflects the same single-quote style, ensuring future generated pubspecs remain consistent.

modules/serverpod_auth/serverpod_auth_apple_flutter/pubspec.yaml (1)

18-18: Uniform quoting across Flutter auth modules – approved

The single-quote / no-space version range matches other auth modules; YAML remains valid.

templates/pubspecs/packages/serverpod_client/pubspec.yaml (1)

20-22: Relic import presence in generated lib/ can’t be auto-verified
The template directory doesn’t contain a lib/ folder, so our runtime‐import grep can’t run here. Please manually verify in your generated serverpod_client package that no files under lib/ import package:relic/….

  • If any runtime imports of Relic exist, move it from dev_dependencies: to dependencies: in pubspec.yaml
  • Otherwise it’s safe to keep relic under dev_dependencies:
tests/serverpod_test_server/pubspec.yaml (1)

14-16: New relic dependency aligns with the refactor – LGTM.

Dependency scope & version match the rest of the workspace. No objections.

templates/pubspecs/tests/serverpod_test_server/pubspec.yaml (1)

12-15: Template kept in sync – looks correct.

Keeping the template updated prevents future divergence between generated and checked-in pubspecs.

templates/pubspecs/packages/serverpod/pubspec.yaml (1)

31-41: Addition of relic and web_socket is consistent, but double-check naming.

relic 👍.
For WebSocket support, most ecosystems use web_socket_channel; ensure web_socket ^1.0.0 is the intended package name (it exists but is far less common). If accidental, fix before publishing to avoid broken resolves.

packages/serverpod/pubspec.yaml (1)

32-41: Core package updated – verify web_socket package choice.

Same note as above: confirm that web_socket ^1.0.0 is the desired dependency and compatible with relic.

packages/serverpod_client/pubspec.yaml (1)

18-18: LGTM! Dependencies added to support relic migration.

The addition of web_socket as a runtime dependency and relic as a dev dependency correctly supports the migration from direct dart:io usage to the new abstractions.

Also applies to: 22-22

tests/serverpod_new_auth_test/serverpod_new_auth_test_flutter/lib/serverpod_new_auth_test_flutter.dart (1)

1-1: LGTM! Library declaration updated to unnamed library.

The change from a named library to an unnamed library is valid and follows modern Dart conventions.

packages/serverpod_test/lib/src/test_stream_manager.dart (1)

43-43: LGTM! Parameter updated to align with Request abstraction.

The change from httpRequest: null to request: null correctly aligns with the migration from HttpRequest to the generic Request abstraction.

tests/serverpod_test_server/test_integration/auth_module/email_auth_provider/account_request_test.dart (1)

39-39: LGTM! Test description simplified.

The change from concatenated string literals to a single string improves readability while maintaining the same test semantics.

examples/chat/chat_server/lib/src/web/routes/root.dart (1)

6-6: LGTM! Method signature updated to use Request abstraction.

The change from HttpRequest request to Request request correctly aligns with the migration from dart:io types to the relic package abstractions. The method implementation remains unchanged, which is appropriate since the request parameter is not used.

examples/auth_example/auth_example_server/lib/src/web/routes/root.dart (1)

6-6: Clean migration to Request abstraction

The parameter type change from HttpRequest to Request aligns perfectly with the PR's objective to replace direct dart:io dependencies with relic package abstractions. Since the method doesn't utilize the request parameter, this change maintains full backward compatibility while enabling the new architecture.

templates/serverpod_templates/projectname_server_upgrade/lib/src/web/routes/root.dart (1)

6-6: Template updated correctly for new Request abstraction

The parameter type change ensures that new projects generated from this template will use the updated Request abstraction instead of the legacy HttpRequest. This maintains consistency with the broader migration across the codebase.

modules/serverpod_auth/serverpod_auth_server/lib/src/web/routes/route_google_sign_in.dart (1)

9-9: Auth module route successfully migrated

The parameter type change from HttpRequest to Request is consistent with the broader migration. The Google sign-in functionality remains unaffected since the request parameter is not utilized in the method body.

tests/serverpod_test_server/lib/src/web/routes/root.dart (1)

8-8: Test infrastructure updated consistently

The parameter type change maintains consistency with the migration to Request abstractions. This ensures that test infrastructure aligns with the new architecture while preserving existing test functionality.

packages/serverpod/lib/src/server/features.dart (2)

1-1: Import updated for new web server architecture

The import change from relic.dart to web_server.dart correctly aligns with the migration to the new web server implementation that replaces the relic-based approach.


30-30: Manual check required: confirm router.isEmpty semantics

  • WebServer.router is a ServerpodRouter instance and exposes an isEmpty getter.
  • I wasn’t able to locate the ServerpodRouter implementation to verify that its isEmpty truly means “no routes configured.”
  • No remaining references to the old routes.isEmpty were found.

Please manually verify that router.isEmpty returns true exactly when there are no routes—matching the former routes.isEmpty behavior.

packages/serverpod/lib/server.dart (1)

10-10: Proper encapsulation of internal methods.

Hiding ServerInternalMethods from the public API is appropriate for this refactor, as it prevents external code from accessing internal server implementation details that are now abstracted through the Relic package.

tests/serverpod_test_server/test_integration/security_context_test.dart (1)

115-115: Test updates correctly reflect the new server API.

The changes from serverpod.<server>.httpServer.port to serverpod.<server>.port are consistent with the Relic refactor where the HttpServer is now encapsulated. These updates maintain test functionality while adapting to the new server API.

Also applies to: 124-124, 151-151, 162-162, 193-193, 202-202, 232-232, 243-243

tests/serverpod_test_nonvector/serverpod_test_nonvector_server/lib/src/web/routes/root.dart (1)

6-6: Route method signature correctly updated for new request abstraction.

The change from HttpRequest to Request parameter is consistent with the Relic refactor, replacing direct dart:io usage with the new request abstraction while maintaining the same functionality.

tests/serverpod_new_auth_test/serverpod_new_auth_test_server/lib/src/web/routes/root.dart (1)

6-6: Route method signature correctly updated for new request abstraction.

The change from HttpRequest to Request parameter is consistent with the Relic refactor, replacing direct dart:io usage with the new request abstraction while maintaining the same functionality.

packages/serverpod/lib/src/server/endpoint.dart (2)

45-50: Getter name generalized appropriately.

The change from sendByteDataAsRaw to sendAsRaw is a good generalization that makes the getter name more descriptive of its actual purpose - controlling whether any returned value is sent as raw data, not just ByteData.


95-95: WebSocket method call correctly updated for new abstraction.

The change from add(payload) to sendText(payload) is consistent with the Relic refactor, using the new WebSocket abstraction's explicit text sending method instead of the generic add method.

packages/serverpod/lib/src/server/health_check.dart (1)

64-65: LGTM! Good defensive programming for the server abstraction migration.

The null-aware access to ioServer with a sensible fallback to default HttpConnectionsInfo() ensures health checks continue to work regardless of the underlying server implementation. This approach maintains backward compatibility during the migration to Relic abstractions.

modules/serverpod_auth/serverpod_auth_server/lib/src/business/email_auth.dart (1)

661-661: Correctly migrated to the new Request abstraction.

The conditional check for MethodCallSession ensures remoteInfo is only accessed when available, with an appropriate fallback to empty string for other session types. This maintains the existing logging behavior while adopting the new Request-based API.

tests/serverpod_test_server/test_integration/diagnostics/diagnostic_events_test.dart (3)

17-17: Correctly updated method signature for Request abstraction.

The method signature change from HttpRequest to Request aligns with the migration to Relic abstractions throughout the codebase.


174-174: Test expectation correctly updated for new diagnostic context structure.

The change from checking 'connectionInfo' to 'remoteInfo' reflects the simplified remote client information representation in diagnostic event contexts, consistent with the broader migration to Request abstractions.


273-273: HTTP GET usage in diagnostics test is intentional

The GET call in diagnostic_events_test.dart targets the web exception endpoint (/exception on port 8082), whereas the RPC method test (/simple/hello on port 8080) correctly uses POST. This mirrors other web‐resource tests (static files, cloud storage) and aligns with expected server behavior. No change required.

modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart (1)

624-624: Consistent migration to Request abstraction maintained.

The update follows the same pattern used throughout the codebase - checking for MethodCallSession before accessing request.remoteInfo with an appropriate fallback. This ensures consistent remote client information handling across authentication modules.

tests/serverpod_test_server/lib/src/endpoints/echo_request.dart (1)

20-21: LGTM: Correct migration to Request abstraction.

The change appropriately updates the header access from ms.httpRequest.headers to ms.request.headers and handles the type conversion from Iterable<String>? to List<String>?. This aligns with the broader refactor replacing HttpRequest with Request abstraction.

packages/serverpod/lib/web_server.dart (1)

1-5: LGTM: Well-organized export barrel file.

The file provides a clean consolidated import path for Serverpod's web server functionality with logical grouping of related components.

packages/serverpod/lib/serverpod.dart (2)

13-14: LGTM: Appropriate export updates for relic migration.

The changes correctly replace the old relic web server export with the new web server implementation while adding the relic package dependency. The hidden ExceptionHandler prevents potential naming conflicts.


21-21: LGTM: Correct utility extension migration.

The export change from http_request_extension.dart to request_extension.dart aligns with the migration from HttpRequest to Request abstraction.

packages/serverpod/lib/src/server/websocket_request_handlers/helpers/method_stream_manager.dart (3)

142-142: LGTM: Correct field type migration.

The field type change from HttpRequest? to Request? aligns with the broader refactor to use the relic package's Request abstraction.


153-153: LGTM: Constructor parameter updated consistently.

The constructor parameter change maintains consistency with the field type update.


520-520: LGTM: Parameter usage updated correctly.

The parameter names in contextFromSession calls are correctly updated from httpRequest to request, maintaining consistency with the new Request type.

Also applies to: 593-593

packages/serverpod_client/test/integration/test_web_socket_server_test.dart (3)

9-9: LGTM: Correct import for new WebSocket events.

The import adds support for the new event-based WebSocket API types used in the test.


23-34: LGTM: Proper migration to event-based WebSocket API.

The change from webSocket.listen to webSocket.events.listen with pattern matching on event types (TextDataReceived, BinaryDataReceived, CloseReceived) correctly implements the new RelicWebSocket API. The use of webSocket.sendText and webSocket.sendBytes is appropriate for the respective event types.


66-66: LGTM: Consistent WebSocket API migration.

The changes maintain consistency with the event-based WebSocket API migration, using webSocket.events.listen and webSocket.sendText appropriately.

Also applies to: 68-68

packages/serverpod/lib/src/server/session.dart (1)

331-333: Missing explicit import for Request

Request originates from relic. Relying on re-exports makes the dependency implicit and risks circular imports. Add:

import 'package:relic/relic.dart' show Request;
packages/serverpod/lib/src/server/websocket_request_handlers/endpoint_websocket_request_handler.dart (1)

50-56: Binary frames assumed UTF-8

utf8.decode(event.data) will throw if the binary message is not valid UTF-8.
If the protocol guarantees text, upgrade the WebSocket to send TextDataReceived exclusively; otherwise gate the decode with try/catch or ignore non-text frames.

packages/serverpod/lib/src/server/endpoint_dispatch.dart (1)

424-438: Verify minimum SDK constraint for sealed & final pattern-matching.

Marking Result as sealed and all subclasses as final relies on Dart 3 language features.
Please ensure package:serverpod/pubspec.yaml raises its sdk constraint to ">=3.0.0" (or higher) so downstream packages don’t hit analyser errors when they still target Dart 2.x.

@nielsenko
nielsenko force-pushed the relic-integrate branch 2 times, most recently from b43d504 to 83d5c35 Compare July 3, 2025 11:06
@nielsenko
nielsenko marked this pull request as ready for review July 3, 2025 11:25
@nielsenko
nielsenko requested a review from tp July 3, 2025 11:25

@vlidholt vlidholt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few questions, we can discuss tomorrow morning. But overall looks great! 🥳

Also update _readBinaryData to be more efficient in its use of BytesBuilder.
@nielsenko
nielsenko merged commit 9ae7175 into serverpod:main Jul 4, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants