[rmqctl][Bug] Windows build script fails when the output directory is absent

Closed Beginner friendly
#7,243 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go, powershell
Domain
build-system, cli

Research direction

Read rmqctl/scripts/build-windows.ps1 and the contract test in rmqctl/scripts/build_script_test.go. Check how the script handles the default and user-supplied -Output paths, then run the Linux-runnable contract test; the issue notes that Go is unavailable locally for the executable build test. Done means the output parent directory is created before go build runs, including for the default bin path.

Written by the indexing model from the issue text.

Description

Problem

rmqctl/scripts/build-windows.ps1 uses bin\\rmqctl.exe as its default output, but a clean checkout does not contain the bin directory.

Reproduction

  1. Check out the rocketmq-studio development trunk on Windows.
  2. From rmqctl, run powershell -File scripts/build-windows.ps1.

Expected behavior

The native Windows build creates its default output directory and produces bin\\rmqctl.exe.

Actual behavior

The script reaches go build -o bin\\rmqctl.exe main.go without creating bin, so Go cannot create the output file and the build fails on a fresh checkout.

Root cause

The script creates neither the parent directory of the user-supplied -Output path nor the default bin directory before invoking go build.

Fix scope

Create the output parent directory when it is non-empty, and keep a Linux-runnable script contract test that guards this ordering.

Regression evidence

The fix is based on the clean-checkout default path and protects the script contract with rmqctl/scripts/build_script_test.go. The local environment does not have Go installed, so the executable build test could not be run locally.

Discovery baseline: 127c47b06a268cc74224d5f34c56ec7c36ac0d55

Dominant language
Java
Stars
1.4k
Forks
718
Avg merge
3d 15h
Merged PRs (30d)
217

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/rocketmq-dashboard

All issues in apache/rocketmq-dashboard

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.