You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using modd in a golang app which uses an embedded VueJS app. The VueJS app is embedded into golang using fileb0x. We're running into a race condition with modd on initial run because webpack takes too long to generate the files required for fileb0x to package up. This causes our prep which calls go generate to fail and ultimately our daemon never starts.
Our modd.conf is:
{
prep: yarn install
daemon: yarn watch
}
**/*.go {
prep: go generate
daemon: DEBUG=1 go run -tags="json1" main.go
}
yarn watch generates the files needed by fileb0x to package up in go generate
We've got developers on Windows and Linux, so my original workaround idea of adding a test for the generated files in a prep won't work. I could probably write a simple golang app to call in the prep which waits for the files to be generated and then exits... but that seems overkill.
Is there an existing config option to check/wait for the presence of a file/directory as a pre-condition or running the prep/daemon? Alternatively, is there a way to tell modd to keep retrying? Eventually the files get created and the go generate will succeed if it ever gets called again.
The text was updated successfully, but these errors were encountered:
We're using modd in a golang app which uses an embedded VueJS app. The VueJS app is embedded into golang using fileb0x. We're running into a race condition with modd on initial run because webpack takes too long to generate the files required for fileb0x to package up. This causes our prep which calls
go generate
to fail and ultimately our daemon never starts.Our modd.conf is:
yarn watch
generates the files needed by fileb0x to package up ingo generate
We've got developers on Windows and Linux, so my original workaround idea of adding a test for the generated files in a prep won't work. I could probably write a simple golang app to call in the prep which waits for the files to be generated and then exits... but that seems overkill.
Is there an existing config option to check/wait for the presence of a file/directory as a pre-condition or running the prep/daemon? Alternatively, is there a way to tell modd to keep retrying? Eventually the files get created and the
go generate
will succeed if it ever gets called again.The text was updated successfully, but these errors were encountered: