-
-
Notifications
You must be signed in to change notification settings - Fork 786
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
xmake watch命令无法递归检测子目录中文件变动 #5645
Comments
Title: xmake watch command cannot recursively detect file changes in subdirectories Xmake version2.9.5 Operating system version and architectureUbuntu24.01 Describe the problemUnable to recursively detect file changes in all subdirectories speak@speak-pc:~/test$ vim watch_test/dir1/dir2/t.text
speak@speak-pc:~/test$ mv watch_test/dir1/dir2/t.text watch_test/dir1/dir2/t.txt
speak@speak-pc:~/test$ code watch_test/dir1/dir2/t.txt
speak@speak-pc:~/test$ xmake watch -d "watch_test"
watching watch_test/** ..
^C
speak@speak-pc:~/test$ tree watch_test/
watch_test/
└── dir1
└── dir2
└── t.txt
3 directories, 1 file Expected resultsRecursively monitor file changes in all subdirectories Project configurationReproduction example speak@speak-pc:~/test$ tree watch_test/
watch_test/
└── dir1
└── dir2
└── t.txt
3 directories, 1 file Additional information and error logsspeak@speak-pc:~/test$ xmake watch -d "watch_test" |
看了一下可能和依赖库tbox中的
可能的解决方法
不知道有没有支持递归多层子目录的想法, 如果比较忙这个工作我可以做 xmake-fwatcher
xmake/xmake/core/base/fwatcher.lua Line 59 in a44ccf7
xmake/core/src/xmake/fwatcher/add.c Lines 54 to 60 in a44ccf7
tbox-fwatcher tb_void_t tb_directory_walk(tb_char_t const* path, tb_long_t recursion, tb_bool_t prefix, tb_directory_walk_func_t func, tb_cpointer_t priv) |
设置默认值的方式 |
How to set default values |
更新了,再试试 |
Updated, try again |
Xmake 版本
2.9.5
操作系统版本和架构
Ubuntu24.01
描述问题
无法递归检测所有子目录中文件变动
期待的结果
递归监听所有子目录中文件变动
工程配置
复现示例
speak@speak-pc:~/test$ tree watch_test/ watch_test/ └── dir1 └── dir2 └── t.txt 3 directories, 1 file
附加信息和错误日志
speak@speak-pc:~/test$ xmake watch -d "watch_test"
watching watch_test/** ..
watch_test/dir1/t.text modified
watch_test/dir1/t.text modified
watch_test/dir1/t.text modified
watch_test/dir1/t.text modified
The text was updated successfully, but these errors were encountered: