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

Add a console script, similar to bundle console #21798

Merged
merged 3 commits into from
Jan 13, 2024
Merged

Conversation

lacostej
Copy link
Collaborator

@lacostej lacostej commented Jan 12, 2024

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.
  • I've added or updated relevant unit tests.

Motivation and Context

I am using the console when developing. It doesn't work reliably.

bundle console is deprecated. On top of that I am constantly having issues to run it.

lacostej@JLs ~/Code/OSS/fastlane (feature/console) bundle console
[DEPRECATED] bundle console will be replaced by `bin/console` generated by `bundle gem <name>`
/Users/lacostej/Code/OSS/fastlane/.bundle/ruby/3.1.0/gems/fakefs-1.8.0/lib/fakefs/file.rb:876:in `check_file_existence!': No such file or directory - /Users/lacostej/.rvm/gems/ruby-3.1.2/bin/bundle (Errno::ENOENT)
	from /Users/lacostej/Code/OSS/fastlane/.bundle/ruby/3.1.0/gems/fakefs-1.8.0/lib/fakefs/file.rb:503:in `initialize'
	from /Users/lacostej/Code/OSS/fastlane/.bundle/ruby/3.1.0/gems/fakefs-1.8.0/lib/fakefs/file.rb:190:in `new'
	from /Users/lacostej/Code/OSS/fastlane/.bundle/ruby/3.1.0/gems/fakefs-1.8.0/lib/fakefs/file.rb:190:in `read'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/env.rb:126:in `environment'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/env.rb:17:in `report'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/friendly_errors.rb:74:in `request_issue_report_for'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/friendly_errors.rb:53:in `log_error'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/friendly_errors.rb:126:in `rescue in with_friendly_errors'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/friendly_errors.rb:118:in `with_friendly_errors'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/exe/bundle:36:in `<top (required)>'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/bin/bundle:25:in `load'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/bin/bundle:25:in `<main>'
/Users/lacostej/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/pp.rb:444:in `<top (required)>': superclass mismatch for class File (TypeError)
	from /Users/lacostej/Code/OSS/fastlane/.bundle/ruby/3.1.0/gems/pry-0.14.0/lib/pry/color_printer.rb:3:in `require'
	from /Users/lacostej/Code/OSS/fastlane/.bundle/ruby/3.1.0/gems/pry-0.14.0/lib/pry/color_printer.rb:3:in `<top (required)>'
	from /Users/lacostej/Code/OSS/fastlane/.bundle/ruby/3.1.0/gems/pry-0.14.0/lib/pry.rb:27:in `require'
	from /Users/lacostej/Code/OSS/fastlane/.bundle/ruby/3.1.0/gems/pry-0.14.0/lib/pry.rb:27:in `<top (required)>'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/runtime.rb:60:in `require'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/runtime.rb:55:in `each'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/runtime.rb:55:in `block in require'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/runtime.rb:44:in `each'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/runtime.rb:44:in `require'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler.rb:187:in `require'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/cli/console.rb:15:in `run'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/cli.rb:515:in `console'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/cli.rb:31:in `dispatch'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/cli.rb:25:in `start'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/exe/bundle:48:in `block in <top (required)>'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/gems/bundler-2.3.21/exe/bundle:36:in `<top (required)>'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/bin/bundle:25:in `load'
	from /Users/lacostej/.rvm/gems/ruby-3.1.2/bin/bundle:25:in `<main>'

Description

This bin/console script works for me. I created it manually after reading rubygems/rubygems#4402

Copy link
Contributor

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

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

TIL 👍

ToolsAndDebugging.md Outdated Show resolved Hide resolved
Copy link
Member

@rogerluan rogerluan left a comment

Choose a reason for hiding this comment

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

This is 💯 — TIL as well! 👏

@rogerluan rogerluan changed the title Add a console script. Similar to 'bundle console' Add a console script, similar to bundle console Jan 13, 2024
@lacostej lacostej merged commit 706fc65 into master Jan 13, 2024
7 checks passed
@lacostej lacostej deleted the feature/console branch January 13, 2024 17:01
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.

None yet

3 participants