-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fixed a NameError in AugeasTree#replace_entry #28
Conversation
The build failure is new RuboCop complaining, about "Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true." all over the place, related to its dropping support for Ruby 2.2. https://github.com/rubocop-hq/rubocop/blob/c2047b71a68d079533ebe9b3766a5ed80b7f8a42/relnotes/v0.69.0.md#L23 |
@mvidner regarding that rubocop rule. There is basically two options:
|
https://www.ruby-lang.org/en/news/2019/03/31/support-of-ruby-2-3-has-ended/ The reason is that new RuboCop, which we use, also drops it, which affects the default cop config, which we need to adjust to. > The build failure is new RuboCop complaining, about "Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true." all over the place, related to its dropping support for Ruby 2.2. > > https://github.com/rubocop-hq/rubocop/blob/c2047b71a68d079533ebe9b3766a5ed80b7f8a42/relnotes/v0.69.0.md#L23 > https://github.com/rubocop-hq/rubocop/blob/5ffddbb92926122a4f3fc1bf8ae29d5be31d481f/lib/rubocop/cop/style/frozen_string_literal_comment.rb#L42
- it pleases RuboCop - prepares for Ruby 3 - is more efficient
```console $ srb lib/cfa/augeas_parser.rb:327: Method key does not exist on CFA::AugeasTree https://sorbet.org/docs/error-reference#7003 327 | @data.delete_if { |d| d[:key] == key } ^^^ Errors: 1 ``` See also https://sorbet.org/
undefined local variable or method `key' for #<CFA::AugeasTree:0x0000000002005c10>
296b5b0
to
ba6b822
Compare
I found this bug with Sorbet static analysis, and it seems none of the library users exercise this unusual code path.
So I am not sure whether to make a Bugzilla entry for this and release it right away. See also #6 "Do not try to merge changes"