I’m running a few Frappe applications from the develop
branch and I keep running into an issue often. When bench build is run, it modifies yarn.lock (and sometimes other files also), so the next time you run bench update, it fails.
Example from today as of commit 4c41ac1 in the helpdesk app.
[user@e601e9f88e7c helpdesk]$ git status
On branch develop
Your branch is up to date with 'upstream/develop'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: yarn.lock
no changes added to commit (use "git add" and/or "git commit -a")
This happens very frequently in the helpdesk and crm apps and I need to manually intervene, so I think there is a problem that needs to be solved.
It seems that when pull requests are submitted, contributors are forgetting to include yarn.lock, and then this gets accepted. I’m aware that there is a --reset
flag, but this should only be used for worst-case scenarios.
Perhaps every frappe app should have a test in CI to ensure that bench build
does not modify any files tracked by git, and if it did then the contributor should add the changed file for the test to pass. Anyone have any thoughts on this?