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

- add -m(skip go mod tidy) build flag to dev command #3275

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

te5se
Copy link
Contributor

@te5se te5se commented Feb 24, 2024

Description

Adds functionality #(3269)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using wails doctor.

  • Windows
  • macOS
  • Linux

Test Configuration

# Wails
Version | v2.8.0

# System
┌────────────────────────────────────────────────────────────────────────┐
| OS           | Windows 10 Pro                                          |
| Version      | 2009 (Build: 19042)                                     |
| ID           | 20H2                                                    |
| Go Version   | go1.22.0                                                |
| Platform     | windows                                                 |
| Architecture | amd64                                                   |
| CPU          | AMD Ryzen 5 5600 6-Core Processor                       |
| GPU          | NVIDIA GeForce RTX 4060 (NVIDIA) - Driver: 31.0.15.5123 |
| Memory       | 16GB                                                    |
└────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌────────────────────────────────────────────────────────┐
| Dependency | Package Name | Status    | Version        |
| WebView2   | N/A          | Installed | 121.0.2277.128 |
| Nodejs     | N/A          | Installed | 20.11.0        |
| npm        | N/A          | Installed | 10.2.4         |
| *upx       | N/A          | Available |                |
| *nsis      | N/A          | Available |                |
└─────────────── * - Optional Dependency ────────────────┘

# Diagnosis
Optional package(s) installation details:
  - upx : Available at https://upx.github.io/
  - nsis : More info at https://wails.io/docs/guides/windows-installer/

 SUCCESS  Your system is ready for Wails development!

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Refactor
    • Improved the build process by relocating the SkipModTidy option for more consistent command-line flag handling.
  • New Features
    • Introduced a feature to optionally skip the go mod tidy command during the build process, enhancing flexibility for developers.

Copy link
Contributor

coderabbitai bot commented Feb 24, 2024

Walkthrough

The recent update involves enhancing the wails dev command by introducing a new flag -m to skip go mod tidy. This change empowers developers in environments without internet access to leverage the hot reload feature seamlessly, improving the development workflow efficiency.

Changes

Files Change Summary
v2/cmd/wails/flags/buildcommon.go Added SkipModTidy field to BuildCommon struct with a corresponding flag
v2/cmd/wails/internal/dev/dev.go Conditionally runs go mod tidy based on SkipModTidy flag value
website/src/pages/changelog.mdx Added -m flag to skip go mod tidy in the dev command

Related issues

  • Add skip go mod tidy option to wails dev #3269: This issue requests adding a skip go mod tidy option to wails dev to facilitate development in environments without internet access. The changes in this PR directly address this need by introducing the -m flag to skip go mod tidy, aligning with the issue's objective.

🐇✨
In the world of Wails where rabbits roam,
A new flag emerges, skipping go mod tidy with aplomb.
Developers rejoice, in their coding home,
Efficiency boosted, no more internet access syndrome.
🚀🌟
With a hop and a skip, they code away,
In their cozy dens, without dismay.
🐰💻

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-tests for this file.
  • 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 tests 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 from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between bff2258 and 859476f.
Files selected for processing (3)
  • v2/cmd/wails/flags/build.go (1 hunks)
  • v2/cmd/wails/flags/buildcommon.go (1 hunks)
  • v2/cmd/wails/internal/dev/dev.go (1 hunks)
Files skipped from review due to trivial changes (1)
  • v2/cmd/wails/flags/build.go
Additional comments: 2
v2/cmd/wails/flags/buildcommon.go (1)
  • 12-12: The addition of the SkipModTidy field to the BuildCommon struct is correctly implemented and aligns with the PR's objective to allow skipping the go mod tidy operation. The field name, syntax, and struct tag are all appropriate.
v2/cmd/wails/internal/dev/dev.go (1)
  • 63-68: The conditional execution of go mod tidy based on the SkipModTidy flag is correctly implemented. The logic, syntax, and error handling are all appropriate, aligning with the PR's objective to provide flexibility in managing Go module dependencies.

@leaanthony
Copy link
Member

Thanks 🙏 Please could you add an entry to the changelog located at website/src/pages/changelog.mdx?

@te5se
Copy link
Contributor Author

te5se commented Feb 25, 2024

No problem, just wasn't quite sure where to add it

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 859476f and f56e631.
Files selected for processing (1)
  • website/src/pages/changelog.mdx (1 hunks)
Additional comments: 1
website/src/pages/changelog.mdx (1)
  • 17-17: The changelog entry for the new -m(skip go mod tidy) flag is clear and concise. It correctly attributes the contribution to @te5se and links to the PR where this change was introduced. This entry follows the project's standards for documenting new features in the changelog.

Copy link
Member

@leaanthony leaanthony left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to do this! 🙏

@te5se
Copy link
Contributor Author

te5se commented Feb 25, 2024

Glad to pitch in :)

@leaanthony leaanthony merged commit 65cef2f into wailsapp:master Feb 26, 2024
10 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.

2 participants