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

Fix project setup by replacing the live-code reloading lib #9

Merged

Conversation

gerson-scanapieco
Copy link

Context and motivation

After the project was updated to use Go modules and Go 1.13, an error started to show up during the installation of the dependency gin during the execution of the make setup task. This error was preventing the task from being executed, thus preventing us from building the project.

What was done

This PR replaces the gin lib by Reflex, which handles the live-code reloading feature a little different. It works by reading the info present in the reflex.conf file about what command should be run whenever a file is created or changed in the project's tree. In this case, reflex was configured to run the command make build && ./Will.IAM start-api - which rebuilds and re-stars the app server - whenever a .go file is changed or created inside the project's tree.

Extra

You will notice that the files go.mod and go.sum changed. This was due to the execution of the command go mod tidy to prune unused dependencies and add reflex as an indirect dependency. This should not impact the system's functionality.

Read more about the command here.

Gerson Silva added 4 commits September 12, 2019 10:23
The dependencies were pruned by running the command `go mod tidy`
Also adds the file reflex.conf with the configuration about how the reflex
command should be ran. More information here: https://github.com/cespare/reflex
This will prevent the error 'Error while watching new path docker_data/postgres/base/1/: too many open files'
from happening.
Copy link

@cscatolini cscatolini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @gerson-scanapieco! Thanks for fixing this issue

@cscatolini cscatolini merged commit 505e39c into topfreegames:master Sep 12, 2019
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 this pull request may close these issues.

2 participants