Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support MODULE.bazel for identifying workspace root #646

Closed
klandergren opened this issue Mar 7, 2024 · 1 comment
Closed

support MODULE.bazel for identifying workspace root #646

klandergren opened this issue Mar 7, 2024 · 1 comment

Comments

@klandergren
Copy link
Contributor

Describe the bug
ibazel does not appear to support finding the workspace root of a project with just a MODULE.bazel file (e.g. no WORKSPACE or WORKSPACE.bazel). As far as I can tell this is a valid repo structure for bazel 7.

Reproduction instructions
klandergren/ibazel-no-workspace-file shows a minimal go project that works using bazel 7 but does not work with ibazel Version 0.24.0.

Steps to reproduce the behavior:

  1. git clone https://github.com/klandergren/ibazel-no-workspace-file
  2. ibazel run //hello:hello
  3. See error
iBazel [6:27PM]: Querying for files to watch...
iBazel [6:27PM]: Error finding workspace: ibazel was not invoked from within a workspace

iBazel [6:27PM]: Error querying for source files: ibazel was not invoked from within a workspace

iBazel [6:27PM]: Error finding workspace: ibazel was not invoked from within a workspace

iBazel [6:27PM]: Error querying for source files: ibazel was not invoked from within a workspace

iBazel [6:27PM]: Running //hello:hello
Computing main repo mapping:
Loading:
Loading: 0 packages loaded
Analyzing: target //hello:hello (0 packages loaded, 0 targets configured)
INFO: Analyzed target //hello:hello (0 packages loaded, 671 targets configured).
 checking cached actions
INFO: Found 1 target...
 checking cached actions
 checking cached actions

INFO: Elapsed time: 0.373s, Critical Path: 0.00s
 checking cached actions
INFO: 0 processes.
 checking cached actions
INFO: Build completed successfully, 0 total actions
INFO: Analyzed target //hello:hello (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //hello:hello up-to-date:
  bazel-bin/hello/hello_/hello
INFO: Elapsed time: 0.532s, Critical Path: 0.29s
INFO: 6 processes: 4 internal, 2 darwin-sandbox.
INFO: Build completed successfully, 6 total actions
iBazel [6:27PM]: Starting...
iBazel [6:27PM]: Error finding workspace: ibazel was not invoked from within a workspace

Kips-MBP:ibazel-no-workspace-file klandergren$ 2024/03/06 18:27:57 hello world

Expected behavior
ibazel to find the workspace root via MODULE.bazel

Actual behavior
ibazel walks the directory tree and does not find the root

Version:

  • OS: MacOS 13.6.4
  • Browser: chrome
  • ibazel Version: iBazel - Version 0.24.0
  • Bazel version:
Bazelisk version: development
Build label: 7.0.2
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Thu Jan 25 16:22:05 2024 (1706199725)
Build timestamp: 1706199725
Build timestamp as int: 1706199725

Additional context
I am new to bazel so if I am mistaken re: WORKSPACE/WORKSPACE.bazel no longer required please close this issue.

Copy link

github-actions bot commented May 7, 2024

Stale issue message

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant