Skip to content

Use lib_deps instead of git submodules #15

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

Merged
merged 1 commit into from
Mar 17, 2025
Merged

Conversation

IngmarStein
Copy link
Member

@IngmarStein IngmarStein commented Mar 17, 2025

See mrcodetastic/ESP32-HUB75-MatrixPanel-DMA#767 why we can't use the most recent release.

@IngmarStein IngmarStein requested a review from tavdog March 17, 2025 08:40
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @IngmarStein, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request migrates the project from using git submodules to using PlatformIO's lib_deps for managing dependencies. This involves removing the .gitmodules file, updating the .github/workflows/main.yaml and .github/workflows/pull-request.yaml files to remove the submodule checkout step, modifying the README.md file to remove the submodule update instruction, updating the platformio.ini file to declare the dependencies, and making some changes to the extra_scripts/pre.py script to copy the library.json file for libwebp.

Highlights

  • Dependency Management: Switched from git submodules to PlatformIO's lib_deps for managing project dependencies (ESP32-HUB75-MatrixPanel-DMA and libwebp).
  • Workflow Updates: Removed the submodule checkout step from the GitHub Actions workflows (main.yaml and pull-request.yaml).
  • README Update: Removed the instruction to update git submodules from the README.md file.
  • PlatformIO Configuration: Updated the platformio.ini file to declare the project dependencies using lib_deps.
  • Build Script Update: Modified the extra_scripts/pre.py script to copy the library.json file for libwebp to the correct location.
  • SDK Configuration: The flash size in sdkconfig was changed from 2MB to 8MB.

Changelog

Click here to see the changelog
  • .github/workflows/main.yaml
    • Removed the submodules: recursive option from the checkout action.
  • .github/workflows/pull-request.yaml
    • Removed the submodules: recursive option from the checkout action.
  • .gitmodules
    • Removed the entire file, as it's no longer needed with lib_deps.
  • README.md
    • Removed the instruction Begin with checking out the git submodules: git submodule update --init.
  • extra_scripts/pre.py
    • Added a copy command to copy libwebp/library.json to $PROJECT_LIBDEPS_DIR/$PIOENV/libwebp/library.json.
    • Reordered imports to adhere to standard formatting.
    • Added type hints for better readability.
    • Minor formatting changes for better code style.
  • extra_scripts/reset.py
    • Reordered imports to adhere to standard formatting.
  • lib/HUB75/ESP32-HUB75-MatrixPanel-DMA
    • Removed the submodule directory.
  • lib/HUB75/library.json
    • Removed the library.json file.
  • lib/webp/library.json
    • Added repository information (type, URL, branch).
    • Updated includeDir and srcDir to be relative paths (./src and .).
  • lib/webp/libwebp
    • Removed the submodule directory.
  • platformio.ini
    • Added lib_deps entries for libwebp and ESP32-HUB75-MatrixPanel-DMA, specifying the commit hashes.
    • Added comments explaining why a specific version of ESP32-HUB75-MatrixPanel-DMA is used.
    • Added lib_deps entries for the tidbyt-gen2 environment.
  • sdkconfig
    • Changed flash size from 2MB to 8MB.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


From submodules' depths, a new path we tread,
With lib_deps, dependencies are now led.
No more detached heads, or submodule woes,
Just clean builds and code that smoothly flows.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request aims to replace git submodules with lib_deps for managing dependencies. This approach can simplify dependency management and improve build reproducibility. The changes look good overall, but there are a few points that need attention.

Summary of Findings

  • sdkconfig flash size: The flash size in sdkconfig was changed from 2MB to 8MB. Please confirm that this change is intentional and necessary, and that it aligns with the hardware configuration. If the flash size is indeed 8MB, it's good to update the sdkconfig accordingly. Otherwise, revert the change.
  • Hardcoded URL in library.json: The URL in lib/webp/library.json is hardcoded to http. It would be better to use https if possible, or allow the user to configure this.

Merge Readiness

The pull request is almost ready for merging. However, the flash size change in sdkconfig needs to be verified and the hardcoded URL in lib/webp/library.json should be addressed. I am unable to directly approve this pull request, and users should have others review and approve this code before merging. I recommend addressing the above points before merging.

@IngmarStein IngmarStein merged commit f01b65a into tronbyt:main Mar 17, 2025
1 check 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