{"action":"opened","issue":{"url":"https://api.github.com/repos/puma/puma/issues/1632","repository_url":"https://api.github.com/repos/puma/puma","labels_url":"https://api.github.com/repos/puma/puma/issues/1632/labels{/name}","comments_url":"https://api.github.com/repos/puma/puma/issues/1632/comments","events_url":"https://api.github.com/repos/puma/puma/issues/1632/events","html_url":"https://github.com/puma/puma/issues/1632","id":350045831,"node_id":"MDU6SXNzdWUzNTAwNDU4MzE=","number":1632,"title":"`import` DSL method removed without replacement?","user":{"login":"bclennox","id":18859,"node_id":"MDQ6VXNlcjE4ODU5","avatar_url":"https://avatars1.githubusercontent.com/u/18859?v=4","gravatar_id":"","url":"https://api.github.com/users/bclennox","html_url":"https://github.com/bclennox","followers_url":"https://api.github.com/users/bclennox/followers","following_url":"https://api.github.com/users/bclennox/following{/other_user}","gists_url":"https://api.github.com/users/bclennox/gists{/gist_id}","starred_url":"https://api.github.com/users/bclennox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bclennox/subscriptions","organizations_url":"https://api.github.com/users/bclennox/orgs","repos_url":"https://api.github.com/users/bclennox/repos","events_url":"https://api.github.com/users/bclennox/events{/privacy}","received_events_url":"https://api.github.com/users/bclennox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-13T14:08:42Z","updated_at":"2018-08-13T14:08:42Z","closed_at":null,"author_association":"NONE","body":"### Steps to reproduce\r\n\r\nIn v3.6.0, the DSL supported an `import` method to load another config file within a given file. We use this to have a `default.rb` that gets loaded into each of our environments, which have environment-specific config in `development.rb`, `production.rb`, etc.\r\n\r\nThis method was removed in #1234 without any obvious explanation. There is a `load` method, but that doesn't load the file immediately (or at all?) the way that `import` does:\r\n\r\n```ruby\r\n# config/puma/development.rb\r\nload 'default'\r\nputs 'Should not get here'\r\n\r\n# config/puma/default.rb\r\nraise 'Raising from default.rb'\r\n\r\n$ bundle exec puma -e development\r\nShould not get here\r\nPuma starting in single mode...\r\n# ...\r\n```\r\n\r\nWith `import` instead of `load`:\r\n\r\n```ruby\r\n# config/puma/development.rb\r\nimport 'default'\r\nputs 'Should not get here'\r\n\r\n# config/puma/default.rb\r\nraise 'Raising from default.rb'\r\n\r\n$ bundle exec puma -e development\r\nRuntimeError: Raising from default.rb\r\n  config/puma/default.rb:1:in `_load_from'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/lib/puma/dsl.rb:26:in `instance_eval'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/lib/puma/dsl.rb:26:in `_load_from'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/lib/puma/dsl.rb:70:in `import'\r\n  config/puma/development.rb:1:in `_load_from'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/lib/puma/dsl.rb:26:in `instance_eval'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/lib/puma/dsl.rb:26:in `_load_from'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/lib/puma/dsl.rb:9:in `load'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/lib/puma/configuration.rb:205:in `block in load'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/lib/puma/configuration.rb:202:in `each'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/lib/puma/configuration.rb:202:in `load'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/lib/puma/launcher.rb:62:in `initialize'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/lib/puma/cli.rb:65:in `new'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/lib/puma/cli.rb:65:in `initialize'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/bin/puma:8:in `new'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/gems/puma-3.6.0/bin/puma:8:in `<top (required)>'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/bin/puma:23:in `load'\r\n  /Users/brandan/repos/baseline/vendor/bundle/ruby/2.5.0/bin/puma:23:in `<top (required)>'\r\n```\r\n\r\nAccording to the docs in the source, we would have to call `Configuration#load` at some point, but I'm not sure how or when to do that, since we're not explicitly creating a Configuration.\r\n\r\n### Expected behavior\r\n\r\nI expected that `import` would still be supported when upgrading to v3.12.0, but since it's been over a year since it was removed and it doesn't seem to be affecting others (based on searching issues here), is there a different pattern that we should be following? Is there a way to make `load` work the way `import` worked?\r\n\r\n### Actual behavior\r\n\r\nThe \"loaded\" file does not seem to be loaded at all.\r\n\r\n### System configuration\r\n\r\n**Ruby version**: 2.5.1\r\n**Rails version**: 5.2.1\r\n**Puma version**: 3.12.0"}}
{"actor":{"display_login":"bclennox"}}