Xavier Noria

Results 159 comments of Xavier Noria

With CRuby, that passes even with `sleep 60`.

Problem is, this is a fundamental property of Zeitwerk, which is a fundamental property of CRuby: You won't see a class half-defined due to context switching while autoloading. Meaning, what...

Test revised here: https://github.com/fxn/zeitwerk/commit/016404cc94c9940e31cf057955d7ecdd43f70f54. Thanks for the comment about that :).

Hey! I have documented this [in the README](https://github.com/fxn/zeitwerk#supported-ruby-versions). I believe it is accurate, but let me know if it should word it in a different way :).

I am not familiar with the implementation, but isn't `require` already synchronized to avoid seeing partially evaluated files elsewhere? Why aren't these autoloads inheriting or relying on this property?

@eregon But if `user.rb` uses `C`, it should `require 'c'` before at some point in the code path, no?

Something that could be relevant in @ioquatix `foobar.rb` example (just a remark, I don't know from the top of my head) is the constant lookup that happens in `module Foo;...

So, let me repeat the question. The example sets autoloads for two constants, pointing to the same file. Since that is synchronized, why aren't the autoloads? I'd expect the second...

I have run this script in that directory: ```ruby p __dir__.encoding p Dir.pwd.encoding puts p __ENCODING__ p ''.encoding p Encoding.default_external p Encoding.default_internal ``` and the output is ``` # #...