Skip to content

Commit

Permalink
Load syntax fix & add --incompatible_bzl_disallow_load_after_statemen…
Browse files Browse the repository at this point in the history
…t to some WOKRPSACES to fix bazel_skylib failure

```
ERROR: /home/circleci/.cache/bazel/_bazel_circleci/6228d4ffc91803da7e989bd8387a83ba/external/bazel_skylib/skylark_library.bzl:6:1: load() statements must be called before any other statement. First non-load() statement appears at /home/circleci/.cache/bazel/_bazel_circleci/6228d4ffc91803da7e989bd8387a83ba/external/bazel_skylib/skylark_library.bzl:1:1. Use --incompatible_bzl_disallow_load_after_statement=false to temporarily disable this check.
ERROR: /home/circleci/rules_nodejs/examples/web_testing/BUILD.bazel:38:1: error loading package '@io_bazel_rules_webtesting//web': Extension 'skylark_library.bzl' has errors and referenced by '//:testing_karma_chromium-local'
ERROR: Analysis of target '//:testing_karma_chromium-local' failed; build aborted: error loading package '@io_bazel_rules_webtesting//web': Extension 'skylark_library.bzl' has errors
```
  • Loading branch information
gregmagolan committed May 9, 2019
1 parent b2f37a3 commit 020fa44
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions e2e/karma/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Needed as @bazel_skylib//:skylark_library.bzl fails without this
build --incompatible_bzl_disallow_load_after_statement=false
test --incompatible_bzl_disallow_load_after_statement=false
4 changes: 4 additions & 0 deletions e2e/karma_stack_trace/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Needed as @bazel_skylib//:skylark_library.bzl fails without this
build --incompatible_bzl_disallow_load_after_statement=false
test --incompatible_bzl_disallow_load_after_statement=false
4 changes: 4 additions & 0 deletions e2e/karma_typescript/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Needed as @bazel_skylib//:skylark_library.bzl fails without this
build --incompatible_bzl_disallow_load_after_statement=false
test --incompatible_bzl_disallow_load_after_statement=false
2 changes: 1 addition & 1 deletion examples/program/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "nodejs_binary")
load("@build_bazel_rules_nodejs//:internal/common/typescript_mock_lib.bzl", "mock_typescript_lib")
load("@build_bazel_rules_nodejs//internal/common:typescript_mock_lib.bzl", "mock_typescript_lib")

# Make the jasmine library available at runtime by exposing our node_modules
# directory.
Expand Down
4 changes: 4 additions & 0 deletions examples/protocol_buffers/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Needed as @bazel_skylib//:skylark_library.bzl fails without this
build --incompatible_bzl_disallow_load_after_statement=false
test --incompatible_bzl_disallow_load_after_statement=false
4 changes: 4 additions & 0 deletions examples/web_testing/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Needed as @bazel_skylib//:skylark_library.bzl fails without this
build --incompatible_bzl_disallow_load_after_statement=false
test --incompatible_bzl_disallow_load_after_statement=false
4 changes: 4 additions & 0 deletions packages/karma/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Needed as @bazel_skylib//:skylark_library.bzl fails without this
build --incompatible_bzl_disallow_load_after_statement=false
test --incompatible_bzl_disallow_load_after_statement=false

0 comments on commit 020fa44

Please sign in to comment.