Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bazel CI: rules_haskell is broken with Bazel@HEAD #10953

Closed
meteorcloudy opened this issue Mar 12, 2020 · 4 comments
Closed

Bazel CI: rules_haskell is broken with Bazel@HEAD #10953

meteorcloudy opened this issue Mar 12, 2020 · 4 comments
Assignees
Labels
breakage P1 I'll work on this now. (Assignee required) type: bug

Comments

@meteorcloudy
Copy link
Member

https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1421#0d30573e-d485-477b-8c25-9fc9d8a0f663

/tmp/tmpixj2i9vn/bazel --nomaster_bazelrc --bazelrc=/dev/null info
ERROR: <builtin>: Rule class sh_posix_toolchain declared too many attributes (180 > 150)
ERROR: error loading package '': in /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/554c449d1d415008aa2ab797cbd0edbd/external/rules_haskell/haskell/ghc_bindist.bzl: Extension file 'sh/posix.bzl' has errors

Culprit: b839a51
Bazel Auto Sheriff: https://buildkite.com/bazel/bazel-auto-sheriff-face-with-cowboy-hat/builds/86

/cc @michajlo

@meteorcloudy meteorcloudy added type: bug P1 I'll work on this now. (Assignee required) breakage labels Mar 12, 2020
@meteorcloudy
Copy link
Member Author

@michajlo Can you help fixing this today? Otherwise, I'll have to rollback the culprit.

@michajlo
Copy link
Contributor

Does that rule really need 180 attributes? We can raise the limit, but it can't go any higher than 254 due to https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/packages/AttributeContainer.java#L48. The current default was chosen to give a good amount of warning before getting close to that hard limit in order to give users time to fix things.

@meteorcloudy
Copy link
Member Author

meteorcloudy commented Mar 12, 2020

Does that rule really need 180 attributes?

/cc @aherrmann @mboes Can you help answering this question?

@michajlo
Copy link
Contributor

Filed tweag/rules_sh#13 for follow-up.

luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this issue Sep 4, 2022
    sh_posix_toolchain [1] has 180, mostly because it has an attribute per unix
    command. Lifting to 200 to unbreak them and give them some headroom, and will
    open a github issue to make sure they know this won't scale infinitely.
    Still staying below the 254 hard limit to give us headroom to attach misc
    magic attributes after the check, as well as leaving us with a low-effort way
    to help users that might find themselves in danger without being able to
    immediately fix things.

    Fixes bazelbuild/bazel#10953

    [1] https://github.com/tweag/rules_sh/blob/master/sh/posix.bzl

    RELNOTES: Increase max targets per rule class limit to 200
    PiperOrigin-RevId: 300633160
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breakage P1 I'll work on this now. (Assignee required) type: bug
Projects
None yet
Development

No branches or pull requests

2 participants