Skip to content

Conversation

lvyuemeng
Copy link

@lvyuemeng lvyuemeng commented Sep 17, 2025

Proto: Add version 0.52.5

  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Summary by CodeRabbit

  • New Features
    • Added Windows package for Proto v0.52.5.
    • Installs command-line binaries and exposes them on PATH; sets PROTO_HOME for persistent installation.
    • Verifies downloads with SHA-256 and supports autoupdate/version checks via GitHub releases.
    • Includes package metadata (description, homepage, MIT license).

Copy link

coderabbitai bot commented Sep 17, 2025

Walkthrough

Adds a new Scoop bucket manifest bucket/proto.json for Proto v0.52.5 (Windows 64-bit) that declares binaries, an installer script to move executables into a persistent bin, sets PROTO_HOME and updates PATH, and configures GitHub-based version checks and autoupdate URL/hash templating.

Changes

Cohort / File(s) Summary
Scoop manifest addition
bucket/proto.json
New manifest for Proto v0.52.5 (win64): artifact download URL and SHA-256, declares binaries proto.exe and proto-shim.exe, installer creates persist_dir/bin and moves executables there, sets PROTO_HOME and updates PATH, enables GitHub checkver, configures autoupdate with version-templated URL and separate SHA-256 source, includes description, homepage, and MIT license.

Sequence Diagram(s)

sequenceDiagram
    participant Scoop as Scoop
    participant Manifest as bucket/proto.json
    participant Installer as install script
    participant Persist as persist_dir
    participant FS as FileSystem
    note over Manifest,Installer #F0F8FF: New manifest + installer logic (win64)
    Scoop->>Manifest: read manifest (version, urls, shas)
    Scoop->>Installer: invoke installer
    Installer->>FS: create Persist/bin
    Installer->>FS: move proto.exe -> Persist/bin
    alt proto-shim present
        Installer->>FS: move proto-shim.exe -> Persist/bin
    end
    Installer->>Scoop: set env PROTO_HOME=Persist
    Installer->>Scoop: prepend Persist/bin to PATH
    note right of Scoop: checkver -> GitHub releases\nautoupdate uses templated URL + sha source
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibble notes in the bucket’s den,
A proto manifest for Windows, then—
Two bright EXEs hop into bin,
PROTO_HOME settles, PATH joins in.
Thump-thump: update checks begin.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "proto: Add version 0.52.5" is concise, follows the repository's conventional format, and clearly identifies the package and the main change (adding a specific version), so it accurately summarizes the primary change for reviewers scanning history.
Description Check ✅ Passed The PR description includes the repository template text, repeats the title, and presents the required checklist with both items checked, satisfying the main template requirements and documenting that the contributor followed the contributing guide and title convention. The description does not reference a related issue with "Closes/Relates to" but that omission is not critical for this manifest/version addition.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

proto

  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

Copy link

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
bucket/proto.json (1)

19-21: Minor: simplify checkver syntax.

Short form is conventional in Scoop manifests.

Apply this diff:

-    "checkver": {
-        "github": "https://github.com/moonrepo/proto"
-    },
+    "checkver": {
+        "github": "moonrepo/proto"
+    },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b832b30 and d24104c.

📒 Files selected for processing (1)
  • bucket/proto.json (1 hunks)
🔇 Additional comments (2)
bucket/proto.json (2)

22-31: Keep per-asset .sha256 — no change required.
Releases include per‑asset .sha256 files for the Windows zips (and also a consolidated dist-manifest.json), so the current hash URL ($baseurl/proto_cli-x86_64-pc-windows-msvc.zip.sha256) is valid — leave as-is.


6-11: Optional: add Windows ARM64 if upstream ships it — not applicable for v0.52.5

The v0.52.5 release only includes proto_cli-x86_64-pc-windows-msvc.zip; there is no aarch64-pc-windows-msvc asset, so do not add an arm64 block.

@lvyuemeng
Copy link
Author

Proto adapt itself in $PROTO_HOME/bin, and store data in $PROTO_HOME, thus, one need to set the $PROTO_HOME as persisit dir, then move all binary to $PROTO_HOME/bin and link the bin into the app dir, expose the env path $PROTO_HOME/bin.

Copy link

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
bucket/proto.json (4)

16-25: Simplify installer; prefer Scoop “bin” shims instead of moving EXEs.

Current flow moves EXEs into $persist_dir and relies on PATH. Scoop can create shims and avoid PATH edits and custom moves.

Option A — keep persisted bin but make PATH explicit (see next comment).

Option B — simpler, shim-based install (recommended):

   "installer": {
-    "script": [
-      "# Create bin directory",
-      "New-Item -ItemType Directory -Force -Path \"$persist_dir\\bin\" | Out-Null",
-      "",
-      "# Move proto binaries into bin",
-      "Move-Item \"$dir\\proto.exe\" \"$persist_dir\\bin\\proto.exe\" -Force",
-      "if (Test-Path \"$dir\\proto-shim.exe\") {",
-      "    Move-Item \"$dir\\proto-shim.exe\" \"$persist_dir\\bin\\proto-shim.exe\" -Force",
-      "}",
-    ]
+    "script": []
   },
+  "bin": [
+    "proto.exe",
+    "proto-shim.exe"
+  ],
-  "persist": [
-    "bin"
-  ],
+  "persist": [],

PROTO_HOME can remain set to $persist_dir to keep toolchains/config persistent.


27-31: Make PATH target unambiguous; point directly at the persisted bin.

If you keep the current “move-to-persist” approach, ensure PATH targets the persisted location to avoid any ordering/symlink surprises.

-  "env_add_path": "bin",
+  "env_add_path": "$persist_dir\\bin",

12-14: Persist entry may be redundant with the current installer.

Since you’re moving binaries to $persist_dir\bin manually, persisting "bin" is not needed unless you also want a $dir\bin junction. Consider removing it, or keep it only if you rely on the junction.


40-42: Harden autoupdate hash retrieval.

Point hash to $url.sha256 (tied to the exact asset) and add a regex in case the file includes filenames or prefixes.

-    "hash": {
-      "url": "$baseurl/proto_cli-x86_64-pc-windows-msvc.zip.sha256"
-    }
+    "hash": {
+      "url": "$url.sha256",
+      "regex": "([A-Fa-f0-9]{64})"
+    }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between afa798f and 074e4e4.

📒 Files selected for processing (1)
  • bucket/proto.json (1 hunks)
🔇 Additional comments (3)
bucket/proto.json (3)

1-5: Metadata looks good.

Version, description, homepage, and license are aligned with upstream.


8-9: SHA-256 verified — matches upstream.
Upstream .sha256 equals the manifest hash in bucket/proto.json (lines 8–9).


6-11: Do not add Windows ARM64 for v0.52.5 — asset not published.
v0.52.5 only contains proto_cli-x86_64-pc-windows-msvc.zip; there is no proto_cli-aarch64-pc-windows-msvc.zip or SHA‑256 to add.

@aliesbelik aliesbelik added the package-request-needed Need package-request issue label Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package-request-needed Need package-request issue review-needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants