Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V3] Plugins implemenations #3570

Merged
merged 17 commits into from
Sep 1, 2024

Conversation

atterpac
Copy link
Contributor

@atterpac atterpac commented Jun 26, 2024

Adds plugins as a service as discussed in #3496
See discussion for more information until PR is finalized

Summary by CodeRabbit

  • New Features

    • Introduced a service management system, replacing the previous plugin architecture.
    • Added support for a new "Window class name option" for Windows users.
    • Expanded services to include a plugin functionality.
    • Enhanced documentation with a new guide on implementing services in Wails v3.
    • Implemented a file server service for serving files over HTTP.
  • Bug Fixes

    • Fixed an issue with the generation of the syso icon file.
  • Documentation

    • Updated changelog and added detailed documentation for service implementation and usage.
  • Style

    • Improved CSS for better responsiveness and visual consistency across the application.

Copy link
Contributor

coderabbitai bot commented Jun 26, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The changes involve a significant transition from a plugin-based architecture to a service-oriented model within the application. This includes the introduction of new service functionalities, updates to existing commands and structures, and modifications to documentation. Key enhancements include the implementation of service lifecycle management, improved HTTP handling, and the reorganization of service definitions and interfaces to support the new architecture.

Changes

Files Change Summary
mkdocs-website/docs/en/changelog.md, mkdocs-website/docs/en/learn/services.md, mkdocs-website/mkdocs.yml Added a new feature for service management, including a dedicated services documentation page.
v3/cmd/wails3/main.go, v3/internal/commands/service.go, v3/internal/flags/service.go Renamed and restructured commands and flags to focus on services instead of plugins.
v3/pkg/application/application.go, v3/pkg/application/application_options.go, v3/pkg/application/bindings.go Enhanced service management and lifecycle handling within the application structure.
v3/pkg/services/fileserver/fileserver.go, v3/pkg/services/kvstore/kvstore.go Introduced new service implementations for file serving and key-value storage, including lifecycle methods.
v3/examples/services/hashes/hashes.go, v3/examples/services/main.go Added new examples demonstrating service functionalities, including hash generation.
v3/internal/service/template/README.tmpl.md, v3/internal/service/template/service.go.tmpl Created templates for new service structures, detailing lifecycle methods and HTTP handling.
v3/internal/service/service.go, v3/internal/service/template/go.mod.tmpl Updated service management logic and Go module versioning to reflect new service architecture.
v3/internal/assetserver/assetserver.go, v3/internal/generator/analyse.go Refactored asset handling to support service-oriented functionality, removing plugin-related code.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Service
    participant Application

    User->>Application: Start Application
    Application->>Service: OnStartup()
    Service-->>Application: Initialization Complete
    User->>Service: Request Service Functionality
    Service-->>User: Provide Response
    Application->>Service: OnShutdown()
    Service-->>Application: Cleanup Complete
Loading

🐰 "In the meadow, hop and play,
Services bloom in a bright new way.
With a shake of my fluffy tail,
I cheer for changes, without fail!
Hooray for functions, neat and bright,
In the world of code, all feels just right!" 🐇


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @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.

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 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.

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.

remove log

trim path

prefix wails/services
@atterpac atterpac marked this pull request as ready for review July 25, 2024 17:12
Copy link

sonarcloud bot commented Jul 25, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@leaanthony
Copy link
Member

@atterpac - any chance we could send those errors via the new error handlers? 🙏

@atterpac
Copy link
Contributor Author

@atterpac - any chance we could send those errors via the new error handlers? 🙏

Do we want to consider a plugin error as fatal?

Copy link

sonarcloud bot commented Sep 1, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@leaanthony leaanthony merged commit e316cd0 into wailsapp:v3-alpha Sep 1, 2024
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants