Open temujin9 opened 11 years ago
This comes out of the resolve madness somehow. The resolve stuff isn't passing :owner
along, and is dropping other attributes on the floor. This is because the interface for collection()
I implemented is totally fucked.
Somehow it leads to there being an orphaned server, which leads to the selected_cloud
being picked up as nil for everyone. dunno wtf.
also noting:
for i in 0 .. instances-1; server(i); end
in facet.rb shouldn't be in the initializer; instances is always 1 there. Also, be careful with negative ranges in ruby:[1, 2, 3][0 .. -1]
=> [1, 2, 3]
[1, 2, 3][1 .. 0]
=> []
instances(2)
after having auto-vivified four servers. It should be possible to have instances(0)
or otherwise change your mind up or down as long as the servers haven't vivified.Maybe there's something simpler going on then I found, but unless someone is really bothered by this the error might be WAY deeper than it looks; I'd wait until new collection
interface comes into place.
Unfucking that interface has become top priority in my mind, then. The resolution code has been a goat-rope for this entire refactor, and I lack the bandwidth to fix it (and the gorillib confusion that caused it) correctly. It seems to be the source of many small but painful bugs, and I'm really tired of looking at the obvious broken every time they come up. Pretty-please, with sprinkles on top: fix collection()
.
Ideally, the vivication should be happening once, during resolution. You shouldn't be altering the DSL any after it has resolved; it should be a static representation that everything else uses for reference only. If I knew how (and had time) to cheaply enforce that in code, I would have.
Causes
'ERROR: RuntimeError: No clouds defined, cannot select a cloud