Standard Makefile targets and minimize duplication across apps
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 16
- Forks
- 16
- Avg merge
- 11h 11m
- Merged PRs (30d)
- 1
Description
Overview
The Makefiles in core and apps have a range of different targets for build, dist, dev, clean and so on.
For example, we currently have Makefile targets like:
make clean
make clean-build
make clean-dist
make clean-deps
make clean-composer-deps
make clean-nodejs-deps
make clean-js-deps
make clean-test
make clean-test-acceptance
make clean-test-results
make clean-docs
(examples above were found by looking in the core and password_policy Makefiles - there will be others, I suspect)
In various apps we have been adding make test-php-style make test-php-phan make test-php-phpstan Those things put dependencies under a vendor-bin folder. The dependencies get "sorted out" and loaded by composer when you first run the relevant type of test. Versions of dependencies will get loaded to match the version of PHP that the developer happens to be running.
If the developer switches to using a different version of PHP (e.g. when testing "interesting stuff" locally), specially if they switch back to PHP 5.6, then the loaded dependencies might not be correct any more.
It would be handy if there is a way to clean these loaded dependencies so that the developer can quickly start-over and have composer sort out new dependencies to match the current PHP version.
Issue
Decide some "standard" targets for:
- build-dist-release process (whatever it will be called)
- making an app ready in a developer environment (
make ddevor whatever) - cleaning stuff like these
vendor-bindependency files, other composer, yarn, JS whatever artifacts - produce a "standard"
Makefilein one app and agree on it, merge it - design a way to be able to put common parts of it somewhere that can be "pulled in" to minimize duplication of the script across apps
- implement in all apps
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the Makefiles in core and password_policy and inventory their build, development, test, clean, and dependency targets. Use the listed build-dist-release, developer-environment, cleaning, shared-script, and all-apps requirements to define the agreed standard, then verify that the common Makefile approach is implemented across the apps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100