ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:114785] [Ruby master Bug#19886] "default->bundled gem" warning is not shown under "bundle exec"
@ 2023-09-16  6:20 mame (Yusuke Endoh) via ruby-core
  2023-09-19  5:58 ` [ruby-core:114809] " hsbt (Hiroshi SHIBATA) via ruby-core
  2023-12-06 10:13 ` [ruby-core:115603] " hsbt (Hiroshi SHIBATA) via ruby-core
  0 siblings, 2 replies; 3+ messages in thread
From: mame (Yusuke Endoh) via ruby-core @ 2023-09-16  6:20 UTC (permalink / raw
  To: ruby-core; +Cc: mame (Yusuke Endoh)

Issue #19886 has been reported by mame (Yusuke Endoh).

----------------------------------------
Bug #19886: "default->bundled gem" warning is not shown under "bundle exec"
https://bugs.ruby-lang.org/issues/19886

* Author: mame (Yusuke Endoh)
* Status: Assigned
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```
$ cat Gemfile
source "https://rubygems.org"

$ cat test.rb
require "base64"

$ bundle exec ruby test.rb

$
```

In this situation, `bundle exec ruby test.rb` should print a warning: base64 which will be not part of the default gems since Ruby 3.4.0.

Note that `ruby test.rb` shows the warning, which is not needed (see #19885).

```
$ ruby test.rb
test.rb:1: warning: base64 which will be not part of the default gems since Ruby 3.4.0
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:114809] [Ruby master Bug#19886] "default->bundled gem" warning is not shown under "bundle exec"
  2023-09-16  6:20 [ruby-core:114785] [Ruby master Bug#19886] "default->bundled gem" warning is not shown under "bundle exec" mame (Yusuke Endoh) via ruby-core
@ 2023-09-19  5:58 ` hsbt (Hiroshi SHIBATA) via ruby-core
  2023-12-06 10:13 ` [ruby-core:115603] " hsbt (Hiroshi SHIBATA) via ruby-core
  1 sibling, 0 replies; 3+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2023-09-19  5:58 UTC (permalink / raw
  To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)

Issue #19886 has been updated by hsbt (Hiroshi SHIBATA).


Thank you for reporting this.

I confirmed it. It caused `bundle exec ruby` couldn't call `Bundler.setup`.

It's working with that.

```
$ cat test.rb
#!/usr/bin/env ruby

require "base64"

$ bundle exec test.rb
test.rb:3: warning: base64 will be not part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile. Also contact author of  to add base64 into its gemspec.
```

`bundle exec` will call `Bundler.setup` only script that has ruby shebang.

I'm considering how call `Bundler.setup` via `bundle exec ruby`.

----------------------------------------
Bug #19886: "default->bundled gem" warning is not shown under "bundle exec"
https://bugs.ruby-lang.org/issues/19886#change-104656

* Author: mame (Yusuke Endoh)
* Status: Assigned
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```
$ cat Gemfile
source "https://rubygems.org"

$ cat test.rb
require "base64"

$ bundle exec ruby test.rb

$
```

In this situation, `bundle exec ruby test.rb` should print a warning: base64 which will be not part of the default gems since Ruby 3.4.0.

Note that `ruby test.rb` shows the warning, which is not needed (see #19885).

```
$ ruby test.rb
test.rb:1: warning: base64 which will be not part of the default gems since Ruby 3.4.0
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:115603] [Ruby master Bug#19886] "default->bundled gem" warning is not shown under "bundle exec"
  2023-09-16  6:20 [ruby-core:114785] [Ruby master Bug#19886] "default->bundled gem" warning is not shown under "bundle exec" mame (Yusuke Endoh) via ruby-core
  2023-09-19  5:58 ` [ruby-core:114809] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2023-12-06 10:13 ` hsbt (Hiroshi SHIBATA) via ruby-core
  1 sibling, 0 replies; 3+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2023-12-06 10:13 UTC (permalink / raw
  To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)

Issue #19886 has been updated by hsbt (Hiroshi SHIBATA).

Status changed from Assigned to Closed

I investigate this again.

`bundle exec ruby` called `Bundler.setup`. But `Gem::BUNDLED_GEMS` is not loaded because `bundle exec ruby` ignore to load `gem_prelude.rb`. I'm not sure why `bundle exec t.rb` is load `gem_prelude.rb` yet.

This is fixed by https://github.com/rubygems/rubygems/pull/7224.



----------------------------------------
Bug #19886: "default->bundled gem" warning is not shown under "bundle exec"
https://bugs.ruby-lang.org/issues/19886#change-105534

* Author: mame (Yusuke Endoh)
* Status: Closed
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```
$ cat Gemfile
source "https://rubygems.org"

$ cat test.rb
require "base64"

$ bundle exec ruby test.rb

$
```

In this situation, `bundle exec ruby test.rb` should print a warning: base64 which will be not part of the default gems since Ruby 3.4.0.

Note that `ruby test.rb` shows the warning, which is not needed (see #19885).

```
$ ruby test.rb
test.rb:1: warning: base64 which will be not part of the default gems since Ruby 3.4.0
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-06 10:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-16  6:20 [ruby-core:114785] [Ruby master Bug#19886] "default->bundled gem" warning is not shown under "bundle exec" mame (Yusuke Endoh) via ruby-core
2023-09-19  5:58 ` [ruby-core:114809] " hsbt (Hiroshi SHIBATA) via ruby-core
2023-12-06 10:13 ` [ruby-core:115603] " hsbt (Hiroshi SHIBATA) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).