Skip to content

Refactor Roam bootstrappers and service management#49

Merged
Raild3x merged 9 commits intomainfrom
fix/Roam-Improper-Dependent-Service-Errors
Jan 20, 2026
Merged

Refactor Roam bootstrappers and service management#49
Raild3x merged 9 commits intomainfrom
fix/Roam-Improper-Dependent-Service-Errors

Conversation

@Raild3x
Copy link
Owner

@Raild3x Raild3x commented Jan 15, 2026

Improves error handling and configuration in ClientBootstrapper and ServerBootstrapper, adds support for custom require options, and refactors service registration, initialization, and startup logic in Roam. Updates example setup and deprecates outdated test file. Adds VSCode and Stylua configuration files for consistent formatting.

Improves error handling and configuration in ClientBootstrapper and ServerBootstrapper, adds support for custom require options, and refactors service registration, initialization, and startup logic in Roam. Updates example setup and deprecates outdated test file. Adds VSCode and Stylua configuration files for consistent formatting.
@Raild3x Raild3x self-assigned this Jan 15, 2026
Copilot AI review requested due to automatic review settings January 15, 2026 19:32
@Raild3x Raild3x added the enhancement New feature or request label Jan 15, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request refactors the Roam service framework to improve error handling, configuration management, and code organization. The refactor extracts inline logic into well-named helper functions, adds comprehensive validation, and enhances the bootstrapper configuration options.

Changes:

  • Refactors service registration, initialization, and startup logic with improved validation and error messages
  • Adds support for custom require options (AllowYieldingRequires, StopOnFailedRequire) in bootstrappers
  • Updates return type of requireModules to include a Success field and structured result object
  • Adds VSCode settings and Stylua configuration for consistent code formatting

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
lib/roam/src/init.luau Major refactoring of service management with improved validation, error handling, and code organization into logical sections
lib/roam/src/init.spec.luau Adds deprecation notice to outdated test file
lib/roam/src/Bootstrappers/ServerBootstrapper.luau Adds configurable require options and improved error handling with result checking
lib/roam/src/Bootstrappers/ClientBootstrapper.luau Adds configurable require options and improved error handling with result checking
lib/roam/src/Bootstrappers/_ExampleSetup.luau Updates examples to use registerService instead of deprecated createService
.vscode/settings.json Adds VSCode configuration for Lua/Luau formatting
stylua.toml Adds Stylua formatter configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Improves Roam documentation with detailed lifecycle diagrams and explanations, corrects typos, and adds advanced lifecycle hooks to the Roam.start method. Introduces service state tracking, dependency graph printing, and service state querying for debugging. Also updates DropletClientManager.luau for code style consistency and minor refactoring, and adds new static images for documentation.
Introduces the StartConfig type to Roam and updates ClientBootstrapper and ServerBootstrapper to accept and pass custom lifecycle hooks to Roam.start. Refactors config handling for module requiring and improves error handling. Updates example setup to use new requireModules options. Bumps wally.toml version to 0.2.0.
Replaced Roam.requireModules with direct iteration and require of ModuleScript descendants for both Server and Client folders. This simplifies module registration and removes dependency on Roam's module loading utility.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 12 changed files in this pull request and generated 12 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Expanded and clarified documentation in init.luau, including example service and startup usage, contracts, and lifecycle hook details. Added and refined type annotations for StartConfig and other internal properties. Minor spelling corrections in comments and warnings for better clarity.
Enhanced the Roam.printDependencyGraph function to display a full recursive dependency tree for each service using tree symbols. The output now shows circular references and sorts dependencies alphabetically for clarity. Updated documentation and code examples for better accuracy and consistency.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 12 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Added explicit type annotations and type assertions throughout the code to improve type safety. Fixed a typo in documentation, updated service state from 'ACTIVE' to 'STARTED', and enhanced checks for coroutine and Promise handling. Also clarified comments and variable naming for better readability.
Extracted Service, ServiceConfig, ServiceState, and StartConfig type definitions from init.luau into a new types.luau module. Updated ClientBootstrapper.luau, ServerBootstrapper.luau, and init.luau to import and use the new types module, improving code organization and maintainability.
Bumped the documented version of the Roam package from 0.1.6 to 0.2.0 in the README to reflect the latest release.
@Raild3x Raild3x merged commit cd1ab55 into main Jan 20, 2026
0 of 2 checks passed
@Raild3x Raild3x deleted the fix/Roam-Improper-Dependent-Service-Errors branch January 20, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants