Skip to content

Conversation

@goyalyashpal
Copy link

@goyalyashpal goyalyashpal commented Jan 3, 2026

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

Add a 👍 reaction to issues you find important.

Summary by CodeRabbit

  • New Features
    • Adds Windows distribution for TLA Toolbox 1.8.0 via Scoop, including installer steps that create shortcuts and command shims for easy use.
    • Enables automated version checking and autoupdate from releases.
    • Includes suggested ancillary packages to enhance the user experience.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 3, 2026

Walkthrough

Adds a new Scoop manifest tla-toolbox-pre.json for TLA Toolbox 1.8.0 (Windows) with metadata, download/hash, extraction, pre-install PowerShell steps, bin shims, shortcuts, persistence, checkver and autoupdate configuration.

Changes

Cohort / File(s) Summary
Scoop Manifest
bucket/tla-toolbox-pre.json
New Scoop-style manifest describing TLA Toolbox 1.8.0: metadata (version, description, homepage, license), url/hash, extract_dir, pre_install PowerShell steps, bin shims, shortcuts, persist, checkver (GitHub releases regex), and autoupdate entries.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • z-Fng

Poem

🐰 I found a manifest, neat and new,
Packed with hashes, scripts, and URLs too.
I shim and shortcut, hop to the door,
TLA Toolbox ready — click, install, explore! 🥕

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly follows the conventional PR format and specifically identifies the manifest name and version being added.
Description check ✅ Passed The description includes required checklist items completed, references a related issue, and confirms reading the contributing guide.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

All changes look good.

Wait for review from human collaborators.

tla-toolbox-pre

  • Lint
  • 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: 1

🧹 Nitpick comments (1)
bucket/tla-toolbox-pre.json (1)

24-29: Consider simplifying the verification logic for better readability.

The current logic using -PipelineVariable is functionally correct but somewhat complex. While it works as intended (preserving the original module name through transformations), consider refactoring for clarity.

🔎 Optional refactor for improved readability
         "Write-Output \"`nChecking if class-modules exist for use with 'tla2tools':\"",
-        "@( 'tlc2.TLC', 'tlc2.REPL', 'pcal.trans', 'tla2tex.TLA', 'tla2sany.SANY' )",
-        "  | ForEach-Object -PipelineVariable modulename { $_ }",
-        "  | ForEach-Object { ($_ -replace '\\.', '/') + '.class' }",
+        "@( 'tlc2.TLC', 'tlc2.REPL', 'pcal.trans', 'tla2tex.TLA', 'tla2sany.SANY' ) | ForEach-Object {",
+        "  $modulename = $_",
+        "  $classfile = ($_ -replace '\\.', '/') + '.class'",
+        "  $classfile",
         "  | Resolve-Path -Relative -RelativeBasePath \"$dir/plugins/*tlatools*/\"",
-        "  | ForEach-Object { \"`t* $modulename -> $_\" }"
+        "  | ForEach-Object { \"`t* $modulename -> $_\" }",
+        "}"

This makes the transformation steps more explicit and easier to follow.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aa54ae0 and 420dcae.

📒 Files selected for processing (1)
  • bucket/tla-toolbox-pre.json
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-07T10:15:21.033Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Versions PR: 2564
File: bucket/olive-editor.json:24-24
Timestamp: 2025-11-07T10:15:21.033Z
Learning: In Scoop manifest JSON files, PowerShell commands in arrays like `pre_install` require backslashes to be escaped as `\\` in the JSON. After JSON parsing, `"$dir\\file.exe"` correctly becomes `$dir\file.exe` in PowerShell. This is proper JSON escaping, not an error.

Applied to files:

  • bucket/tla-toolbox-pre.json
🔇 Additional comments (8)
bucket/tla-toolbox-pre.json (8)

1-11: LGTM: Metadata is well-structured.

The version, description, homepage, license, and suggested dependencies are all properly formatted and appropriate for a Scoop manifest.


18-23: LGTM: Batch file creation logic is correct.

The batch file content and PowerShell script that generates it are properly structured:

  • Backslash escaping follows JSON requirements (as per learnings)
  • Variable expansion syntax ${JDKDIR} is correct
  • ASCII encoding is appropriate for Windows batch files

This will work correctly once the -Filter issue in line 16 is resolved.


31-65: LGTM: Binary shim configurations are comprehensive and correct.

The binary aliases properly:

  • Use the -pre suffix consistently for pre-release identification
  • Map to the appropriate executables and Java class modules
  • Cover all major TLA+ tools (TLC, REPL, PlusCal translator, SANY parser, LaTeX formatter)
  • Follow Scoop's bin specification format correctly

The class arguments match those verified in the pre_install script (lines 25-29).


66-72: LGTM: Shortcuts and persistence are properly configured.

  • The Start menu shortcut appropriately includes "Pre" in the name
  • Persisting the "configuration" directory ensures user settings and workspace data are preserved across updates

85-88: LGTM: Documentation references are helpful.

The comment references provide useful context for understanding PowerShell quoting rules in Scoop manifests and the TLA+ project documentation.


73-77: No issues found. The repository ID 50906927 is confirmed to be correct for tlaplus/tlaplus, and the checkver configuration properly retrieves the latest release tag from the GitHub API endpoint.


