Config validation should fail if a mode is defined multiple times #2615

Closed
Airblader opened this Issue Dec 23, 2016 · 0 comments

Projects

None yet

2 participants

@Airblader
Member
Airblader commented Dec 23, 2016 edited

When the same binding mode is defined multiple times i3 will happily load the config. We shoud error out in this case. Just spent a few minutes debugging an issue with a coworker… :-)

@Airblader Airblader added a commit to Airblader/i3-original that referenced this issue Jan 13, 2017
@Airblader Airblader Validate that a binding mode is not defined more than once.
While defining the same mode usually wouldn't hurt and, in fact, the old behavior
allows to split the definition of a binding mode into several blocks, this
can lead to user errors where they accidentally define a mode twice and don't understand
why the mode behaves a certain way (this has been observed in real life :-)).

There's no good usecase for splitting a single binding mode into multiple blocks, thus
the new behavior is better.

fixes #2615
99e9c9e
@Airblader Airblader added a commit to Airblader/i3-original that referenced this issue Jan 13, 2017
@Airblader Airblader Validate that a binding mode is not defined more than once.
While defining the same mode usually wouldn't hurt and, in fact, the old behavior
allows to split the definition of a binding mode into several blocks, this
can lead to user errors where they accidentally define a mode twice and don't understand
why the mode behaves a certain way (this has been observed in real life :-)).

There's no good usecase for splitting a single binding mode into multiple blocks, thus
the new behavior is better.

fixes #2615
9b8019e
@Airblader Airblader added a commit to Airblader/i3-original that referenced this issue Jan 13, 2017
@Airblader Airblader Validate that a binding mode is not defined more than once.
While defining the same mode usually wouldn't hurt and, in fact, the old behavior
allows to split the definition of a binding mode into several blocks, this
can lead to user errors where they accidentally define a mode twice and don't understand
why the mode behaves a certain way (this has been observed in real life :-)).

There's no good usecase for splitting a single binding mode into multiple blocks, thus
the new behavior is better.

fixes #2615
9c4f77e
@stapelberg stapelberg closed this in #2633 Jan 13, 2017
@stapelberg stapelberg added a commit that referenced this issue Jan 13, 2017
@Airblader @stapelberg Airblader + stapelberg Validate that a binding mode is not defined more than once. (#2633)
While defining the same mode usually wouldn't hurt and, in fact, the old behavior
allows to split the definition of a binding mode into several blocks, this
can lead to user errors where they accidentally define a mode twice and don't understand
why the mode behaves a certain way (this has been observed in real life :-)).

There's no good usecase for splitting a single binding mode into multiple blocks, thus
the new behavior is better.

fixes #2615
33d6a4e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment