Skip to content

Commit

Permalink
fix: breakages in unused codepaths after recent refactors
Browse files Browse the repository at this point in the history
* There is no such method `common_runfiles.add_runfiles`

* The docs say that `BuiltinPyInfo` might be None, but that case is not handled here
  • Loading branch information
oprypin authored Oct 27, 2024
1 parent afecfd2 commit fb0f79f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/private/py_executable.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def _get_base_runfiles_for_binary(
common_runfiles.files.add(implicit_pyc_source_files)

for dep in (ctx.attr.deps + extra_deps):
if not (PyInfo in dep or BuiltinPyInfo in dep):
if not (PyInfo in dep or (BuiltinPyInfo != None and BuiltinPyInfo in dep)):
continue
info = dep[PyInfo] if PyInfo in dep else dep[BuiltinPyInfo]
common_runfiles.files.add(info.transitive_sources)
Expand All @@ -471,7 +471,7 @@ def _get_base_runfiles_for_binary(

common_runfiles.runfiles.append(collect_runfiles(ctx))
if extra_deps:
common_runfiles.add_runfiles(targets = extra_deps)
common_runfiles.add_targets(extra_deps)
common_runfiles.add(extra_common_runfiles)

common_runfiles = common_runfiles.build(ctx)
Expand Down

0 comments on commit fb0f79f

Please sign in to comment.