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 as formatter #261

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

Totto16
Copy link

@Totto16 Totto16 commented Oct 6, 2024

Add meson as formatter

Since meson 1.5.0 meson has a format subcommand, see here

This is still WIP, as the formatter doesn't accept stdin via "-" atm.
See mesonbuild/meson#13791

@tristan957
Copy link
Contributor

Super excited for this!

@Totto16
Copy link
Author

Totto16 commented Oct 15, 2024

Super excited for this!

Me too, but still figuring out, what the best way of doing this is.

I never managed to create an issue in meson, since some things don't work as expected. With muon you can use "-" as file and it reads from stdin, but with meson this doesn't work yet. I looked into the source code, but it's more complicated, since you have more options, can have multiple file and other more complicated things. It would be nice, If we would Be able to discuss this over there, and see what the best solution for that would be, as for now, in meson v1.5.0 I tried "/dev/stdin" and "/dev/fd/0" But they worked only in a interactive terminal and not in the extension 😓

You are also a contributor in meson, so maybe you have an idea how to do this in a way, that is already supported in v1.5.0 and we should create an issue there, so that it would be supported in a better way, than through a hack 🤔

Edit: I created mesonbuild/meson#13791

@tristan957
Copy link
Contributor

Maybe that is an issue that I can get to in the future.

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