-
Notifications
You must be signed in to change notification settings - Fork 8
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
Replacement results in "Invalid cross-device link" #145
Replacement results in "Invalid cross-device link" #145
Comments
The most similar issues to this one are:
|
Sorry @issuedigger, these don't seem to be related :-) |
Hi @lukasjuhrich , thanks for your report! Apologies for @issuedigger, it's an experiment and safe to ignore. To debug this further:
Initial thoughts:
My FS setup/OS is different from yours, but I've run srgn on a vanilla Ubuntu 24 machine and it worked fine. I'll try that again if you can help me with reproduction steps! |
Oh and to try and clear up any confusion more: you titled the issue "two scopes", but your command actually uses 3:
It then also has one action:
If this is not what you intended, do you feel UX could be better? Documentation? Some fail-safe errors or warnings which could've helped you? |
Thank you very much for your insightful response! Indeed, the error is with replacing. As you conjectured, I did not intend to replace anything. reproductionWe can simplify the example by creating a
TRACE logs (not really revealling anything new)
However,
The
UXI'm not sure how to solve this, but let me present what I think the problems are. First, that I can "push forward" the search argument (in this case, Second, I think it is very dangerous to have a destructive operation so "close" to a nondestructive one. I can think of two scenarios by which one can switch from
I tend to be afraid of tools which punish me for mistakes like that, because I tend to make many. I feel this is contrary to the "fast" and "light-weight" tool that srgn aims to be (and for me already is) if I have to be careful like that all the time; this is nontrivial cognitive load. I can think of two options:
Both require changing the default to "don't replace unless told to", which might require a deprecation period. Re documentation, I think changing the semantics is more desirable than documenting the existing semantics better for the reasons I've outlined. what I actually wanted to achieveI guess this would bettor belong in a disussion instead of an issue, but since you asked, let me tell you of my use case: I wanted to find all the |
i'm having the same issue with a simple rename operation ( |
i believe the issue is due to the way the dependency Lines 541 to 543 in 9238fc1
we declare
probably because probably, we should be using the |
Thanks @lukasjuhrich and @igor47 for your detailed reports. I'll look into it more soon. The As for the UX, agree! At the very least, the two positional arguments of Re: how Re:
Yeah don't think that's possible! If at all, it'd require substantial regex use. The without part is not really supported, |
`persist` of `tempfile` does not work across device boundaries, so if the device backing the temporary directory is e.g. `tmpfs`, then `persist` fails. It actually had no useful benefit, so we can just remove it and write to the destination directly. Reproduced bug and confirmed fix on a Debian machine with: ```console $ sudo mkdir -p /path/to/temp_dir $ sudo mount -t tmpfs -o size=100m tmpfs /path/to/temp_dir $ sudo mount | rg 'temp' tmpfs on /path/to/temp_dir type tmpfs (rw,relatime,size=102400k,inode64) $ export TMPDIR=/path/to/temp_dir $ cargo run -- --python class a whatever ``` `TMPDIR` env var is respected by `tempfile`. The above `cargo run` fails without this patch. (There is an end-to-end test for file writing, but that has never failed for some reason... seems like none of my machines (including Ubuntu 24) or CI exhibited the issue). Closes #145
As soon as a temporary file is involved, the temporary file seems to cause problems:
stdout / stderr
FS setup
/tmp tmpfs tmpfs rw,nosuid,nodev,nr_inodes=1048576,inode64
/home /dev/mapper/vghdd-lvhome ext4 rw,relatime,data=ordered
How can I debug this further?
The text was updated successfully, but these errors were encountered: