Skip to content

Rename rebar3 CLI and module to rebar#15

Open
bchassoul wants to merge 18 commits into
kickstarter/basefrom
gl/rebar
Open

Rename rebar3 CLI and module to rebar#15
bchassoul wants to merge 18 commits into
kickstarter/basefrom
gl/rebar

Conversation

@bchassoul

Copy link
Copy Markdown

Renames the rebar3 command-line tool and its main Erlang module to
rebar.

What changed

  • Module rename: rebar3.erlrebar.erl, all call sites updated
  • Binary name: built executable is now ./rebar
  • Filesystem paths: ~/.config/rebar3~/.config/rebar,
    ~/.cache/rebar3~/.cache/rebar, .rebar3.rebar
  • Crash dumps and PLT files: rebar3.crashdumprebar.crashdump
  • Shell completions: Bash, Zsh, Fish files renamed; generated
    functions _rebar3_rebar
  • Internal project_type atom: rebar3rebar
  • local install / local upgrade: env vars REBAR3_VSN
    REBAR_VSN, REBAR3_ERL_ARGSREBAR_ERL_ARGS
  • Hex metadata: build_tools label rebar3rebar
  • CI workflows: ./rebar3./rebar, .\rebar3.ps1.\rebar.ps1
  • Manpage: rebar3.1rebar.1
  • Docs and prose: README.md, CONTRIBUTING.md,
    ISSUE_TEMPLATE.md, inline comments and help strings

Note, the following was intentionally kept as-is

  • rebar3.org URLs and all external links
  • erlang/rebar3 GitHub repository references
  • S3 bucket names and upgrade URLs
  • SPDX-FileCopyrightText copyright headers
  • External test repository references (rebar3_tests)
  • README.md section header anchors (#what-is-rebar3, etc.)

@GwendalLaurent GwendalLaurent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You forgot to add a SPDX header to the files you modified. Some of them already have it because we modified them in previous PRs but not all of them.

I asked Codex if anything was missing and it told me the following:

  • The Dockerfile still relies on the name rebar3
  • The bootstrap script still mentions rebar3:
    • Line 65, 72, 73: it calls rebar3:run/1
    • Line 106: It uses the config file config/rebar3
    • Line 193 the function is called bootstrap_rebar3
    • Comments in the file still mention "rebar3"
  • rebar.config.sample still uses "rebar3" in the comments and in the config values
  • vendor_hex_core.sh still uses rebar3 as dev compile
  • .gitignore still has the old rebar3 files (can keep these entries) but not the new ones. e.g. it has rebar3.ps1 but not rebar.ps1

We should also update the migration guide. One change we should add for this PR is the name change of course but maybe there are other things to mention like changes in the configuration files (renaming rebar3 entries to rebar, ...)

Comment thread apps/rebar/src/rebar_prv_completion.erl Outdated
long => "-aliases",
type => string,
help => "Comma separated list of OS level aliases on which rebar3 completion will be triggered (e.g. \"rebar\" or \"r3\")."},
help => "Comma separated list of OS level aliases on which rebar completion will be triggered (e.g. \"r3\")."},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Are we keeping r3 ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There is still "rebar3" in the path

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There is still "rebar3" in the path

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There is still "rebar3" in the path

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There is still "rebar3" in the path

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Are we keeping the name "r3" in the name of the file ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I renamed r3 to rb. I thought using just r as a shell command wasn't a great idea, since it could conflict with the R programming language

Comment thread manpages/rebar.1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The filename rebar.1 does not make sense. This seems to be the manpage for version 3.1. We should figure out if we can simply delete it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

hmm right, I will dig into it

@bchassoul bchassoul requested a review from maehjam June 4, 2026 04:49
@bchassoul

Copy link
Copy Markdown
Author

You forgot to add a SPDX header to the files you modified. Some of them already have it because we modified them in previous PRs but not all of them.

I asked Codex if anything was missing and it told me the following:

  • The Dockerfile still relies on the name rebar3

  • The bootstrap script still mentions rebar3:

    • Line 65, 72, 73: it calls rebar3:run/1
    • Line 106: It uses the config file config/rebar3
    • Line 193 the function is called bootstrap_rebar3
    • Comments in the file still mention "rebar3"
  • rebar.config.sample still uses "rebar3" in the comments and in the config values

  • vendor_hex_core.sh still uses rebar3 as dev compile

  • .gitignore still has the old rebar3 files (can keep these entries) but not the new ones. e.g. it has rebar3.ps1 but not rebar.ps1

We should also update the migration guide. One change we should add for this PR is the name change of course but maybe there are other things to mention like changes in the configuration files (renaming rebar3 entries to rebar, ...)

I think they are all fixed now :)

@bchassoul

Copy link
Copy Markdown
Author

@maehjam please take a look at the current state of the code and ignore the latest commit, I just wanted to make sure it builds in windows without errors. The broken windows CI is fixed on @Gwendal PR

I had to run the bootstrap and vendor scripts, which means that some paths from my local machine where added to the generated files... I will like to change the asdf Erlang installation path, I will work on that tomorrow.

@bchassoul bchassoul requested a review from ziopio June 4, 2026 15:02
NewCache;
{ListOfDeps, NewCache} ->
lists:foldl(
fun(File, CurrentCache) ->

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

formatting change, not bad, but not related to renaming, may confuse if inspected with git blame


dedupe(L) -> dedupe(L, sets:new()).

dedupe([], _) ->

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

also here

[] ->
not_found
end;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

check also this file

erlang:error(?RLX_ERROR({strip_release, Reason}))
after
%% revert file permissions after strip.
[ file:change_mode(File, OrigMode)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

formatting edits in this file too

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.

4 participants