Skip to content

Commit

Permalink
Delete maprule. Fix Buildifier lint errors. (bazelbuild#192)
Browse files Browse the repository at this point in the history
* Delete maprule. Fix Buildifier lint errors.

Delete maprule and its tests: I wrote this rule,
and I no longer plan to release it. Alternative
rules exist that serve users' needs better.

Fix also Buildifier lint errors that were making
BuildKite red: https://buildkite.com/bazel/bazel-skylib/builds/659#ab98ac31-6e1c-415e-b8a8-5f8868340c7d
  • Loading branch information
laszlocsomor committed Sep 17, 2019
1 parent 90ea6fe commit 58068fe
Show file tree
Hide file tree
Showing 18 changed files with 22 additions and 1,287 deletions.
11 changes: 11 additions & 0 deletions WORKSPACE
Expand Up @@ -28,3 +28,14 @@ bazel_skylib_internal_deps()
load("//:internal_setup.bzl", "bazel_skylib_internal_setup")

bazel_skylib_internal_setup()

http_archive(
name = "rules_cc",
sha256 = "b4b2a2078bdb7b8328d843e8de07d7c13c80e6c89e86a09d6c4b424cfd1aaa19",
strip_prefix = "rules_cc-cb2dfba6746bfa3c3705185981f3109f0ae1b893",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/cb2dfba6746bfa3c3705185981f3109f0ae1b893.zip",
"https://github.com/bazelbuild/rules_cc/archive/cb2dfba6746bfa3c3705185981f3109f0ae1b893.zip",
],
)

2 changes: 1 addition & 1 deletion docs/BUILD
Expand Up @@ -133,6 +133,6 @@ stardoc(
name = "common_settings_docs",
out = "common_settings_doc_gen.md",
input = "//rules:common_settings.bzl",
deps = ["//rules:common_settings"],
semantic_flags = ["--experimental_build_setting_api=True"],
deps = ["//rules:common_settings"],
)
11 changes: 6 additions & 5 deletions rules/diff_test.bzl
Expand Up @@ -29,26 +29,27 @@ def _diff_test_impl(ctx):
test_bin = ctx.actions.declare_file(ctx.label.name + "-test.bat")
ctx.actions.write(
output = test_bin,
content = r"""@echo off
content = """@rem Generated by diff_test.bzl, do not edit.
@echo off
SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION
set MF=%RUNFILES_MANIFEST_FILE:/=\%
set PATH=%SYSTEMROOT%\system32
set MF=%RUNFILES_MANIFEST_FILE:/=\\%
set PATH=%SYSTEMROOT%\\system32
set F1={file1}
set F2={file2}
if "!F1:~0,9!" equ "external/" (set F1=!F1:~9!) else (set F1=!TEST_WORKSPACE!/!F1!)
if "!F2:~0,9!" equ "external/" (set F2=!F2:~9!) else (set F2=!TEST_WORKSPACE!/!F2!)
for /F "tokens=2* usebackq" %%i in (`findstr.exe /l /c:"!F1! " "%MF%"`) do (
set RF1=%%i
set RF1=!RF1:/=\!
set RF1=!RF1:/=\\!
)
if "!RF1!" equ "" (
echo>&2 ERROR: !F1! not found
exit /b 1
)
for /F "tokens=2* usebackq" %%i in (`findstr.exe /l /c:"!F2! " "%MF%"`) do (
set RF2=%%i
set RF2=!RF2:/=\!
set RF2=!RF2:/=\\!
)
if "!RF2!" equ "" (
echo>&2 ERROR: !F2! not found
Expand Down
17 changes: 0 additions & 17 deletions rules/private/BUILD
Expand Up @@ -14,23 +14,6 @@ bzl_library(
visibility = ["//rules:__pkg__"],
)

bzl_library(
name = "maprule",
srcs = ["maprule.bzl"],
visibility = ["//tests:__pkg__"],
deps = [":maprule_private"],
)

bzl_library(
name = "maprule_private",
srcs = ["maprule_private.bzl"],
deps = [
":maprule_util",
"//lib:dicts",
"//lib:paths",
],
)

bzl_library(
name = "maprule_util",
srcs = ["maprule_util.bzl"],
Expand Down
28 changes: 0 additions & 28 deletions rules/private/maprule.bzl

This file was deleted.

0 comments on commit 58068fe

Please sign in to comment.