bkeepers / dotenv

A Ruby gem to load environment variables from `.env`.
MIT License
6.61k stars 505 forks source link

v3.0.3 causes regression with semantic-logger v4.15.0 #493

Closed brosintoski closed 9 months ago

brosintoski commented 9 months ago

Steps to reproduce

Tell us how to reproduce the issue. Show how you included dotenv (Gemfile). gem 'dotenv-rails' Paste your env using:

REMOVE ANY SENSITIVE INFORMATION FROM YOUR OUTPUT

Expected behavior

calling Rails.application.initialize! initializes application successfully

Actual behavior

.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/semantic_logger-4.15.0/lib/semantic_logger/base.rb:190:in `block in tagged': no block given (yield) (LocalJumpError)
    from .rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/semantic_logger-4.15.0/lib/semantic_logger/semantic_logger.rb:319:in `fast_tag'
    from .rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/semantic_logger-4.15.0/lib/semantic_logger/base.rb:197:in `tagged'
    from .rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/dotenv-3.0.3/lib/dotenv/rails.rb:93:in `block in <class:Rails>'
    from .rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.3.2/lib/rails/initializable.rb:32:in `instance_exec'
    from .rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.3.2/lib/rails/initializable.rb:32:in `run'
    from .rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.3.2/lib/rails/initializable.rb:61:in `block in run_initializers'
    from .rbenv/versions/3.2.2/lib/ruby/3.2.0/tsort.rb:228:in `block in tsort_each'
    from .rbenv/versions/3.2.2/lib/ruby/3.2.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    from .rbenv/versions/3.2.2/lib/ruby/3.2.0/tsort.rb:431:in `each_strongly_connected_component_from'
    from .rbenv/versions/3.2.2/lib/ruby/3.2.0/tsort.rb:349:in `block in each_strongly_connected_component'
    from .rbenv/versions/3.2.2/lib/ruby/3.2.0/tsort.rb:347:in `each'
    from .rbenv/versions/3.2.2/lib/ruby/3.2.0/tsort.rb:347:in `call'
    from .rbenv/versions/3.2.2/lib/ruby/3.2.0/tsort.rb:347:in `each_strongly_connected_component'
    from .rbenv/versions/3.2.2/lib/ruby/3.2.0/tsort.rb:226:in `tsort_each'
    from .rbenv/versions/3.2.2/lib/ruby/3.2.0/tsort.rb:205:in `tsort_each'
    from .rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.3.2/lib/rails/initializable.rb:60:in `run_initializers'
    from .rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.3.2/lib/rails/application.rb:426:in `initialize!'
    from coupa/src/github.com/coupa/coupa_pay_support/config/environment.rb:5:in

System configuration

dotenv version: 3.0.3

Rails version: 7.1.3

Ruby version: 3.2.2

alisaifee commented 9 months ago

It seems the issue originates from https://github.com/bkeepers/dotenv/pull/489

brosintoski commented 9 months ago

It seems the issue originates from #489

Yeah, also commented in merged pr: https://github.com/bkeepers/dotenv/pull/489#issuecomment-1965487987