OperationException: Bad indent in miniyaml

Information and discussion for custom maps and mods.
Post Reply
PhoibDS
Posts: 12
Joined: Fri Dec 10, 2010 10:17 pm

OperationException: Bad indent in miniyaml

Post by PhoibDS »

While I am an avid advocate of indenting, the current indenting is enforced too rigid. Whenever I have a row of spaces hidden in the tabs (which can happen a lot when you use a mouse in vi) it breaks the code.

But it does not just break the code, it also hides it. Before I get to the indentation error, I get a row of unable to load field [bla] of type[blabla], after the indentation error, hiding the fact that there is such an error as root cause of the crash.

So please, use less strict indentation, because now it is frustrating to retab your vehicle all the time.

beedee
Posts: 94
Joined: Mon Sep 06, 2010 5:02 am
Location: Wellington
Contact:

Post by beedee »

The whitespace is syntactically significant, the same as Python or Haskell. We can't relax the indentation otherwise it won't work.

PhoibDS
Posts: 12
Joined: Fri Dec 10, 2010 10:17 pm

Post by PhoibDS »

Alright, then give me a few minutes.

User avatar
Sleipnir
Posts: 878
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Post by Sleipnir »

I did some testing and it looks like our yaml loading was broken at some point in the past.

It used to accept any amount of whitespace for child nodes, provided it was consistent (if a parent is indented by 4 spaces, then its child must be indented by 4 spaces, and then at least one more whitespace character - indenting the child with two tabs won't work since you remove the semantic link to its parent).

I'll add a bug to the tracker on this, but to be honest its not a high priority and so probably won't be fixed any time soon.

Post Reply