Discussion:
[OpenSCAD] Issues with latest master.
nop head
2018-11-29 15:32:28 UTC
Permalink
I get these warnings, which are probably genuine errors, but without a
filename, very hard to find.

OpenSCAD 2018.11.29.ci630

WARNING: Ignoring unknown variable '$back', line 117.

WARNING: Ignoring unknown variable '$back', line 66.

WARNING: Ignoring unknown variable '$back', line 66.

WARNING: Ignoring unknown variable '$bom', line 25.

ARNING: Unable to convert translate([2.63, undef, 0]) parameter to a vec3
or vec2 of numbers, line 159

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
vec2 of numbers, line 56

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
vec2 of numbers, line 56

WARNING: Unable to convert translate([undef, 4.63, 0]) parameter to a vec3
or vec2 of numbers, line 163

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
vec2 of numbers, line 56

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
vec2 of numbers, line 56

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
vec2 of numbers, line 56

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
vec2 of numbers, line 56

WARNING: Unable to convert translate([]) parameter to a vec3 or vec2 of
numbers, line 56

WARNING: Unable to convert translate([]) parameter to a vec3 or vec2 of
numbers, line 56

WARNING: Unable to convert translate([]) parameter to a vec3 or vec2 of
numbers, line 56

WARNING: Unable to convert translate([]) parameter to a vec3 or vec2 of
numbers, line 56


Are all warnings supposed to show the file now, or is that still work in
progress?


Another thing I noticed is the used file cache has way too many files. I
think files used with both absolute and relative file paths get two cache
entries. I don't know if this is a new bug, or has always been the case. It
happens with a library that uses some of its own files with a relative path
but the whole library is used with an absolute path (that comes from the
OPENSCADLIBS environment variable) in the project .
Marius Kintel
2018-11-29 16:06:13 UTC
Permalink
Are all warnings supposed to show the file now, or is that still work in progress?
At least some of that is an open PR: https://github.com/openscad/openscad/pull/2593
Another thing I noticed is the used file cache has way too many files. I think files used with both absolute and relative file paths get two cache entries.
I had a similar concern last night, see my comment here: https://github.com/openscad/openscad/pull/2593#discussion_r237359938
Not sure if we may need to backtrack through some of the warning stuff to figure this out..

-Marius
nop head
2018-11-29 17:09:04 UTC
Permalink
Not sure why you would want to put the main file path into the cache key.
In MDI mode I expect the used files in my library to be cached once, not
once for each open window. Is there a reason why the cached files can't be
shared between different windows?
Post by nop head
Post by nop head
Are all warnings supposed to show the file now, or is that still work in
progress?
https://github.com/openscad/openscad/pull/2593
Post by nop head
Another thing I noticed is the used file cache has way too many files. I
think files used with both absolute and relative file paths get two cache
entries.
https://github.com/openscad/openscad/pull/2593#discussion_r237359938
Not sure if we may need to backtrack through some of the warning stuff to figure this out..
-Marius
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Marius Kintel
2018-11-29 17:29:43 UTC
Permalink
Not sure why you would want to put the main file path into the cache key. In MDI mode I expect the used files in my library to be cached once, not once for each open window. Is there a reason why the cached files can't be shared between different windows?
Exactly, that was the cause of my concern. If the compiled file is depending on the main file, this won’t fly, so we should probably find a way of decoupling that.
Let’s wait for Michael to comment and see where we can take it from there.

-Marius
Michael Frey
2018-12-01 12:40:06 UTC
Permalink
Post by Marius Kintel
Are all warnings supposed to show the file now, or is that still work in progress?
At least some of that is an open PR: https://github.com/openscad/openscad/pull/2593
Now replaced with https://github.com/openscad/openscad/pull/2615
Post by Marius Kintel
Another thing I noticed is the used file cache has way too many files. I think files used with both absolute and relative file paths get two cache entries.
I had a similar concern last night, see my comment here: https://github.com/openscad/openscad/pull/2593#discussion_r237359938
Not sure if we may need to backtrack through some of the warning stuff to figure this out..
It sound concerning to me that relatives paths are or might be used for
cache entries.

It is not unlikely that a user has an old copy of his project that uses
a different version of library via relative paths and he uses both and
old and new copy to debug something.

On the bright side: Making all cache entire paths absolute would resolve
both issues.


With kind regards,

Michael Frey
nop head
2018-12-01 12:57:22 UTC
Permalink
I think the cache entries probably are all absolute paths. The issue was in
converting from no path to absolute the current directory is used. That had
a different case to the absolute paths generated from OPENSCADLIBS, so got
a different cache entry even though it was the same file due to Windows
ignoring case. To debug it I generated a dependency file with the -d
option. All the paths were absolute but the ones in the root directory of
the project had a difference case for that directory.
Post by Marius Kintel
Post by nop head
Are all warnings supposed to show the file now, or is that still work
in progress?
https://github.com/openscad/openscad/pull/2593
Now replaced with https://github.com/openscad/openscad/pull/2615
Post by Marius Kintel
Post by nop head
Another thing I noticed is the used file cache has way too many files.
I think files used with both absolute and relative file paths get two cache
entries.
https://github.com/openscad/openscad/pull/2593#discussion_r237359938
Post by Marius Kintel
Not sure if we may need to backtrack through some of the warning stuff
to figure this out..
It sound concerning to me that relatives paths are or might be used for
cache entries.
It is not unlikely that a user has an old copy of his project that uses
a different version of library via relative paths and he uses both and
old and new copy to debug something.
On the bright side: Making all cache entire paths absolute would resolve
both issues.
With kind regards,
Michael Frey
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
MichaelAtOz
2018-11-29 20:15:43 UTC
Permalink
Was 'ARNING:' a cut & paste problem or in the console representing a code
typo?



-----
Admin - email* me if you need anything, or if I've done something stupid...

* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
Sent from: http://forum.openscad.org/
nop head
2018-11-29 21:38:12 UTC
Permalink
Yes must have been an error on my part. WARNING is always spelt correctly.
Post by MichaelAtOz
Was 'ARNING:' a cut & paste problem or in the console representing a code
typo?
-----
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.
Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.
The TPP is no simple “trade agreement.” Fight it!
http://www.ourfairdeal.org/ time is running out!
--
Sent from: http://forum.openscad.org/
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
nop head
2018-11-30 11:52:46 UTC
Permalink
Another issue is false is no longer converted to 0 when used in a vector
parameter to translate.

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
vec2 of numbers, line 56

The undef is actually false. I thought true and false were converted to 1 ,
0 when a number was required, as C.
Post by nop head
Yes must have been an error on my part. WARNING is always spelt correctly.
Post by MichaelAtOz
Was 'ARNING:' a cut & paste problem or in the console representing a code
typo?
-----
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.
Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.
The TPP is no simple “trade agreement.” Fight it!
http://www.ourfairdeal.org/ time is running out!
--
Sent from: http://forum.openscad.org/
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
nop head
2018-11-30 11:58:25 UTC
Permalink
BTW, it was actually a mistake that I was passing false but it is
misleading to say it is undef.
Post by nop head
Another issue is false is no longer converted to 0 when used in a vector
parameter to translate.
WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
vec2 of numbers, line 56
The undef is actually false. I thought true and false were converted to 1
, 0 when a number was required, as C.
Post by nop head
Yes must have been an error on my part. WARNING is always spelt correctly.
Post by MichaelAtOz
Was 'ARNING:' a cut & paste problem or in the console representing a code
typo?
-----
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.
Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.
The TPP is no simple “trade agreement.” Fight it!
http://www.ourfairdeal.org/ time is running out!
--
Sent from: http://forum.openscad.org/
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Marius Kintel
2018-11-30 13:48:57 UTC
Permalink
Another issue is false is no longer converted to 0 when used in a vector parameter to translate.
WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or vec2 of numbers, line 56
The undef is actually false. I thought true and false were converted to 1 , 0 when a number was required, as C.
This is worthy of a github ticket.

-Marius
nop head
2018-11-30 15:09:17 UTC
Permalink
Actually it is my fault again. The undef is generated by false * 15.
Passing an actual true or false gives a correct error message assuming true
and false are not valid as numbers.


echo(version());
echo(false * 5, true + 1);
translate([true, false, false * 15]);


ECHO: [2018, 11, 29]

ECHO: undef, undef

WARNING: Unable to convert translate([true, false, undef]) parameter to a
vec3 or vec2 of numbers, line 5
Post by nop head
Post by nop head
Another issue is false is no longer converted to 0 when used in a vector
parameter to translate.
Post by nop head
WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3
or vec2 of numbers, line 56
Post by nop head
The undef is actually false. I thought true and false were converted to
1 , 0 when a number was required, as C.
This is worthy of a github ticket.
-Marius
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
nop head
2018-12-01 10:13:30 UTC
Permalink
Post by nop head
Another thing I noticed is the used file cache has way too many files. I
think files used with both absolute and relative file paths get two cache
entries.

This again is my fault, or rather Bill Gate's. Under Windows paths are case
insensitive. When I used a relative path it picked up the actual name of a
directory that differed in case to the full paths I was using. When I
corrected the directory name I also had to not open the file from the
recent list as that was remembering the old name with the wrong case.

Case insensitive paths are a mess, not sure how this should be fixed. I
want my library to work on Linux as well as Windows so the paths have to be
the correct case. It is only this bug / feature that made me realise I had
some discrepancies left. I was previously alerted to some due to getting
lots of new warnings about variables defined twice due to same file being
reached by different case paths. I didn't report that as a bug because it
was useful.

One solution is to make all path comparisons case insensitive when running
on Windows to match the file system. But then if you want a library to work
on Linux you don't get any warnings when developing on Windows.
Post by nop head
Actually it is my fault again. The undef is generated by false * 15.
Passing an actual true or false gives a correct error message assuming true
and false are not valid as numbers.
echo(version());
echo(false * 5, true + 1);
translate([true, false, false * 15]);
ECHO: [2018, 11, 29]
ECHO: undef, undef
WARNING: Unable to convert translate([true, false, undef]) parameter to a
vec3 or vec2 of numbers, line 5
Post by nop head
Another issue is false is no longer converted to 0 when used in a
vector parameter to translate.
Post by nop head
WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3
or vec2 of numbers, line 56
Post by nop head
The undef is actually false. I thought true and false were converted to
1 , 0 when a number was required, as C.
This is worthy of a github ticket.
-Marius
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Loading...