Limit playground builds to requested platform dependencies#10
Conversation
24e35cb to
073727a
Compare
|
Valdi_Widgets is where this surfaced, but the interesting part is that Valdi already seems to provide the intended pattern for handling this. In Valdi’s own WORKSPACE, the repo does not call load("@valdi//bzl:workspace_init.bzl", "valdi_initialize_workspace")
valdi_initialize_workspace()whereas Valdi’s own repo uses the more explicit pattern: load("//bzl:workspace_init.bzl", "platform_dependency_rule", "valdi_initialize_workspace")
platform_dependency_rule(name = "platform_check")
load("@platform_check//:target_platform.bzl", "VALDI_PLATFORM_DEPENDENCIES")
valdi_initialize_workspace(VALDI_PLATFORM_DEPENDENCIES)So my read is not necessarily that Valdi needs new semantics here, but that downstream repos like |
Summary
Problem this solves: don't build use platform level stuff that I'm not trying to build (Android NDK when building Mac OS app, example)
platform_dependency_ruleandVALDI_PLATFORM_DEPENDENCIESintoWORKSPACE.--config=ios|android|macos|web) and switch playground scripts to those configs.Changes
WORKSPACEplatform_dependency_ruleandVALDI_PLATFORM_DEPENDENCIES.valdi_initialize_workspace(VALDI_PLATFORM_DEPENDENCIES)..bazelrcbuild:ios,build:android,build:macos,build:webrepo env mappings.scripts/bazel_ios_install.shscripts/bazel_android_install.shscripts/bazel_macos_run.shscripts/bazel_web_serve.shVerification
bazel build --config=macos --nobuild //valdi_modules/playground:app_macosbazel build --config=web //valdi_modules/playground:playground_export_npm