<div dir="auto">Hello everyone,<div dir="auto">I wrote the style checking tool and looking forward to some feedback to improve it...</div><div dir="auto"><a href="https://github.com/Idadelveloper/rtems-tools/blob/master/misc/tools/style.py">https://github.com/Idadelveloper/rtems-tools/blob/master/misc/tools/style.py</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 11 Aug 2021, 5:07 pm Gedare Bloom, <<a href="mailto:gedare@rtems.org">gedare@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Aug 10, 2021 at 3:21 PM Ida Delphine <<a href="mailto:idadelm@gmail.com" target="_blank" rel="noreferrer">idadelm@gmail.com</a>> wrote:<br>
><br>
> Hi everyone,<br>
> I was able to successfully build LLVM from source using "ninja" instead of "make" after a couple of failed attempts because I kept running out of resources.<br>
><br>
> Is there anything else I am supposed to do as far building LLVM is concerned? Or will every user first have to clone the llvm repo and build it from source like I did?<br>
><br>
I think it would be good to update/provide RSB recipe for newer<br>
version(s) of LLVM. If you can do that after the GSoC coding period<br>
ends, that would be great.<br>
<br>
> On Fri, 16 Jul 2021, 5:28 am Chris Johns, <<a href="mailto:chrisj@rtems.org" target="_blank" rel="noreferrer">chrisj@rtems.org</a>> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> I will bring the discussion to the devel list and I hope the comments are in<br>
>> line with the purpose of the project. Please correct what I say if it is not.<br>
>><br>
>> The pre-commit script that is in github review is a good base and I believe it<br>
>> solves that problem for those on Linux. It is a great start and it is nice to see.<br>
>><br>
>> The work needs to mature and progress and that means a few things. I was<br>
>> approached by Joel about where this would live in rtems-tools. As the script<br>
>> stands it is not suitable for rtems-tool because the format is specific to the<br>
>> score code in rtems.git.<br>
>><br>
>> I think a pre-commit script needs to live in the repo it is for in a spot a user<br>
>> can copy to the hooks directory of their repo. For example `git-hooks`.<br>
>><br>
>> A git hooks script for rtems.git needs to run on all the supported hosts or we<br>
>> may result in patches being left on the floor. If a contributor's host OS is not<br>
>> supported and the patch is rejected for formatting reasons picked up by the<br>
>> check the contributor may just walk away.<br>
>><br>
>> The script should use `/usr/bin/env python3` and it needs to check for a range<br>
>> of `clang-format` instances. FreeBSD has a package that installs the format<br>
>> command as `clang-format10` for LLVM 10 and `clang-format11` for version 11.<br>
>><br>
>> A contributor being able to run the script may depend on the host having a<br>
>> package or packages installed. Given this is for RTEMS development that is fine.<br>
>> The script needs to handle any set up errors nicely if something is missing. I<br>
>> prefer we avoid the "experts" approach to error management.<br>
>><br>
>> There is possible future work adding a command to rtems-tools. Ida and I<br>
>> discussed this on discord and we decided a command called `rtems-style` would be<br>
>> nice. It would be nice if that command checked, ie `--mode=check`, a style as<br>
>> well as `--mode=reformat` to automatically reformat a source file.<br>
>><br>
>> A command for rtems-tools has to support python2 and python3 and it has to<br>
>> handle errors in suitable manner. Printing uncaught exception is not OK. It<br>
>> should also be self contained and not depend on any pip python packages.<br>
>><br>
>> If an `rtems-style` command is created and installed when rtems-tool is<br>
>> installed the pre-commit git script could be made to use it and so the style is<br>
>> held in a single location.<br>
>><br>
>> Finally an rtems-style command could be extended to support python<br>
>> (--lang=python) or other styles for other code formats. This is inline with our<br>
>> other eco-system interfaces we provide.<br>
>><br>
>> I hope this helps.<br>
>><br>
>> Chris<br>
>><br>
>> On 16/7/21 5:13 am, Ida Delphine wrote:<br>
>> > I will check on this<br>
>> ><br>
>> > On Thu, Jul 15, 2021 at 3:39 PM Gedare Bloom <<a href="mailto:gedare@rtems.org" target="_blank" rel="noreferrer">gedare@rtems.org</a><br>
>> > <mailto:<a href="mailto:gedare@rtems.org" target="_blank" rel="noreferrer">gedare@rtems.org</a>>> wrote:<br>
>> ><br>
>> >     On Thu, Jul 15, 2021 at 5:19 AM Ida Delphine <<a href="mailto:idadelm@gmail.com" target="_blank" rel="noreferrer">idadelm@gmail.com</a><br>
>> >     <mailto:<a href="mailto:idadelm@gmail.com" target="_blank" rel="noreferrer">idadelm@gmail.com</a>>> wrote:<br>
>> >     ><br>
>> >     > Hello everyone,<br>
>> >     > From the discussion on discord it looks like clang-format cannot be<br>
>> >     installed on MacOS and FreeBSD. Is there any alternative or way to have it<br>
>> >     on these operating systems?<br>
>> >     ><br>
>> >     What are the challenges with them? Can clang-format be built from<br>
>> >     source on those hosts?<br>
>> ><br>
>> >     > On Wed, 5 May 2021, 10:21 pm Ida Delphine, <<a href="mailto:idadelm@gmail.com" target="_blank" rel="noreferrer">idadelm@gmail.com</a><br>
>> >     <mailto:<a href="mailto:idadelm@gmail.com" target="_blank" rel="noreferrer">idadelm@gmail.com</a>>> wrote:<br>
>> >     >><br>
>> >     >> Hello everyone,<br>
>> >     >><br>
>> >     >> Regarding this project (<a href="https://devel.rtems.org/ticket/3860" rel="noreferrer noreferrer" target="_blank">https://devel.rtems.org/ticket/3860</a><br>
>> >     <<a href="https://devel.rtems.org/ticket/3860" rel="noreferrer noreferrer" target="_blank">https://devel.rtems.org/ticket/3860</a>>) I went with clang-format as we all<br>
>> >     agreed. I have tested it on some "score" files and it made some changes<br>
>> >     which I don't think are very much in line with the RTEMS coding style.<br>
>> >     However, it wasn't really clear if we will chage the RTEMS coding style or<br>
>> >     try to make changes to clang-format to fit the style.<br>
>> >     >> Please will love to know the best option.<br>
>> >     >><br>
>> >     >> Cheers,<br>
>> >     >> Ida.<br>
>> >     ><br>
>> >     > _______________________________________________<br>
>> >     > devel mailing list<br>
>> >     > <a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a> <mailto:<a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a>><br>
>> >     > <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
>> >     <<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a>><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > devel mailing list<br>
>> > <a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
>> > <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
>> ><br>
</blockquote></div>