Skip to content

fix(watcher): fix some v3.43.x regressions #2271

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andreynering
Copy link
Member

@andreynering andreynering force-pushed the watcher/fix-some-regressions-2202-2199 branch from a8faba1 to de7ecf1 Compare May 27, 2025 00:25
@SheGe
Copy link

SheGe commented May 27, 2025

Test results: #2199 (comment)

@noahfraiture
Copy link

The problem persist. I use task to run my webserver

  build:
    desc: Build the Go binary
    cmd: go build -o ./tmp/main ./cmd/nexzap/main.go
    deps:
      - templ
      - sqlc
      - tailwind
    sources:
      - ./go.mod
      - ./go.sum
      - ./cmd/**/*.go
      - ./internal/**/*.go
      - ./templates/**/*_templ.go
      - ./static/css/style.css
      - ./internal/db/migrations/*.sql
      - ./tutorials/**/*
    generates:
      - ./tmp/main

  run:
    desc: Run the built binary
    deps:
      - build
    cmd: ./tmp/main
    ```
    
that immediatly stop with the watch flag. Without it, it works fine

@andreynering
Copy link
Member Author

Hey @noahfraiture,

I could not reproduce.

  • Which operating system are you using?
  • Can you double-check that you're running a task binary built from this branch?
  • Or maybe could you create a minimal reproducible example?

@noahfraiture
Copy link

Hey @noahfraiture,

I could not reproduce.

* Which operating system are you using?

* Can you double-check that you're running a `task` binary built from this branch?

* Or maybe could you create a minimal reproducible example?

Sure, I have the same issue with this code

package main

import (
	"fmt"
	"log"
	"net/http"
)

func main() {
	mux := http.NewServeMux()
	mux.HandleFunc("GET /", func(w http.ResponseWriter, r *http.Request) {
		fmt.Fprint(w, "Pong")
	})
	addr := ":8080"
	log.Printf("Server starting on http://localhost%s", addr)
	http.ListenAndServe(addr, mux)
}

And this task

  run:
    cmd: go run .

I'm on Linux NixOs. I built the task binary from the branch watcher/fix-some-regressions-2202-2199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: watcher Changes related to the Taskfile watcher.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Watch sends interrupt signal right away in v3.43.x Running task with dependencies in watch mode stopped watching for sources of dependencies
3 participants