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

Reconsider Makefile #140

Open
Restioson opened this issue Nov 5, 2024 · 3 comments
Open

Reconsider Makefile #140

Restioson opened this issue Nov 5, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Restioson
Copy link
Collaborator

The current Makefile has two main issues:

  • We can't nicely pass command line arguments
  • We have to remember to add every target to .PHONY

This could be alleviated by switching to Just or another tool. This would require an extra installation, though.

@friedelwolff mentioned the possibility of alphabetically ordering the Make targets, which could help spot some targets missing from .PHONY, but it isn't foolproof.

@Restioson Restioson added the enhancement New feature or request label Nov 5, 2024
@github-project-automation github-project-automation bot moved this to Backlog in LwimiLinks Nov 5, 2024
@friedelwolff
Copy link
Contributor

A few notes

  • Anything except make will probably need to be installed
  • I guess that Makefiles are not universally accessible to a wide audience
  • Just can be installed from pypi as just-bin
  • There are probably numerous python equivalents. A quick search gives me please-do for example.
  • Something similar to just --list is really needed. make <tab> works on my system, but maybe not universally
  • At what point to we just point people to the documentation of ./manage.py or docker compose?

@Restioson
Copy link
Collaborator Author

Restioson commented Nov 5, 2024

Just can be installed from pypi as just-bin

Nit: I think it is rust-just?

There are probably numerous python equivalents. A quick search gives me please-do for example.

Definitely don't mind using something similar to Just that isn't Just. I can't find please-do easily through Google, though, so Just might have the advantage of being fairly widely deployed (enough so to have solutions to common issues in Google).

At what point to we just point people to the documentation of ./manage.py or docker compose?

I think if they have to do something complex, this is reasonable - the main issue though is that the compose invocation is just very long. You have to do docker compose run --rm web python manage.py <command> and omitting any part of that (e.g. --rm) will have unintended consequences

@Restioson
Copy link
Collaborator Author

Restioson commented Nov 5, 2024

Before I forget: it would be nice to have a command like

$ just manage.py ${some command invocation}

so that users who are more familiar with manage.py can just use it directly. We do currently have make docker-shell which is similar, dropping you into a bash shell inside the relevant container.

An alternative (but very evil) thing would be to create a dummy manage.py in the repo root which passes its arguments to the docker container... (not a serious suggestion)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants