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

Include what you use #165

Open
bugaevc opened this issue Mar 28, 2023 · 6 comments
Open

Include what you use #165

bugaevc opened this issue Mar 28, 2023 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@bugaevc
Copy link
Owner

bugaevc commented Mar 28, 2023

We should run https://include-what-you-use.org/ on wl-clipboard and apply (some of) its suggestions, within reason.

It's easy to use with Meson, see mesonbuild/meson#2637 (comment)

@bugaevc bugaevc added enhancement New feature or request good first issue Good for newcomers labels Mar 28, 2023
@corite
Copy link

corite commented Jul 30, 2023

Hi,
I was experimenting a bit with this and I tried setting up a github action for it.
What I stumbled on is that there seem to be no prebuilt binaries of IWYU, so the action would need to first build IWYU, then build wl-clipboard and afterwards run IWYU on wl-clipboard. Have I missed something, or is this really the easiest way to do this?

Also: I need to specify a clang version for IWYU. Which should I use?

@bugaevc
Copy link
Owner Author

bugaevc commented Jul 30, 2023

Hi,

wl-clipboard will not use GitHub Actions (as long as it requires adding GitHub-specific files to the repo), so maybe setting up an action is not the optimal way to start. I was rather thinking we'd run IWYU once and act on its output, then maybe check what it has to say every once in a while.

@bugaevc
Copy link
Owner Author

bugaevc commented Jul 30, 2023

That being said, your action is using ubuntu-latest, so can't you just more or less apt install iwyu?

@corite
Copy link

corite commented Jul 30, 2023

Hi,

wl-clipboard will not use GitHub Actions (as long as it requires adding GitHub-specific files to the repo), so maybe setting up an action is not the optimal way to start. I was rather thinking we'd run IWYU once and act on its output, then maybe check what it has to say every once in a while.

Oh ok, may I ask why? I was thinking that If we put it in a workflow_dispatch action you get that same workflow, but without the hassle of installing and setting up stuff every time.

@corite
Copy link

corite commented Jul 30, 2023

That being said, your action is using ubuntu-latest, so can't you just more or less apt install iwyu?

Oh right, I've found it now. It was just not mentioned anywhere, so I thought there was no package available.

@corite
Copy link

corite commented Jul 30, 2023

Regardless of whether or not you want to merge this, it now works on my fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants