fix(bazel): ensure FTXUI is publicly accessible and add external smoke test (#1157)

- Set `visibility = ["//visibility:public"]` on the top-level `:ftxui` alias
  so the library can be consumed from external Bazel workspaces.
- Add `bazel_integration/` minimal external workspace to validate
  external usage via Bzlmod.
- Introduce `smoke` target that depends on `@ftxui//:ftxui`.
- Add CI job to build the smoke target using:
    --enable_bzlmod
    --override_module=ftxui=..
  This prevents regressions in visibility or public API changes.

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
Daisuke Kato
2025-12-14 03:49:42 +09:00
committed by GitHub
parent c8fbef03c9
commit 117417e841
13 changed files with 117 additions and 4 deletions

16
bazel/test/smoke.cpp Normal file
View File

@@ -0,0 +1,16 @@
// Copyright 2025 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.
#include <ftxui/dom/elements.hpp>
#include <ftxui/screen/screen.hpp>
#include <ftxui/component/component.hpp>
#include <ftxui/component/screen_interactive.hpp>
int main() {
using namespace ftxui;
auto screen = ScreenInteractive::TerminalOutput();
auto component = Button("Quit", screen.ExitLoopClosure());
screen.Loop(component);
return 0;
}