Closed rubyFeedback closed 2 years ago
I would not worry about this at all.
Yes, shape.rb
happens to dynamically load all Shape subclasses nested under /shape/ namespace directory:
Dir[File.expand_path("./#{File.basename(__FILE__, '.rb')}/*.rb", __dir__)].each {|f| require f}
But then each shape (e.g. Square
) mentions that it requires its superclass Shape
:
require 'glimmer/libui/shape'
Warnings are just warnings. They do not always indicate anything important. That is why they are just called warnings. As such, I am closing this.
Hey there Andy,
Not sure whether this should be reported or not, as it seems to be so minor. But perhaps it may be simple to address, so.
I get a circular require warning when running via the -w flag e. g. this header:
The exact warning looks like this:
I assume that square.rb and/or glimmer/libui/shape.rb may have some inter-dependencies.
Not sure if it is worth to fix or just ignore but I thought I should report it.
(I am currently building that GUI in glimmer-dsl-libui which is why I notice these things. At first I thought I made a mistake, which is usually the case when I write new code, but upon looking at the original .rb file which showed no circular require warnings, I realised that this came because I use the -w flag out of habit. Otherwise I would not have noticed it. Hope that explains this bug report a little bit better.)