OpenSCAD User Manual/WIP/Migration Guide

OpenSCAD 2019 contains changes that break some old design and/or create errors and warnings for code that previously did not.

Duplicate assignment warning
In the following cases OpenSCAD 2019 creates a warning in case of a duplicate assignment:
 * variable overwritten in the same file and scope
 * assignment from the mainFile overwritten by an include

In the following cases, the variable is silently overwritten by the last assignment:
 * assignment via command line
 * variable of an include over written by the main file

uninitialized special variables
This code now causes a warning, as $test is not initialized: The workaround is the new is_undef function:

argument types
Built in functions and modules now warn, when the argument type does not match.

As type checking previously was done by using the built in functions returning undef, it is now recommended/required to use is_list, is_num, is_bool and is_string for type checking.

duplicate arguments
OpenSCAD 2019 warns, when a named argument is supplied more then once.

not specified arguments
OpenSCAD now warns, when a module or function parameter is not declared.

user modules
Meaning, this now causes a warning:

If doing that is your intention - like in the Write.scad library - you can update the code as follows:

For Write.scad specifically: Definitions like need to change to and Neither circle nor sphere support the center argument - center and circle are always centered.

An other example is as circle excepts r, not radius.

arguments overwritten by literal
Note that this very similar example does not trigger a warning, due to quirks in the implementation:

arguments range check for builtin modules
things like

argument count for builtin functions
If the argument count for builtin functions does not match, OpenSCAD 2019 displays a warning:

assert
The builtin Assert can not be overwritten by a user function or module. If you have a function or module named as assert, you must rename it.