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

watch is confusing #129

Open
jellevandenhooff opened this issue Apr 18, 2024 · 2 comments · May be fixed by #134
Open

watch is confusing #129

jellevandenhooff opened this issue Apr 18, 2024 · 2 comments · May be fixed by #134
Assignees

Comments

@jellevandenhooff
Copy link

jellevandenhooff commented Apr 18, 2024

Hi! Thank you for your delightful software.

I tried the following tasks.toml.

# tasks.toml

[[task]]
id = "go-test"
type = "short"
watch = ["**/*.go"]
cmd = """
    go test ./...
  """

I ran run -ui=tui go-test. This ran my tests.

Then I went and changed a go file and expected the tests would run again. The tests did not run again, even though @watch claiming to be watching **/*.go.

Eventually I figured out that running a long dev task depending on go-test fixed the re-runner. Is this behavior intended?

@amonks
Copy link
Owner

amonks commented Apr 18, 2024

@jellevandenhooff! thanks for trying run.

Great catch! This is only semi-intended behavior: it works as designed, but it's a bad design. What's happening is that even though the ui is "tui", the run as-a-whole is getting marked as "short", and the execution stuff exits when the last task completes.

I'm working on a refactor that makes the long-vs-short behavior a lot more explicit; I'll include this as a test case. In the meantime, your workaround seems like a good option.

@amonks
Copy link
Owner

amonks commented Apr 19, 2024

this test is now passing in my dev branch, so this enhancement will definitely happen some time.

amonks added a commit that referenced this issue Apr 19, 2024
closes #96
closes #72
closes #129

todo:
close #126
close #57
close #139
amonks added a commit that referenced this issue Apr 22, 2024
closes #96
closes #72
closes #129

todo:
close #126
close #57
close #139
@amonks amonks self-assigned this Apr 23, 2024
amonks added a commit that referenced this issue Apr 23, 2024
closes #96
closes #72
closes #129

todo:
close #57
close #139
amonks added a commit that referenced this issue Apr 25, 2024
closes #96
closes #72
closes #129

todo:
close #57
close #139
@amonks amonks linked a pull request Apr 25, 2024 that will close this issue
amonks added a commit that referenced this issue Jul 29, 2024
closes #96
closes #72
closes #129

todo:
close #57
close #139
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

Successfully merging a pull request may close this issue.

2 participants