ttscoff/doing

Warning given when I run `doing done --took`

soto97 opened this issue · 2 comments

Describe the bug

Say I start a doing entry, doing now test. Then, when I am finished, I enter, doing done --took 1m. I get the following error/warning:

/usr/local/var/rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/doing-2.1.35/bin/commands/done.rb:92: warning: deprecated Object#=~ is called on Time; it always returns nil

The entry updates correctly, so the warning isn't affecting my ability to use you awesome doing script, but I don't know if this is going to be a problem for the future. Plus, it's annoying cruft on the command line, which we all despise, right?

To Reproduce

Steps to reproduce the behavior:

  1. Execute command doing now test
  2. Execute command doing done --took 1m
  3. See error: /usr/local/var/rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/doing-2.1.35/bin/commands/done.rb:92: warning: deprecated Object#=~ is called on Time; it always returns nil

I re-ran the command with the debug flags on. Here's the output:

$ GLI_DEBUG=true DOING_DEBUG=true doing done --took 1m
/usr/local/var/rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/doing-2.1.35/bin/commands/done.rb:92: warning: deprecated Object#=~ is called on Time; it always returns nil
>      Config: Local config files found:
>      Config: translated key path paginate to paginate
>      Config: translated key path disabled_commands to disabled_commands
>      Config: translated key path editors to editors
>      Editor: Using vim from config 'editors.default' for default
>      Config: translated key path tag_sort to tag_sort
>      Editor: Using gvim from config 'editors.config' for config
>      Config: translated key path editors.config to editors.config
>      Editor: Using Typora from config 'editors.doing_file' for doing_file
>      Config: translated key path current_section to current_section
>      Config: translated key path plugins.command_path to plugins.command_path
>      Config: translated key path doing_file to doing_file
>        Read: read file /Users/asoto/what_was_i_doing.md
>      Config: translated key path views to views
>      Config: translated key path interval_format to interval_format
>      Config: translated key path templates.default.wrap_width to templates.default.wrap_width
>      Config: translated key path marker_tag to marker_tag
>      Output: 1 item shown
>      Config: Local config files found:
>      Config: translated key path paginate to paginate
>      Config: translated key path disabled_commands to disabled_commands
>      Config: translated key path editors to editors
>      Editor: Using vim from config 'editors.default' for default
>      Config: translated key path tag_sort to tag_sort
>      Editor: Using gvim from config 'editors.config' for config
>      Config: translated key path editors.config to editors.config
>      Editor: Using Typora from config 'editors.doing_file' for doing_file
>      Config: translated key path current_section to current_section
>      Config: translated key path plugins.command_path to plugins.command_path
>      Config: translated key path doing_file to doing_file
>        Read: read file /Users/asoto/what_was_i_doing.md
>      Config: translated key path interaction.confirm_longer_than to interaction.confirm_longer_than
>     Skipped: already tagged @done
>      Config: translated key path date_tags to date_tags
>      Config: translated key path doing_file_sort to doing_file_sort
>      Config: translated key path backup_dir to backup_dir
>      Config: translated key path history_size to history_size
>       Write: File written: /Users/asoto/what_was_i_doing.md
>  Hooks:
>     Skipped: 1 item with no change

Expected behavior

I expected that doing would update the entry as done with a duration based on the "--took" flag, without any warnings or error messages. The doing command did work, but I received warning messages.

Desktop (please complete the following information):

  • Platform: Mac
  • OS: Catalina
  • Version: 10.15.7

Doing version

  • doing version 2.1.35

Ruby version

  • ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]

Additional context

I really don't know how much of an issue this is, nor whether the problem is merely that I am using an older version of ruby. Still, I thought it best to submit this issue in case it's of value to the developer and/or others.

I just upgraded to v2.1.36 and I can confirm that everything works great and the warning is gone. Therefore, I am going to close this issue.

Thanks!