Comments (7)
os version and go version? I'm also on mac.
Can u see the file changed?
Can u post a screenshot?
from realize.
os: macOS Sierra Version 10.12.5
go: go version go1.8 darwin/amd64
Here the file with changed timestamps:
$ ls -la anna.go
-rw-r--r-- 1 xx staff 1809 Jul 26 13:15 anna.go
$ ls -la anna.go
-rw-r--r-- 1 xx staff 1812 Jul 27 10:58 anna.go
$ ls -la anna.go
-rw-r--r-- 1 xx staff 1809 Jul 27 10:59 anna.go
and the console output of realize run
:
$ realize run
[10:53:15][myproject] : Watching 61 file/s 20 folder/s
[10:53:15][myproject] : Installing..
[10:53:16][myproject] : Installed after 1.493 s
[10:53:16][myproject] : Running..
[10:53:16][myproject] : Started after 0.002 s
[10:53:16][myproject] : 2017/07/27 10:53:16 Listening on port 50484
[10:58:13][myproject] : Ended
[10:58:13][myproject] : GO changed /Users/xx/go/src/myproject/anna.go
[10:58:13][myproject] : Installing..
[10:58:14][myproject] : Installed after 0.579 s
[10:58:14][myproject] : Running..
[10:58:14][myproject] : Started after 0.004 s
[10:58:14][myproject] : 2017/07/27 10:58:14 Listening on the port 50484
As you can see the change I made ist the output line "Listening on ...". When I change this line (or any other line) again and again realize does not react any more.
from realize.
Could you attach your server start function?
from realize.
you mean the main
function?
func main() {
settings.Init(conf.Settings)
router := httprouter.New()
Init1(router)
Init2(router)
srv := &http.Server{
Addr: ":" + port,
Handler: router,
}
log.Println("Listening on port", port)
log.Fatal(srv.ListenAndServe())
}
the Init
functions will add handlers to the router and start go routines for other background routines.
Here is one of them:
func Init1(router *httprouter.Router) {
b := bot.New()
b.AddHandlers(router)
ch, err := b.GetMessageChan()
if err != nil {
log.Println(err)
}
b.Run()
go func(ch chan *bot.Message) {
for msg := range ch {
c := chatflow.Get(msg.Chat.ID)
if err := c.Message(msg); err != nil {
log.Println(err)
}
}
}(ch)
}
from realize.
I tried even with the examples of httprouter but it works. I don't know, your problem could be caused by some pendant process, maybe related to the server listen
from realize.
Have the same problem.
It only detects change once per file.
If I swtich file and change then it works, but sequential changed to same file are not detected. :(
from realize.
@manico check #154 probably is related, we are working on it
from realize.
Related Issues (20)
- Realize is not killing the current app HOT 5
- github.com/labstack/echo Error
- Ability to run a bash command on Reload HOT 2
- Using realize with dockerised go+nginx app HOT 1
- invalid memory address or nil pointer dereference HOT 1
- build github.com/oxequa/realize: cannot load gopkg.in/urfave/cli.v2 HOT 23
- non-standard import when running realize HOT 2
- [QUESTION]How to setup multiple projects HOT 1
- PATH environment variable got reset if setting env HOT 1
- project dead? HOT 3
- Panic in run phase HOT 1
- Can't get the realize package HOT 4
- Adapt go modules for fixing dependencies HOT 2
- go: github.com/oxequa/realize imports gopkg.in/urfave/cli.v2: gopkg.in/urfave/[email protected]: parsing go.mod: module declares its path as: github.com/urfave/cli/v2 but was required as: gopkg.in/urfave/cli.v2 HOT 4
- it no works! HOT 2
- realize. file upload. No obvious error prompt HOT 1
- Issue with Quickstart HOT 1
- v3 branch: runtime error
- github.com/oxequa/realize imports => gopkg.in/urfave/cli.v2: cannot find module providing package gopkg.in/urfave/cli.v2 HOT 4
- module declares its path as: github.com/urfave/cli/v2 but was required as: gopkg.in/urfave/cli.v2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from realize.