You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.
The build process seems to be attempting to write to desktop_resources_folder_cmd.bat multiple times, which is causing the conflict.
I've verified that the logic generating the .bat filename is unique to its context.
The error might be related to some rules or macros generating the same file, but I've been unable to identify the root cause.
I would appreciate any insights or potential fixes for this issue. Let me know if any additional information is required. Thanks in advance for your support.
Best regards,
The text was updated successfully, but these errors were encountered:
I continued to investigate the problem and found the root cause, which occurs only on Windows systems. It is produced by the following code, originating from the file magritte_bzl.src:
# Copies a file to another file. If the destination directory does not exist# it will be created. (Windows version)def_copy_action_windows(ctx, input_file, output_file):
bat=ctx.actions.declare_file(ctx.label.name+"_cmd.bat")
# ... rest of the code# Implementation function for rule below.def_magritte_resources_folder_impl(ctx):
# ... rest of the codeforfileinctx.files.runtime_data:
# ...ifctx.attr.is_windows:
_copy_action_windows(ctx, file, output_file)
The error was occurring due to multiple actions trying to write to the same .bat file (bat = ctx.actions.declare_file(ctx.label.name + "_cmd.bat")) within the loop of def _magritte_resources_folder_impl(ctx). This was causing a conflict in the build process with Bazel, as it expects actions to have distinct outputs.
I've identified two solutions to resolve this problem and created two separate pull requests for them:
Instead of writing to a .bat file, you can execute the necessary commands directly using cmd.exe. This solution removes the shared .bat file, allowing actions to be executed independently without conflict.
You can modify the .bat filename to include a hash of the source path. By creating a unique filename for each action, this solution ensures that actions can be executed concurrently without any conflicting writes to the same file.
Description:
While compiling a project using the following command:
I encountered an error indicating a conflict with the file
desktop_resources_folder_cmd.bat
. The exact error message is:Environment:
Additional Information:
desktop_resources_folder_cmd.bat
multiple times, which is causing the conflict..bat
filename is unique to its context.I would appreciate any insights or potential fixes for this issue. Let me know if any additional information is required. Thanks in advance for your support.
Best regards,
The text was updated successfully, but these errors were encountered: