1 // Copyright 2022 Google LLC. 2 // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. 3 4 #include "experimental/bazel_test/client/gizmo.h" 5 6 #include "experimental/bazel_test/base/base.h" 7 #include "experimental/bazel_test/core/core.h" 8 9 #if defined(SOURCE_INCLUDES_TRANSITIVE_HEADER) 10 // This fails with 11 // module //experimental/bazel_test/client:client_lib does not depend 12 // on a module exporting 'experimental/bazel_test/base/base_priv.h' 13 // because the client_lib cc_library does not depend on the base_priv 14 // cc_library directly (and cannot, due to visibility restrictions) 15 #include "experimental/bazel_test/base/base_priv.h" 16 #endif 17 18 #if defined(SOURCE_INCLUDES_PRIVATE_HEADER) 19 // This fails with 20 // error: use of private header from outside its module: 21 // 'experimental/bazel_test/core/core_priv.h' [-Wprivate-header] 22 // because the generated core module has that file listed as "private" 23 // (because it came from srcs). 24 #include "experimental/bazel_test/core/core_priv.h" 25 #endif 26 getGizmo()27float getGizmo() { 28 return PublicCoreConstant * getMagicNumber() + PublicBaseConstant; 29 } 30