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

ibazel does not support a workspace whose path may contain symlinks #649

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

Comments

@klandergren
Copy link
Contributor

Describe the bug
I noticed that ibazel seemed to either not rebuild or inconsistently rebuild some of my projects. Digging into it turned up that ibazel does not resolve symlinks before passing the directory paths to fsevents.

This results in a scenario where either:

  1. fsevents is watching a symlink, which it states in its README: "FSEvents returns events for the named path only, so unless you want to follow updates to a symlink itself (unlikely), you should use filepath.EvalSymlinks to get the target path to watch."
  2. the events reported by fsevents contain paths that do not match the non-resolved paths ibazel is monitoring

Reproduction instructions

Steps to reproduce the behavior:

  1. git clone https://github.com/klandergren/ibazel-symlinked-workspace
  2. cd holder/my-project
  3. ibazel run //:simple
  4. Edit working-directory/simple.sh to have a different message
  5. See ibazel not rebuilding

Expected behavior
ibazel detects the source file change in simple.sh and triggers a rebuild / re-run.

Actual behavior
ibazel does not detect the source file change and does not rebuild / re-run.

Version (please complete the following information):

  • OS: 13.6.5 (22G621)
  • ibazel Version: iBazel - Version 0.24.0
  • Bazel version:
Bazelisk version: development
Build label: 7.1.0
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Mon Mar 11 18:00:10 2024 (1710180010)
Build timestamp: 1710180010
Build timestamp as int: 1710180010

Additional context
This does not touch on the issue of whether or not bazel should be resolving symlinks within a workspace, just on situations where the workspace may be visited through a symlink.

@achew22
Copy link
Member

achew22 commented Mar 19, 2024

This is fixed thanks to your pr and should be released in the next few minutes in all the normal places.

Thanks!

@achew22 achew22 closed this as completed Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants