You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Volker Weber <v....@inexso.de> on 2019/05/09 06:57:37 UTC

[Tobago] maven build problem with javascript compression

Hi,

the javascript compression fails on my bugfix for Tobago 2: FileDrop did
not work with multiple=false
<https://issues.apache.org/jira/browse/TOBAGO-1989> with:

[INFO] Executed tasks
[INFO]
[INFO] --- exec-maven-plugin:1.1:exec (compress-standard) @
tobago-theme-standard ---
[INFO]
/home/weber/work/myfaces/tobago/tobago-2.x/tobago-theme/tobago-theme-standard/target/javascript-min/standard/script/tobago.min.js:1944:
ERROR - Parse error. missing name after . operator
[INFO]           formData.delete(clientName);
[INFO]                           ^
[INFO]

here is the relevant code part:
-------------------------------------------------------------------------
1940         var formData = new FormData(Tobago.form);
1941         var fileData = form.data("tobago-file-drag-and-drop-files");
1942         if (fileData && fileData.files.length > 0) {
1943           var clientName = fileData.name;
1944           formData.delete(clientName);
1945           for (var i = 0; i < fileData.files.length; i++) {
1946             var file = fileData.files[i];
1947
1948             formData.append(clientName, file);
1949           }
1950           form.removeData("tobago-file-drag-and-drop-files");
1951         }
-------------------------------------------------------------------------

What is wrong in row 1944? (runs fine in uncompressed version)

Regards,
   Volker Weber
-- 
inexso - information exchange solutions GmbH
Ofener Straße 30 | 26121 Oldenburg
www.inexso.de

Re: [Tobago] maven build problem with javascript compression

Posted by Udo Schnurpfeil <lo...@apache.org>.
Hi Volker,

the Jenkins build is back to normal.

Can you please check if everything is fine now?

Regards,

Udo

Am 16.05.19 um 09:52 schrieb Udo Schnurpfeil:
>
> Hi Volker,
>
> it seems to me, the closure compiler misunderstands  the "delete"
> operator. In this case "delete" is a function of FormData (not a very
> good choice for a function name IMHO.
>
> I will update the closure compiler. With the current version, it seems
> to work correctly, but I've to fix two other "delete"-statements.
>
> Regards,
>
> Udo
>
> Am 09.05.19 um 08:57 schrieb Volker Weber:
>> Hi,
>>
>> the javascript compression fails on my bugfix for Tobago 2: FileDrop
>> did not work with multiple=false
>> <https://issues.apache.org/jira/browse/TOBAGO-1989> with:
>>
>> [INFO] Executed tasks
>> [INFO]
>> [INFO] --- exec-maven-plugin:1.1:exec (compress-standard) @
>> tobago-theme-standard ---
>> [INFO]
>> /home/weber/work/myfaces/tobago/tobago-2.x/tobago-theme/tobago-theme-standard/target/javascript-min/standard/script/tobago.min.js:1944:
>> ERROR - Parse error. missing name after . operator
>> [INFO]           formData.delete(clientName);
>> [INFO]                           ^
>> [INFO]
>>
>> here is the relevant code part:
>> -------------------------------------------------------------------------
>> 1940         var formData = new FormData(Tobago.form);
>> 1941         var fileData = form.data("tobago-file-drag-and-drop-files");
>> 1942         if (fileData && fileData.files.length > 0) {
>> 1943           var clientName = fileData.name;
>> 1944           formData.delete(clientName);
>> 1945           for (var i = 0; i < fileData.files.length; i++) {
>> 1946             var file = fileData.files[i];
>> 1947
>> 1948             formData.append(clientName, file);
>> 1949           }
>> 1950           form.removeData("tobago-file-drag-and-drop-files");
>> 1951         }
>> -------------------------------------------------------------------------
>>
>> What is wrong in row 1944? (runs fine in uncompressed version)
>>
>> Regards,
>>    Volker Weber
>> -- 
>> inexso - information exchange solutions GmbH
>> Ofener Straße 30 | 26121 Oldenburg
>> www.inexso.de <http://www.inexso.de>

Re: [Tobago] maven build problem with javascript compression

Posted by Udo Schnurpfeil <lo...@apache.org>.
Hi Volker,

it seems to me, the closure compiler misunderstands  the "delete"
operator. In this case "delete" is a function of FormData (not a very
good choice for a function name IMHO.

I will update the closure compiler. With the current version, it seems
to work correctly, but I've to fix two other "delete"-statements.

Regards,

Udo

Am 09.05.19 um 08:57 schrieb Volker Weber:
> Hi,
>
> the javascript compression fails on my bugfix for Tobago 2: FileDrop
> did not work with multiple=false
> <https://issues.apache.org/jira/browse/TOBAGO-1989> with:
>
> [INFO] Executed tasks
> [INFO]
> [INFO] --- exec-maven-plugin:1.1:exec (compress-standard) @
> tobago-theme-standard ---
> [INFO]
> /home/weber/work/myfaces/tobago/tobago-2.x/tobago-theme/tobago-theme-standard/target/javascript-min/standard/script/tobago.min.js:1944:
> ERROR - Parse error. missing name after . operator
> [INFO]           formData.delete(clientName);
> [INFO]                           ^
> [INFO]
>
> here is the relevant code part:
> -------------------------------------------------------------------------
> 1940         var formData = new FormData(Tobago.form);
> 1941         var fileData = form.data("tobago-file-drag-and-drop-files");
> 1942         if (fileData && fileData.files.length > 0) {
> 1943           var clientName = fileData.name;
> 1944           formData.delete(clientName);
> 1945           for (var i = 0; i < fileData.files.length; i++) {
> 1946             var file = fileData.files[i];
> 1947
> 1948             formData.append(clientName, file);
> 1949           }
> 1950           form.removeData("tobago-file-drag-and-drop-files");
> 1951         }
> -------------------------------------------------------------------------
>
> What is wrong in row 1944? (runs fine in uncompressed version)
>
> Regards,
>    Volker Weber
> -- 
> inexso - information exchange solutions GmbH
> Ofener Straße 30 | 26121 Oldenburg
> www.inexso.de <http://www.inexso.de>