On Tue, 28 Mar 2023 02:08:27 GMT, Jay Bhaskar <jbhas...@openjdk.org> wrote:

> Issue: Error copying file (if different) from 
> Source/JavaScriptCore/Scripts/wkbuiltins/builtins_generate_separate_header.py"
>  to 
> "modules/javafx.web/build/mac/Release/JavaScriptCcripts/builtins_generate_separate_header.py".
> 
> Root cause: The number of build threads more than 8, causing a 
> synchronization issue for builtins_generate_separate_header.py, the file 
> needs to be copied before use at build dir
> 
> Solution: Use the sleep of 1 second and retry 10 times to copy in 
> CMakeList.txt and execute using the execute_process cmake command

modules/javafx.web/src/main/native/Source/JavaScriptCore/CMakeLists.txt line 
198:

> 196:         )
> 197:         if(copy_result)
> 198:             message(WARNING "Failed to copy ${_file} to 
> ${JavaScriptCore_SCRIPTS_DIR}/${_script}: ${copy_output}")

Shouldn't `${copy_output}` at the end of this message be `${copy_result}`?

If not, I think it would be worth to print the `${copy_result}` variable 
regardless, in case there are any issues with the copy process.

modules/javafx.web/src/main/native/Source/JavaScriptCore/CMakeLists.txt line 
210:

> 208:     endif()
> 209:     endif() # end for port "Java"
> 210:     add_custom_command(

Suggestion: I feel this add_custom_command doesn't have to be called anymore 
because our loop did that job already. Maybe this old behavior should be fallen 
back to only when we're not fulfilling the PORT "Java" condition, or it should 
be removed completely.

So, in short:

if(PORT STREQUAL "Java")
  # code for 10-try loop
else() # else for port "Java"
  # old add_custom_command call
endif() # end for port "Java"


Or keep the code as is and remove this add_custom_command call. What do you 
think?

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1073#discussion_r1151597002
PR Review Comment: https://git.openjdk.org/jfx/pull/1073#discussion_r1151605041

Reply via email to