Search code examples
smalltalkpharo

Pharo code formating issues


In Pharo 2.0 image, when i try to format my code on nautilus browser i get the code scrambled in an unexpected way.

For example

testStrings
| a b |
a := 'AAAAA'.
b := 'BBBBB'.
^a,b

If this method is typed and after saving, try to format it. What i got was this, note the duplicated string-

testStrings
    | a b |
    b := 'BBBBB'.
    b := 'BBBBB'.
    ^ a , b.

Has anyone come across this before? Any way out of this?


Solution

  • I had the AST-Core package reloaded from the repo and the problem was solved. it seems something i loaded in the image caused some of the AST classes(like RBLiteralValueNode) to move to Unclassified package, and also some instance vars were undeclared. This cause the formatting statemets preparation to fail. however on loading all latest it solved the issue.