-
Notifications
You must be signed in to change notification settings - Fork 256
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
Do a better job recognizing when magefile.go changes #114
Comments
So, mage does record a hash of all magefiles as a part of determining whether it needs to rebuild the binary. Where this can fall down is if you make changes to an external package with no changes to the magefiles in the current directory. I'll have to look into the new code in 1.10 for recognizing when build parameters change to see if I can leverage that to determine when a rebuild is needed. |
Let me know if you can reproduce this behavior, since it is important to me that the magefile changing definitely should cause a rebuild of the mage cached binary. |
It definitely would be nice to be able to detect changes to the imported dependency tree of In an effort to avoid code duplication between multiple |
Yes, that's a very good point. I wonder if the updates in 1.10 to detecting changes in code could be used by mage instead of my custom code. I'll have to take a look. Another option might be to add an environment variable to tell Mage to always rebuild. |
I have a PR up that will address this if you're compiling with 1.10 or higher. It needs a few tests, but otherwise should be good to go. |
Fixed in #168 |
mage often continues executing old build scripts after
magefile.go
has changed. Please do a better job identifying when this occurs, such as recording the modification time and/or hash of magefiles.As a workaround, I am manually running
mage -clean
to force mage to recompile my magefiles.The text was updated successfully, but these errors were encountered: