Skip to content

Commit

Permalink
Revert "feat: introduce skip_lib_check attribute (#345)" (#347)
Browse files Browse the repository at this point in the history
This reverts commit 1a07af0.
  • Loading branch information
alexeagle authored Apr 1, 2023
1 parent 1a07af0 commit dab5e3f
Show file tree
Hide file tree
Showing 14 changed files with 6 additions and 82 deletions.
15 changes: 6 additions & 9 deletions docs/rules.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion e2e/test/common.bats
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ ts_project(
out_dir = "${out_dir}",
deps = [${deps_joined}],
args = [${args_joined}],
skip_lib_check = False,
$source_map
$declaration
$composite
Expand Down
11 changes: 0 additions & 11 deletions examples/skip_lib_check/off/BUILD.bazel

This file was deleted.

1 change: 0 additions & 1 deletion examples/skip_lib_check/off/source.ts

This file was deleted.

6 changes: 0 additions & 6 deletions examples/skip_lib_check/off/tsconfig.json

This file was deleted.

12 changes: 0 additions & 12 deletions examples/skip_lib_check/on/BUILD.bazel

This file was deleted.

1 change: 0 additions & 1 deletion examples/skip_lib_check/on/source.ts

This file was deleted.

6 changes: 0 additions & 6 deletions examples/skip_lib_check/on/tsconfig.json

This file was deleted.

12 changes: 0 additions & 12 deletions examples/skip_lib_check/unspecified/BUILD.bazel

This file was deleted.

1 change: 0 additions & 1 deletion examples/skip_lib_check/unspecified/source.ts

This file was deleted.

6 changes: 0 additions & 6 deletions examples/skip_lib_check/unspecified/tsconfig.json

This file was deleted.

6 changes: 0 additions & 6 deletions ts/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def ts_project(
composite = False,
incremental = False,
emit_declaration_only = False,
skip_lib_check = True,
transpiler = None,
ts_build_info_file = None,
tsc = _tsc,
Expand Down Expand Up @@ -232,10 +231,6 @@ def ts_project(
Instructs Bazel to expect a `.tsbuildinfo` output.
emit_declaration_only: Whether the `emitDeclarationOnly` bit is set in the tsconfig.
Instructs Bazel *not* to expect `.js` or `.js.map` outputs for `.ts` sources.
skip_lib_check: Whether skip type checking of declaration files.
This can save time during compilation at the expense of type-system accuracy.
For example, two libraries could define two copies of the same type in an inconsistent way.
Rather than doing a full check of all d.ts files, TypeScript will type check the code you specifically refer to in your app’s source code.
ts_build_info_file: The user-specified value of `tsBuildInfoFile` from the tsconfig.
Helps Bazel to predict the path where the .tsbuildinfo output is written.
Expand Down Expand Up @@ -419,7 +414,6 @@ def ts_project(
declaration_dir = declaration_dir,
source_map = source_map,
declaration_map = declaration_map,
skip_lib_check = int(skip_lib_check) if skip_lib_check != None else -1,
out_dir = out_dir,
root_dir = root_dir,
js_outs = tsc_js_outs,
Expand Down
4 changes: 0 additions & 4 deletions ts/private/ts_lib.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ COMPILER_OPTION_ATTRS = {
"source_map": attr.bool(
doc = "https://www.typescriptlang.org/tsconfig#sourceMap",
),
"skip_lib_check": attr.int(
doc = "https://www.typescriptlang.org/tsconfig#skipLibCheck",
values = [-1, 0, 1]
)
}

# tsc knows how to produce the following kinds of output files.
Expand Down
6 changes: 0 additions & 6 deletions ts/private/ts_project.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@ See https://github.com/aspect-build/rules_ts/issues/228 for more details.
"--declarationDir",
declaration_dir,
])

if ctx.attr.skip_lib_check != -1:
arguments.add_all([
"--skipLibCheck",
bool(ctx.attr.skip_lib_check),
])

# When users report problems, we can ask them to re-build with
# --define=VERBOSE_LOGS=1
Expand Down

0 comments on commit dab5e3f

Please sign in to comment.