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

Add "meson run" command #13885

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add "meson run" command #13885

wants to merge 3 commits into from

Conversation

xclaesse
Copy link
Member

@xclaesse xclaesse commented Nov 8, 2024

No description provided.

mesonbuild/mcompile.py Fixed Show fixed Hide fixed
mesonbuild/mcompile.py Show resolved Hide resolved
docs/markdown/Commands.md Outdated Show resolved Hide resolved
Comment on lines 433 to 436
*Since 1.7.0* `run` is an alias of `devenv` with the difference that if `--bin`
is not specified it defaults to the project's main executable. It is an error if
more than one executable is installable and `--bin` is not specified or is
ambiguous. Since an executable is required, `meson run` will never start an
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is badly worded and difficult to understand. What is "the project's main executable"?

Copy link
Member Author

@xclaesse xclaesse Nov 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately I would like to add e.g. meson.set_run_target(exe) to let define from meson.build what it the project's run command. For now if there is one and only one installable exe it picks it, otherwise it's an error.

How would you rephrase?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't have such an API then we shouldn't write documentation as if we do -- we can always reword the documentation if and when we get such an API.

If you're suggesting to create a guess mode then it should just say that straight out: "--bin is required unless the project only contains a single installable executable".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrased the doc now that we don't have --bin in devenv anymore. Is it better?

mesonbuild/mdevenv.py Outdated Show resolved Hide resolved
mesonbuild/mrun.py Fixed Show fixed Hide fixed
@xclaesse xclaesse changed the title devenv: Add --bin argument and "run" alias Add "meson run" command Nov 8, 2024
@xclaesse
Copy link
Member Author

CI issue seems unrelated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants