Build is performed for this file and results are sent back to browser;
After loading html page, browser requests both js and css simultaneously;
Execution of build plan for js starts. As a part of a process, bemjson.js is created with test-tmpl tech;
Execution of build plan for css starts on different worker. bemjson.js is generated too for this step. In order to write it, bem-tools opens file with w flag, write content of the file and closes it.
Occasionally, building of bemdecl.js for js starts after bemjson file is opened in write mode by css plan (overriding its content), but before new content is written. Thus, no blocks from bemjson appear in bemdecl.
More general solution for i/o sync will be implemented in future versions of bem-tools, for now its just fix for bem-pr.
Suppose that tests are running from bem server and user requests
desktop.sets/some.tests/default/default.html
. What happens:desktop.sets/some.tests/default/default.html
;js
andcss
simultaneously;js
starts. As a part of a process,bemjson.js
is created withtest-tmpl
tech;css
starts on different worker.bemjson.js
is generated too for this step. In order to write it,bem-tools
opens file withw
flag, write content of the file and closes it.bemdecl.js
forjs
starts afterbemjson
file is opened in write mode bycss
plan (overriding its content), but before new content is written. Thus, no blocks from bemjson appear in bemdecl.More general solution for i/o sync will be implemented in future versions of
bem-tools
, for now its just fix for bem-pr.