# Interesting behavior (bug or useful feature ?)

**URL:** <https://discourse.dry-rb.org/t/interesting-behavior-bug-or-useful-feature/209>\
**Category:** Support\
**Created:** [February 2, 2017, 2:18pm UTC](https://discourse.dry-rb.org/t/interesting-behavior-bug-or-useful-feature/209 "2017-02-02T14:18:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![whisky](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/whisky/32/328_2.png) [@whisky](https://discourse.dry-rb.org/u/whisky)\
**Post date:** [February 2, 2017, 2:18pm UTC](https://discourse.dry-rb.org/t/interesting-behavior-bug-or-useful-feature/209/1 "2017-02-02T14:18:15Z")

</div>

When declaring a `dry-system` module, the inherited `dry-container` (DSL) `setting` allow to declare  
some new `settings` entries, but after the call to `configure` all other `settings` calls, properly add  
new entries into the `@settings` array, but they aren’t _resolved_.

example :

```auto
module Cube
  class Container < Dry::System::Container
    env = ENV.fetch('ENV', ENV.fetch('RACK_ENV', 'development')).to_sym
    setting :env, env
    setting :toto, "toto"

   # after this call, no new `setting` entry will be returned
   # by a call to <container>.config.<entry>
   configure do |config|
      config.name = :cube
      config.auto_register = %w[components]
    end

    setting :tutu, "tutu"
  end
end

```

Before the call to `configure`

```auto
Cube::Container.config['env']
=> :development
Cube::Container.config.toto
=> "toto"

```

but

```auto
Cube::Container.config['tutu']
=> +tutu+ is not a setting name

```

I found this _interesting_ and with some added _benefits_ as it allow to have some settings _freezing_  
without having to change `dry-container` configurable options that are tied to `dry-system` logic, just  
for the purpose of adding new `attributes/settings’ to the root _Container_.

Is this a ‘feature’ valuable enough to merit some note, or if this is a _bug_ it is better not to count on it 😉
