Skip to content
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

plenv install usage is not displayed correctly #202333

Open
4 tasks done
youpong opened this issue Dec 24, 2024 · 3 comments
Open
4 tasks done

plenv install usage is not displayed correctly #202333

youpong opened this issue Dec 24, 2024 · 3 comments
Labels
bug Reproducible Homebrew/homebrew-core bug

Comments

@youpong
Copy link

youpong commented Dec 24, 2024

brew gist-logs <formula> link OR brew config AND brew doctor output

% brew config
HOMEBREW_VERSION: 4.4.13-13-g18cab73
ORIGIN: https://github.com/Homebrew/brew
HEAD: 18cab739e867e0bdf45288780c85ab707489e41b
Last commit: 56 minutes ago
Branch: master
Core tap HEAD: 5c445372ab7c326c168d4df8082fa18db2c706d4
Core tap last commit: 51 minutes ago
Core tap JSON: 24 Dec 13:14 UTC
Core cask tap HEAD: ba609c2101fb72838fb5925d285d9c8044cb7192
Core cask tap last commit: 31 minutes ago
Core cask tap JSON: 24 Dec 13:14 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.6 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/bin/ruby
CPU: octa-core 64-bit arm_blizzard_avalanche
Clang: 16.0.0 build 1600
Git: 2.39.5 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.2-arm64
CLT: 16.2.0.0.1.1733547573
Xcode: 16.2
Rosetta 2: false
% brew doctor
Your system is ready to brew.

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

Display the usage of the plenv install.

What happened (include all command output)?

% plenv help install
Sorry, this command isn't documented yet.

What did you expect to happen?

the same display as when doing plenv install --help.

% plenv install --help

Summary: Install a Perl version using the perl-build plugin

Usage: plenv install [-v|--verbose] <version>
       plenv install [-v|--verbose] /path/to/definition
       plenv install -l|--list

  -l/--list        List all available versions
  -v/--verbose     Verbose mode: print compilation status to stdout
  --as=<NAME>      Install the definition as <NAME>
  --test           Run test cases
  --noman          Skip installation of manpages
  -D, -A, -U, -j   perl configure options via perl-build
  --version        show perl-build plugin version

Example:
  plenv install 5.20.2 -j 8 -Dcc=gcc -UDEBUGGING -Accflags=...

For more options that are passed through perl-build, run `perl-build --help`
or see: https://metacpan.org/pod/distribution/Perl-Build/script/perl-build#OPTIONS

Step-by-step reproduction instructions (by running brew commands)

As written above.
@youpong youpong added the bug Reproducible Homebrew/homebrew-core bug label Dec 24, 2024
@youpong
Copy link
Author

youpong commented Dec 24, 2024

In rbenv, which is very similar to plenv in implementation, there is no similar bug.

@SMillerDev
Copy link
Member

Why do you suspect this is a packaging issue?

@youpong
Copy link
Author

youpong commented Dec 25, 2024

Homebrew installs plenv-install in its own way, different from the project original installation. The resulting wrapper script containing the PERL5LIB environment variable settings is installed as plenv-install.

homebrew-core/Formula/p/perl-build.rb, lines from 128 to 130:

    %w[perl-build plenv-install plenv-uninstall].each do |cmd|
      (bin/cmd).write_env_script(libexec/"bin/#{cmd}", PERL5LIB: ENV["PERL5LIB"])
    end

Now, when the plenv command displays the usage, it processes and generates the contents of the plenv-install file. In doing so, it references the contents of the wrapper script, so the display is not as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/homebrew-core bug
Projects
None yet
Development

No branches or pull requests

2 participants