cargo-watch icon indicating copy to clipboard operation
cargo-watch copied to clipboard

>=8.2.0 loops while discovering .gitignore on a large hierarchy

Open wdanilo opened this issue 2 years ago • 10 comments

Hi, we are using cargo-watch in our project: https://github.com/enso-org/enso/pulls . After I bumped my installation from 8.1.1 (which had issues - infinite looping, because it was not ignoring all things in .gitignore) to 8.3.0, no changes in source files (not ignored) are matched and cargo-watch basically does not work anymore for us.

wdanilo avatar Jan 20 '23 19:01 wdanilo

Debug logs. How you installed it. Give me something here.

passcod avatar Jan 21 '23 01:01 passcod

Hi, sorry for not providing you with the logs. I was thinking that the repo URL would be enough, as running cargo-watch (in the version 8.3.0) there does not work. Anyway, here are logs with --debug --why. It looks like running cargo-watch -s "echo 'yo'" --why --debug loops indefinitely. I see the same logs over and over again. After some time I killed it, so the logs finish at the kill time:

cargo-watch-output.txt

wdanilo avatar Jan 22 '23 19:01 wdanilo

Hmm, okay, so there is an issue here. Not entirely sure why it loops infinitely on your machine yet, and this is why logs are useful: on my machine, with your repo, it spends a few seconds loading gitignores (which is an side issue introduced by 8.2, I'll fix that), and then it works properly.

passcod avatar Jan 22 '23 23:01 passcod

@passcod thanks so much for the reply. How can I help with debugging it?

wdanilo avatar Jan 23 '23 00:01 wdanilo

I'm assuming you downgraded to 8.1.1 because 8.2 didn't work? If that's not the case, could you confirm which version range exactly doesn't work

passcod avatar Jan 23 '23 04:01 passcod

Hi @passcod, I am sorry, I was sure I replied here but apparently I did not. You are correct, 8.2 has this issue. Anyway, right now none of 8.11, 8.2, nor 8.3 work on new MacOS. I believe this makes this issue a significant one. Do you agree with this thesis? If so, do you think you'd be able to take a look at it sooner than later? :)

wdanilo avatar Feb 19 '23 02:02 wdanilo

It's, honestly, pretty far down my stack.

passcod avatar Feb 19 '23 03:02 passcod

Hmm, do you mean that supporting MacOS is not important for cargo-watch? I'm asking just to be sure I understood it correctly, as it is a surprising statement taking into consideration that cargo-watch is advertised to be "the tool" to watch for Rust source code changes.

wdanilo avatar Feb 19 '23 03:02 wdanilo

I mean that:

  • this is a small open source project, not a commercial product
  • i'm a single unpaid maintainer with other projects and many priorities
  • noone else has come up having this issue on mac
  • i've tested on older mac, as that's the hardware i have, and it's fine there
  • hence this particular issue seems like it only affects you, so yes, at the moment, it sure isn't high priority
  • this prioritisation for this one ticket does not in any way make a wider statement on support intent for a platform

again, this is an open source project. you want something right now? do the work. submit a PR. hire and pay someone else to do it, if you can't.

you may also refer to the license, which states that i provide this work

as-is and make no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable

passcod avatar Feb 19 '23 19:02 passcod

@passcod I totally understand it. Unfortunately, I don't have enough of time to contribute here, as it requires pretty in-depth debugging. While I find cargo-watch to be the right solution in long-term, as it's written purely in Rust, until it works properly on modern MacOS and covers all .gitignore syntax, we made another project that is a in-place replacement for cargo-watch - we made it just in 1 evening, as it uses well-tested JS libs under the hood – for anyone facing this issue, you can find it here: https://github.com/enso-org/cargo-watch-plus (it works well on all Mac, Linux, and Windows, and supports all .gitignore syntax).

wdanilo avatar Feb 21 '23 14:02 wdanilo