[#103241] [Ruby master Bug#17777] 2.6.7 fails to build on macOS: implicit declaration of function 'rb_native_mutex_destroy' is invalid in C99 — eregontp@...
Issue #17777 has been reported by Eregon (Benoit Daloze).
17 messages
2021/04/05
[#103305] [Ruby master Feature#17785] Allow named parameters to be keywords — marcandre-ruby-core@...
Issue #17785 has been reported by marcandre (Marc-Andre Lafortune).
21 messages
2021/04/08
[#103342] [Ruby master Feature#17790] Have a way to clear a String without resetting its capacity — jean.boussier@...
Issue #17790 has been reported by byroot (Jean Boussier).
14 messages
2021/04/09
[#103388] [ANN] Multi-factor Authentication of bugs.ruby-lang.org — SHIBATA Hiroshi <hsbt@...>
Hello,
5 messages
2021/04/12
[#103414] Re: [ANN] Multi-factor Authentication of bugs.ruby-lang.org
— Martin J. Dürst <duerst@...>
2021/04/13
Is there a way to use this multi-factor authentication for (like me)
[#103547] List of CI sites to check — Martin J. Dürst <duerst@...>
Hello everybody,
4 messages
2021/04/22
[#103596] [Ruby master Feature#17830] Add Integer#previous and Integer#prev — rafasoaresms@...
Issue #17830 has been reported by rafasoares (Rafael Soares).
9 messages
2021/04/26
[ruby-core:103646] [Ruby master Bug#16680] Symlink folder in $LOAD_PATH does not work with autoload
From:
merch-redmine@...
Date:
2021-04-28 20:30:53 UTC
List:
ruby-core #103646
Issue #16680 has been updated by jeremyevans0 (Jeremy Evans).
Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN to 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: REQUIRED
Status changed from Open to Closed
I tried this with Ruby 2.6, 2.7, and 3.0, and got the same results with all three:
```
$ ls -ld /home/jeremy/tmp/looksee1
lrwxr-xr-x 1 jeremy jeremy 7 Apr 28 13:19 /home/jeremy/tmp/looksee1 -> looksee
$ ruby26 -I /home/jeremy/tmp/looksee1/lib -r looksee -e 'puts 100'
/usr/local/lib/ruby/2.6/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- looksee/mri.so (LoadError)
from /usr/local/lib/ruby/2.6/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/jeremy/tmp/looksee/lib/looksee/clean.rb:171:in `<module:Looksee>'
from /home/jeremy/tmp/looksee/lib/looksee/clean.rb:4:in `<top (required)>'
from /usr/local/lib/ruby/2.6/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/ruby/2.6/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/jeremy/tmp/looksee/lib/looksee.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/2.6/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/ruby/2.6/rubygems/core_ext/kernel_require.rb:54:in `require'
$ ruby27 -I /home/jeremy/tmp/looksee1/lib -r looksee -e 'puts 100'
Traceback (most recent call last):
8: from /usr/local/lib/ruby/2.7/rubygems/core_ext/kernel_require.rb:83:in `require'
7: from /usr/local/lib/ruby/2.7/rubygems/core_ext/kernel_require.rb:83:in `require'
6: from /home/jeremy/tmp/looksee/lib/looksee.rb:1:in `<top (required)>'
5: from /usr/local/lib/ruby/2.7/rubygems/core_ext/kernel_require.rb:83:in `require'
4: from /usr/local/lib/ruby/2.7/rubygems/core_ext/kernel_require.rb:83:in `require'
3: from /home/jeremy/tmp/looksee/lib/looksee/clean.rb:4:in `<top (required)>'
2: from /home/jeremy/tmp/looksee/lib/looksee/clean.rb:171:in `<module:Looksee>'
1: from /usr/local/lib/ruby/2.7/rubygems/core_ext/kernel_require.rb:83:in `require'
/usr/local/lib/ruby/2.7/rubygems/core_ext/kernel_require.rb:83:in `require': cannot load such file -- looksee/mri.so (LoadError)
$ ruby30 -I /home/jeremy/tmp/looksee1/lib -r looksee -e 'puts 100'
<internal:/usr/local/lib/ruby/3.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- looksee/mri.so (LoadError)
from <internal:/usr/local/lib/ruby/3.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /home/jeremy/tmp/looksee/lib/looksee/clean.rb:171:in `<module:Looksee>'
from /home/jeremy/tmp/looksee/lib/looksee/clean.rb:4:in `<top (required)>'
from <internal:/usr/local/lib/ruby/3.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/local/lib/ruby/3.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /home/jeremy/tmp/looksee/lib/looksee.rb:1:in `<top (required)>'
from <internal:/usr/local/lib/ruby/3.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/local/lib/ruby/3.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
```
I tried with both the master branch and the v4.2.0 tag for looksee with the same results, just in case looksee had worked around this problem another way.
So I think this problem has been resolved by Ruby 2.7.3. If you can still recreate the issue on Ruby 2.7.3, please bisect to find the failing commit and fixing commit, and note it in this ticket, and we can mark this for backporting.
----------------------------------------
Bug #16680: Symlink folder in $LOAD_PATH does not work with autoload
https://bugs.ruby-lang.org/issues/16680#change-91742
* Author: zw963 (Wei Zheng)
* Status: Closed
* Priority: Normal
* ruby -v: 2.7.0
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: REQUIRED
----------------------------------------
The following is a full reproducible process. I will use a gem named 'looksee' to reproduce this.
1. Do `gem install looksee`
2. Go to `gem` folder and copy `lib` content into `/tmp/test_looksee` so that we have a folder like this:
```sh
╰─ $ tree /tmp/test_looksee
/tmp/test_looksee
└── lib
├── looksee
│ ├── adapter
│ │ ├── base.rb
│ │ └── rubinius.rb
│ ├── adapter.rb
│ ├── clean.rb
│ ├── columnizer.rb
│ ├── core_ext.rb
│ ├── editor.rb
│ ├── help.rb
│ ├── inspector.rb
│ ├── lookup_path.rb
│ ├── mri.so
│ └── version.rb
└── looksee.rb
```
3. Create a new symlink to this folder.
```sh
╰─ $ln -s /tmp/test_looksee /tmp/test_looksee1
╰─ $ ls -alhd /tmp/test_looksee*
drwxr-xr-x 3 zw963 zw963 60 2020-03-08 01:39 /tmp/test_looksee/
lrwxrwxrwx 1 zw963 zw963 13 2020-03-08 02:08 /tmp/test_looksee1 ->
test_looksee//
```
4. Run the following command to reproduce this issue.
```sh
╰─ $ ruby -I/tmp/test_looksee1/lib/ -rlooksee -e 'puts 100'
Traceback (most recent call last):
10: from /home/zw963/others/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
9: from /home/zw963/others/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
8: from /tmp/test_looksee1/lib/looksee.rb:1:in `<top (required)>'
7: from /home/zw963/others/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
6: from /home/zw963/others/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
5: from /tmp/test_looksee1/lib/looksee/clean.rb:4:in `<top (required)>'
4: from /tmp/test_looksee1/lib/looksee/clean.rb:171:in `<module:Looksee>'
3: from /home/zw963/others/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
2: from /home/zw963/others/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
1: from /tmp/test_looksee1/lib/looksee/adapter.rb:1:in `<top (required)>'
/tmp/test_looksee1/lib/looksee/adapter.rb:2:in `<module:Looksee>': uninitialized constant Looksee::Adapter (NameError)
```
You may want to ask why use symlinks folder in `$LOAD_PATH`. I think this is a quite common case; many ruby developers have a local gem not managed by `Rubygems` or `Bundler`. They just use `$LOAD_PATH` to `require`/`load` it, and it is hard to ensure everyone's folder is not a symlink.
I think this is a breaking change. All those codes worked quite well before 2.7 because old codes always
follow symlinks. The following is an example from ruby 2.6.3, which works.
```sh
╰─ $ ruby -I/tmp/test_looksee1/lib/ -rlooksee -e 'puts 100'
Traceback (most recent call last):
8: from /home/zw963/others/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
7: from /home/zw963/others/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
6: from /tmp/test_looksee/lib/looksee.rb:1:in `<top (required)>'
5: from /home/zw963/others/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
4: from /home/zw963/others/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /tmp/test_looksee/lib/looksee/clean.rb:4:in `<top (required)>'
2: from /tmp/test_looksee/lib/looksee/clean.rb:171:in `<module:Looksee>'
1: from /home/zw963/others/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/zw963/others/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': incompatible library version - /tmp/test_looksee/lib/looksee/mri.so (LoadError)
```
As we can seen, those breaking codes come from `autoload :Adapter, 'looksee/adapter'`. I suspect
maybe this is caused by nested autoload. But this is only a guess, please check. Thank you.

---Files--------------------------------
clipboard-202003080224-xglcq.png (183 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>