@@ -55,7 +55,7 @@ def _create_zipapp_main_py(ctx, py_runtime, py_executable, stage2_bootstrap, run
5555
5656 inputs = builders .DepsetBuilder ()
5757 inputs .add (py_runtime .zip_main_template )
58- _build_manifest (ctx , hash_files_manifest , runfiles , explicit_symlinks )
58+ _build_manifest (ctx , hash_files_manifest , runfiles , explicit_symlinks , inputs )
5959
6060 actions_run (
6161 ctx ,
@@ -83,7 +83,7 @@ def _map_zip_root_symlinks(entry):
8383def _map_explicit_symlinks (entry ):
8484 return "symlink|" + entry .runfiles_path + "|" + entry .link_to_path
8585
86- def _build_manifest (ctx , manifest , runfiles , explicit_symlinks , inputs = None ):
86+ def _build_manifest (ctx , manifest , runfiles , explicit_symlinks , inputs ):
8787 manifest .add_all (
8888 # NOTE: Accessing runfiles.empty_filenames materializes them. A lambda
8989 # is used to defer that.
@@ -97,12 +97,11 @@ def _build_manifest(ctx, manifest, runfiles, explicit_symlinks, inputs = None):
9797 manifest .add_all (runfiles .root_symlinks , map_each = _map_zip_root_symlinks )
9898 manifest .add_all (explicit_symlinks , map_each = _map_explicit_symlinks )
9999
100- if inputs :
101- inputs .add (runfiles .files )
102- inputs .add ([entry .target_file for entry in runfiles .symlinks .to_list ()])
103- inputs .add ([entry .target_file for entry in runfiles .root_symlinks .to_list ()])
104- for entry in explicit_symlinks .to_list ():
105- inputs .add (entry .files )
100+ inputs .add (runfiles .files )
101+ inputs .add ([entry .target_file for entry in runfiles .symlinks .to_list ()])
102+ inputs .add ([entry .target_file for entry in runfiles .root_symlinks .to_list ()])
103+ for entry in explicit_symlinks .to_list ():
104+ inputs .add (entry .files )
106105
107106 zip_repo_mapping_manifest = maybe_create_repo_mapping (
108107 ctx = ctx ,
@@ -115,8 +114,7 @@ def _build_manifest(ctx, manifest, runfiles, explicit_symlinks, inputs = None):
115114 zip_repo_mapping_manifest .path ,
116115 format = "rf-root-symlink|0|_repo_mapping|%s" ,
117116 )
118- if inputs :
119- inputs .add (zip_repo_mapping_manifest )
117+ inputs .add (zip_repo_mapping_manifest )
120118
121119def _create_zip (ctx , py_runtime , py_executable , stage2_bootstrap ):
122120 output = ctx .actions .declare_file (ctx .label .name + ".zip" )
0 commit comments