Skip to content
  • Ufuk Kayserilioglu's avatar
    c2b195e1
    Change load error messages to use `Kernel#warn` instead of `$stderr.puts` · c2b195e1
    Ufuk Kayserilioglu authored
    When development tools try to load Rails components, they sometimes end up loading files that will error out since a dependency is missing. In these cases, the tooling can catch the error and change its behaviour.
    
    However, since the warning is printed directly to `$stderr`, the tooling cannot catch and suppress it easily, which ends up causing noise in the output of the tool.
    
    This change makes Rails print these warnings using `Kernel#warn` instead, which can be suppressed by the tooling.
    c2b195e1
    Change load error messages to use `Kernel#warn` instead of `$stderr.puts`
    Ufuk Kayserilioglu authored
    When development tools try to load Rails components, they sometimes end up loading files that will error out since a dependency is missing. In these cases, the tooling can catch the error and change its behaviour.
    
    However, since the warning is printed directly to `$stderr`, the tooling cannot catch and suppress it easily, which ends up causing noise in the output of the tool.
    
    This change makes Rails print these warnings using `Kernel#warn` instead, which can be suppressed by the tooling.
Loading