-
Notifications
You must be signed in to change notification settings - Fork 54
Allow 'make' to work first time #229
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
Conversation
Hi, I'd need to understand these advanced Makefile features and I'm not sure if I want to 😊
Putting things after the rule lists their dependencies. A dependency can either be another target, or a file. You're already using this for the 'check' line:
Line 2 in aeaa022
The changes here add two new targets, and list them as dependencies where relevant.
vendor- when changes detected in 'composer.json' or 'composer.lock' files, then the commands within that target are run:composer installcomposer.lock- because this file doesn't exist in the repository (see.gitignore),makewill fail thevendortarget without being told how to make this file be created.
Running the cs target before running cs-install results in an error (because the files don't exist). The same is the case for lint or tests where the commands in vendor/bin/ do not yet exist.
Thank you, but:
- What the
composer.jsontarget does?vendor: composer.json composer.lock - I don't want to run
cs-installevery time when I runmake cs - Is it a coincidence or on purpose that
vendortarget has the name of thevendordirectory? - I think that generally
makecan work on Windows, but I'm pretty sure this syntax breaks that:test -f composer.lock - I'd want for
maketo work the same across all repositories in https://github.com/phpstan and I'm not sure if you're going to update all of them. These updates are also not the priority for me right now so I don't know if I'm going to review them and merge them in timely manner. - The flow of
vendorisn't ideal in some scenarios - for example for the first run it's going to runcomposer updateandcomposer installright afterwards.
Because of these many issues and questions and also because I'm not a fan of complexity in the Makefile, I decided not to merge this PR. I work on these projects daily and in my opinion the current experience is okay.
Thanks for taking the time to consider this and for explaining your perspective. I can address all of these issues/questions, but don't want to burden you any further.
I am looking into a suspected bug, so I cloned this repository to review the code. I wanted to check that the tests worked locally on the main branch before trying to make any changes. However, when I ran
make, I got errors. The changes in this pull request allowmaketo work first time.