Skip to content

Commit

Permalink
Fix broken type in toolchain.bzl
Browse files Browse the repository at this point in the history
Summary:
See title. In D60309384, RE was enabled for diff-time tests. However that ended up adding a dependency on the toolchain.bzl file, which had types updated in D54263379.

This one line was causing an error in Autodeps due to the fact that Python cannot handle the `|` operator for some union types.

This is a temporary fix while we figure out a more permanent solution.

Got multiple reports on this in the workplace group:

- https://fb.workplace.com/groups/autodeps.users/posts/2698732626961886/?comment_id=2698765646958584

- https://fb.workplace.com/groups/autodeps.users/permalink/2698809960287486/

Reviewed By: stanleyz510

Differential Revision: D60417799

fbshipit-source-id: e50c62b227d288fccd6b0e3d684476357c5af962
  • Loading branch information
mattpaynemeta authored and facebook-github-bot committed Jul 31, 2024
1 parent d145e0c commit 386bfe5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions prelude/go/toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
# of this source tree.

load("@prelude//cxx:cxx_toolchain_types.bzl", "CxxToolchainInfo")

GoToolchainInfo = provider(
# @unsorted-dict-items
fields = {
Expand All @@ -21,7 +19,8 @@ GoToolchainInfo = provider(
"compiler_flags": provider_field(typing.Any, default = None),
"concat_files": provider_field(RunInfo),
"cover": provider_field(RunInfo),
"cxx_toolchain_for_linking": provider_field(CxxToolchainInfo | None, default = None),
# Type should be (CxxToolchainInfo | None), but setting to typing.Any for now to mitigate another issue.
"cxx_toolchain_for_linking": provider_field(typing.Any, default = None), # CxxToolchainInfo | None
"env_go_arch": provider_field(str),
"env_go_os": provider_field(str),
"env_go_arm": provider_field(str | None, default = None),
Expand Down

0 comments on commit 386bfe5

Please sign in to comment.