12-14: Hash and extract_dir cannot be automatically verified.

The URL is accessible, but confirming the SHA1 hash matches and that the archive contains a "toolbox" directory requires downloading the release file or checking upstream documentation, which is beyond automated verification scope.


78-84: Autoupdate hash extraction will fail: GitHub API does not provide SHA-1 hashes in the expected format.

The regex pattern $sha1\\|$basename expects to find SHA-1 hashes in the GitHub API response in pipe-separated plain text format (e.g., sha1hash|filename). However, GitHub's Releases API does not provide SHA-1 checksums for release assets. The API response includes a digest field with SHA-256 hashes in JSON structure format (not as plain text with pipes). This configuration cannot extract a hash and will cause autoupdate to fail. Either use the SHA-256 digest from the assets array or provide SHA-1 hashes through an alternative method (e.g., separate checksum file in the release body).

⛔ Skipped due to learnings
Learnt from: o-l-a-v
Repo: ScoopInstaller/Versions PR: 2564
File: bucket/olive-editor.json:24-24
Timestamp: 2025-11-07T10:15:21.033Z
Learning: In Scoop manifest JSON files, PowerShell commands in arrays like `pre_install` require backslashes to be escaped as `\\` in the JSON. After JSON parsing, `"$dir\\file.exe"` correctly becomes `$dir\file.exe` in PowerShell. This is proper JSON escaping, not an error.

@goyalyashpal goyalyashpal changed the title tla-toolbox-pre: Add version 1.8.0 (2025-12-17) tla-toolbox-pre: Add version 1.8.0_2025-12-17 Jan 3, 2026
Problem: New artifacts are published to this same tag
Solution: Use tag's updated date too in checkver
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

♻️ Duplicate comments (1)
bucket/tla-toolbox-pre.json (1)

16-17: Critical: Incorrect -Filter parameter usage will cause installation failure.

The -Filter parameter in Get-ChildItem only accepts filename patterns (like *.txt), not path patterns with directory separators. The pattern "plugins/*openjdk*" will be interpreted as a literal filename containing forward slashes, which won't match any filesystem items, resulting in $JDKDIR being empty and causing installation to fail.

🔎 Proposed fix
-        "$JDKDIR = Get-ChildItem -Attributes directory -Filter \"plugins/*openjdk*\" $dir  |",
+        "$JDKDIR = Get-ChildItem -Path \"$dir\\plugins\\*openjdk*\" -Directory |",
🧹 Nitpick comments (1)
bucket/tla-toolbox-pre.json (1)

76-76: Prefer named group references for clarity.

The replace field uses numbered captures $1_$2, but the regex defines named groups (?<tag>...) and (?<timestamp>...). Using named references ${tag}_${timestamp} is more explicit and maintainable.

🔎 Proposed refactor
-        "replace": "$1_$2"
+        "replace": "${tag}_${timestamp}"
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 420dcae and 249734c.

📒 Files selected for processing (1)
  • bucket/tla-toolbox-pre.json
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: o-l-a-v
Repo: ScoopInstaller/Versions PR: 2564
File: bucket/olive-editor.json:24-24
Timestamp: 2025-11-07T10:15:21.033Z
Learning: In Scoop manifest JSON files, PowerShell commands in arrays like `pre_install` require backslashes to be escaped as `\\` in the JSON. After JSON parsing, `"$dir\\file.exe"` correctly becomes `$dir\file.exe` in PowerShell. This is proper JSON escaping, not an error.
📚 Learning: 2025-11-07T10:15:21.033Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Versions PR: 2564
File: bucket/olive-editor.json:24-24
Timestamp: 2025-11-07T10:15:21.033Z
Learning: In Scoop manifest JSON files, PowerShell commands in arrays like `pre_install` require backslashes to be escaped as `\\` in the JSON. After JSON parsing, `"$dir\\file.exe"` correctly becomes `$dir\file.exe` in PowerShell. This is proper JSON escaping, not an error.

Applied to files:

  • bucket/tla-toolbox-pre.json

@goyalyashpal
Copy link
Author

/verify

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

All changes look good.

Wait for review from human collaborators.

tla-toolbox-pre

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

Check the full log for details.

@goyalyashpal
Copy link
Author

goyalyashpal commented Jan 7, 2026

hi @z-Fng and @HUMORCE
sorry to mention you, but i think that this works well now:

> # PS ...\Scoop\buckets\...\bucket> 
> ../bin/checkver
doublecmd-snapshot: 1.3.0.r12609 (scoop version is 1.3.0.r12550) autoupdate available
ki-editor: 0-pre-2026-01-07 (scoop version is nightly_2026-01-04) autoupdate available
tla-toolbox-pre: 1.8.0_2026-01-07 (scoop version is 1.8.0_2025-12-17) autoupdate available    <~~~ SEE THIS
tla-toolbox: 1.7.4

version: 0-pre-<date> attribute of ki-editor is inspired by @nixos/nixpkgs:./pkgs/README.md
https://github.com/NixOS/nixpkgs/blob/d87575ecc77792e62c5de6ed82c87097f1bf35a4/pkgs/README.md?plain=1#versioning#L460-L468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant