-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors with Anycable check #53
Comments
Just to be clear, by anycable i rather mean anycable-rails as that is where these compatibility checks live. On second thought maybe this (anycable-rails) is the best place to add the conditions, e.g. something like: unless diff.empty? || (::Rails.env.test? && diff == ['@_streams']) Obviously this has the extra burden of keeping it up to date with whatever action-cable-testing (or others) will introduce, but i feel anycable-rails already knows about rails, so it's the right place (given this gem is going to be merged into rails proper it will be somewhat part of the api). If you agree with that approach i am happy to create a PR. |
Thanks for the report!
Yep, that should be handled by One of the options could be is to add a whitelist of instance variables (and add |
yes good point, if you agree i can create a PR sometimes tomorrow on |
Sounds good!
No, no need. |
Trying to understand what is the best way to check if the testing part is applied, i am not sure if i understood you correctly, initially i thought we could go with something like I could test for If the That is why i think maybe we should try to exclude |
Maybe using a different instance variable name like Edit: another possibility is if we add some extra method to |
When running specs the
AnyCable::Compatibility
checks are raising an error for setting@_streams
(Channel instance variables are not supported by AnyCable, but were set: @_streams).The adapter is set to
test
as suggested in the readme, but the compatibility checks are loaded via an initializer, so they get applied (and should be as per the documentation). I am not sure if there is something missing/wrong in our setup, but i think this is a problem in either anycable (not knowing about testing instance variable(s)) or action-cable-testing (using a workaround for tracking streams that violate anycable expectations).Both seem to be weak arguments, so i am not sure which one is the better path, or if there are other (better) alternatives.
The text was updated successfully, but these errors were encountered: