[OpenSCAD] Infamous warnings

Michael Frey michael.frey at gmx.ch
Fri Nov 29 14:36:31 EST 2019


On 28.11.19 20:19, Ronaldo Persiano wrote:
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value
> greater than the end value is deprecated.
>
> Is there no way to provide some hint were the problem was found?
>
Hi,

Good idea to tackle that.

I am working on it:

The issue was/is that at the point where DEPRECATED warning is created I
do not have access to context (the context contains the location).

So, I have to move the warning "up to chain".

I need to dwell a bit about the details.


The bold approach would be to change the DEPRECATED to ERROR.

On the other-hand, currently

for(i=[10:1:1]){
     echo(i);
}

is not even a warning.

In this example with constants it is obviously an error, but if the
range is defined with a variable that generated by a loop it can both be
very intentional and hard to debug.


With Kind regards,

Michael Frey

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20191129/7e5f6d6a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aaloblhpfobgmmka.png
Type: image/png
Size: 78183 bytes
Desc: not available
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20191129/7e5f6d6a/attachment.png>


More information about the Discuss mailing list