Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Fix for Bazel incompatible changes #378

Closed
wants to merge 1 commit into from

Conversation

laurentlb
Copy link
Contributor

  • Update to the new args API
  • Update the dependencies
  • Avoid implicit depset flattening
  • Avoid depset concatenation

Fixes #342

Tested:
bazel-0.21 test //... --all_incompatible_changes --incompatible_disable_deprecated_attr_params=false

There's one remaining issue, but it's in the protobuf dependency.

@laurentlb
Copy link
Contributor Author

CI error is error An unexpected error occurred: "ENOMEM: not enough memory. Can we rerun the test? (I suspect it's unrelated)

@filipesilva filipesilva mentioned this pull request Jan 11, 2019
12 tasks
@filipesilva
Copy link
Contributor

I think the circleci job is being killed because of a a high memory ceiling. Looking at it in #380.

@filipesilva
Copy link
Contributor

Heya, can you rebase on master? The memory problem has a fix there now.

- Update to the new args API
- Update the dependencies
- Avoid implicit depset flattening
- Avoid depset concatenation

Fixes bazelbuild#342

Tested:
  `bazel-0.21 test //... --all_incompatible_changes --incompatible_disable_deprecated_attr_params=false`
@laurentlb
Copy link
Contributor Author

Tests are now passing, thanks.

kyliau pushed a commit that referenced this pull request Jan 12, 2019
Both #327 and #378 have circleci `test` jobs being killed:
```
Server terminated abruptly (error code: 14, error message: '', log file: '/home/circleci/.cache/bazel/_bazel_circleci/cced162ff126e466524550c57f0d7df5/server/jvm.out')
```

According to the note in https://github.com/bazelbuild/rules_typescript/blob/4a087c084cab78e610f91764db52e705aefa1814/.circleci/bazel.rc#L32-L38 this means the memory limit should be reduced.

Closes #380

PiperOrigin-RevId: 228881108
@@ -103,7 +103,7 @@ def _compile_action(ctx, inputs, outputs, tsconfig_file, node_opts, description
# These deps are identified by the NodeModuleInfo provider.
for d in ctx.attr.deps:
if NodeModuleInfo in d:
action_inputs.extend(_filter_ts_inputs(d.files))
action_inputs.extend(_filter_ts_inputs(d.files.to_list()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to_list() has some performance issues and should be avoided (see ref).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is subject to the performance problem either way. The question is whether to_list is done implicitly by passing the depset to an API that expects a list, or done explicitly. I think the bazel team is moving us to the latter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was just to make the behavior more obvious. Bazel implicitly flattens depsets in some places (which is a performance problem). We want to forbid that. The simplest way forward is to make all flattening explicit in existing files.

@alexeagle alexeagle closed this in 7a2ebc2 Feb 1, 2019
alexeagle pushed a commit to alexeagle/rules_nodejs that referenced this pull request Oct 17, 2020
Both bazelbuild/rules_typescript#327 and bazelbuild/rules_typescript#378 have circleci `test` jobs being killed:
```
Server terminated abruptly (error code: 14, error message: '', log file: '/home/circleci/.cache/bazel/_bazel_circleci/cced162ff126e466524550c57f0d7df5/server/jvm.out')
```

According to the note in https://github.com/bazelbuild/rules_typescript/blob/3671b8d5b6f5731e191098b6d5243c44f474c0da/.circleci/bazel.rc#L32-L38 this means the memory limit should be reduced.

Closes bazel-contrib#380

PiperOrigin-RevId: 228881108
alexeagle pushed a commit to alexeagle/rules_nodejs that referenced this pull request Oct 18, 2020
Both bazelbuild/rules_typescript#327 and bazelbuild/rules_typescript#378 have circleci `test` jobs being killed:
```
Server terminated abruptly (error code: 14, error message: '', log file: '/home/circleci/.cache/bazel/_bazel_circleci/cced162ff126e466524550c57f0d7df5/server/jvm.out')
```

According to the note in https://github.com/bazelbuild/rules_typescript/blob/845b16ca5f8202df3c3f845df2e9629e85217397/.circleci/bazel.rc#L32-L38 this means the memory limit should be reduced.

Closes bazel-contrib#380

PiperOrigin-RevId: 228881108
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants