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

feat: support concurrent for build operation(5 concurrency by default) #98

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

chlins
Copy link
Contributor

@chlins chlins commented Mar 3, 2025

This pull request introduces several changes to the build process, including the addition of concurrency support and various improvements to the backend processing. The most important changes include adding concurrency options to the build command, updating the backend interface and implementation to support these options, and introducing new processor options.

Build Command Enhancements:

  • Added a new flag to specify the number of concurrent build operations (cmd/build.go).
  • Updated the runBuild function to pass concurrency options to the backend (cmd/build.go).

Backend Interface and Implementation:

  • Modified the Build method in the Backend interface to accept additional options (pkg/backend/backend.go).
  • Updated the Build method implementation to apply concurrency options (pkg/backend/build.go). [1] [2] [3]
  • Enhanced the process method to support concurrent processing with spinner feedback (pkg/backend/build.go).

Processor Options:

  • Introduced a new options struct and associated functions to handle concurrency settings (pkg/backend/processor/options.go).
  • Updated various processor implementations to utilize the new concurrency options (pkg/backend/processor/base.go, pkg/backend/processor/code.go, pkg/backend/processor/doc.go, pkg/backend/processor/model.go, pkg/backend/processor/model_config.go). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Dependency Updates:

  • Added new dependencies for concurrency and spinner management (go.mod). [1] [2] [3]

Configuration Improvements:

  • Added default concurrency settings and validation to the build configuration (pkg/config/build.go).

@chlins chlins added the enhancement New feature or request label Mar 3, 2025
@chlins chlins force-pushed the feat/concurrent-build branch 2 times, most recently from f2ef56c to 54efe35 Compare March 3, 2025 10:26
Signed-off-by: chlins <chlins.zhang@gmail.com>
@chlins chlins force-pushed the feat/concurrent-build branch from 54efe35 to ab7014c Compare March 3, 2025 10:41
Copy link
Contributor

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@gaius-qi gaius-qi merged commit fcb3247 into main Mar 3, 2025
5 checks passed
@gaius-qi gaius-qi deleted the feat/concurrent-build branch March 3, 2025 11: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.

None yet

2 participants