Anki/.bazelrc
Damien Elmes e948544b59 use local strategy for Svelte on CI
Allows some type errors to surface that were only being picked up
on Windows.

The root cause seems to be TypeScript picking up other .d.ts/.tsx
files in the same folder, which it can only do on Windows due to the
lack of sandboxing. On other platforms the other files can't be found,
and tsc changes the types into 'any'.

I experimented with modifying rules_svelte to build all .tsx files up
front and convert them to .d.ts in bulk, but ran into further issues
with conflicting types, as the typings in svelte2tsx seem to conflict
with Svelte's built-in types, and passing the dependencies in explicitly
causes them to be checked even though --skipLibCheck is passed in to
TypeScript.

Forcing sandboxing off is an ugly hack, and our best approach moving
forward may be to switch to ts_project for the Svelte generation -
it does appear that rules_nodejs favours it over ts_library anyway.
2020-12-29 14:50:33 +10:00

37 lines
1.3 KiB
Text

common --enable_platform_specific_config
common --experimental_repository_cache_hardlinks
# specify python path for pyo3 compile
build:windows --action_env="PYTHON_SYS_EXECUTABLE=c:\\python\\python.exe"
#build:linux --action_env="PYTHON_SYS_EXECUTABLE=/usr/local/bin/python3.8"
# runfiles are off by default on Windows, and we need them
build --enable_runfiles
# skip the slow zip step on Windows, as we have symlinks
build:windows --build_python_zip=false
# record version/build hash
build --workspace_status_command='bash ./scripts/status.sh'
# run clippy when compiling rust in test mode
test --aspects=@io_bazel_rules_rust//rust:rust.bzl%rust_clippy_aspect --output_groups=+clippy_checks
# print output when test fails
test --test_output=errors
# don't add empty __init__.py files
build --incompatible_default_to_explicit_init_py
# faster for .ui file generation, but may sacrifice correctness
#--genrule_strategy=standalone
build:ci --show_timestamps --isatty=0 --color=yes --show_progress_rate_limit=5
# the typescript generation hack in rules_svelte is not hermetic, and
# converts declared types in props to 'any' if it's not run locally.
# Fixing it properly will probably require moving the Svelete rules to
# ts_project()
build:ci --strategy Svelte=local
try-import %workspace%/user.bazelrc