Closed jhellerstein closed 12 years ago
Current behavior seems reasonable to me:
require "rubygems"
require "bud"
class LocMissing
include Bud
state do
channel :ch, [:addr, :cnt]
end
end
c = LocMissing.new
c.run_fg
ruby ~/t1.rb
/Users/neilc/.rvm/gems/ruby-1.8.7-p352/gems/bud-0.0.5/lib/bud/collections.rb:677:in `initialize': Missing location specifier for channel 'ch' (Bud::BudError)
from /Users/neilc/.rvm/gems/ruby-1.8.7-p352/gems/bud-0.0.5/lib/bud/state.rb:98:in `new'
from /Users/neilc/.rvm/gems/ruby-1.8.7-p352/gems/bud-0.0.5/lib/bud/state.rb:98:in `channel'
from /Users/neilc/t1.rb:8:in `__state5__LocMissing'
...
Closing; if you have a test case that still exhibits a problem, please re-open.
Can you provide a test case, please? As far as I can tell this is not a bug.
There is a test case in the original issue. It should issue an error on the state block ("illegal use of '@' in non-channel collection"), not the bloom block.
Yes, that is precisely the current behavior.
Sorry to be dense, just realized I was misparsing the complaint here -- yes, this still needs to be fixed. Will do so shortly.
It is currently possible to use the location-specifier syntax in collections that are not channels; Bud does not complain. E.g.:
The state block parses OK, but the rule in the bloom block fails--- Bud complains somewhat cryptically that it cannot find a column of the name
:col
in collectionwrong
. It would be more helpful to produce the error on the invalid state declaration.