-
Notifications
You must be signed in to change notification settings - Fork 0
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support different versions of clang-format and clang-tidy #1
Comments
* feat: #1 support multi versions of clang tools
@shenxianpeng I can't dynamically use tags in the action's Dockerfile's clang-tidy-"$CLANG_VERSION" ... $SOURCE_FILE |
@2bndy5 There is no way could pass the clang-tools version from |
I just uploaded clang-tools latest version 12, so |
Good that you got v12 installing! This will come in handy for other windows users (like myself -- I use WSL ubuntu for local developing). My problem is this: The way selecting a version that currently works is by setting the
What I'm trying to say is that if a user wants to use v12, it won't be accessible because the image is hardcoded to only have v10 installed. The important thing to know here, is that I can't use an action's input variable (like
|
I should point out that I've already come across errors from clang-format (v10) that causes a clang-format to crash if the .clang-format config file has an option that is not supported by newer version of clang-format (even though it was stated in v13 docs without any warning). |
I found this way can to pass the version to Dockerfile
Under my test:
Does this meet your expectations? |
yes but the ARG option is used by the action.yml to pass the input variables to the ENTRYPOINT option. I'll try and see if the ARG option can be used twice and report back... EDIT: The args list from a action.yml is passed to the dockerfile's ENTRYPOINT option using the CMD option. I don't see a way to set the dockerfile's ARG option from the action.yml |
BTW its best to specify |
Okay, maybe can set |
Still trying to find a way to pass |
referencing my results on a different thread: |
@shenxianpeng Just as an example, here is a link to a similar action that allows the user to set the clang-tools version from the action's inputs observe also the same action's yml file: Please note that action uses a python script as an ENTRYPOINT, and from there it uses GH CLI tool (via a python binding) to do some pretty cool stuff (like auto-PR reviews and an upcoming feature to compose a commit of clang-tools' suggestions). However, it does not support push events, and we will shortly... |
These links are very inspired, the PR suggestions look very pretty. to have such cool features may also need to use python to implement, it will easier.
馃槂 馃憤 |
so we also need to install clang-* version in an image if we want to support other versions. |
Yes, but python is slow (especially when we need to install dependencies via
Yes please. If it turns out to be a detrimental slow-down, then we should probably stick to what is installed by default in ubuntu (v10). My hope is that this image (with all versions installed) can be used by other clang-tidy/format related actions as well. That would make this image more beneficial to the community and not just exclusive to us. |
Yes, using Perl should be faster than python. but I'd prefer bash, python to Perl for two reasons.
You're right. I have done another clang-tools image which includes all versions of clang-* versions(from v12 to v6). the tag is |
good feedback! I have been exploring some python parsers... I would still like to keep third-party dependencies low. Seems that some update to pip in the last year made it very slow (not as much when in an activated venv). Just to throw it out there: I'm also fluent in Lua, but I don't think that a Lua interpreter ships with ubuntu:latest. Lua also is down to #39 on that list though 馃槗 |
I've been using Python but not so much for performance that I didn't notice that :) You know too much... I don't even know where to use Lua, from the ranking it sounds like I don't need to learn it for now, haha. I close it as it's done. |
No description provided.
The text was updated successfully, but these errors were encountered: