-
Notifications
You must be signed in to change notification settings - Fork 1
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 an app category in Cozy #6
base: master
Are you sure you want to change the base?
Conversation
The app category is for any files that are inside the directory of the current RIOT application
I've tried this out with in-tree examples (gcoap in my case); the result is that an app category is shown, but it is empty, and the example code is still black. Same for tests. Should this be extended to recognize those, or do you rather see this as an "(out-of-tree) app" category, which should then be shown only for that case? (I have neither a strong preference nor a good insight, as I myself have only ever patched piecemeal in cosy, so while I currently happen to be the person who does most of the merge button pushing, please treat those like comments from a drive-by reviewer.) |
I did invoke it through RIOT, and had that situation. Around the Note tht my appdir is apparently a full path without leading slash, but I didn't alter any RIOT settings, so that seems to be coming from the build system. Could we rule out that this is an artifact of being combined with the other changes (can't well test it without those right now)? Could you rebase your changes onto current master? (And maybe use the opportunity to remove the trailing empty space from the |
Can't keep digging right now, but maybe you find things from a snapshot of a breakpoint in the (Pdb) elffile, prefix, appdir, riot_base
('/home/chrysn/git/RIOT/examples/hello-world/bin/native/hello-world.elf', '', 'home/chrysn/git/RIOT/examples/hello-world', 'riotbuild/riotproject/build|riotbuild/riotproject|home/chrysn/git/RIOT/build|home/chrysn/git/RIOT|RIOT/build|RIOT|riotbuild/riotbase/build|riotbuild/riotbase')
(Pdb) m.groups()
('08049606', 'T', 'main', '/home/chrysn/git/', 'RIOT', 'examples/hello-world/', 'examples/hello-world', 'main.c', 'c', '24')
(Pdb) m.groupdict()
{'addr': '08049606', 'type': 'T', 'sym': 'main', 'dir': 'RIOT', 'path': 'examples/hello-world', 'file': 'main.c', 'line': '24'}
(Pdb) print(d)
{'arcv': '', 'obj': '', 'size': -1, 'alias': [], 'addr': '08049606', 'type': 'T', 'sym': 'main', 'dir': 'RIOT', 'path': ['examples', 'hello-world'], 'file': 'main.c', 'line': '24'} |
Thank you for your responses, it allowed me to find the error I missed. In short, as the string "RIOT" is appended in the rbase, We cannot transform I will try to propose a solution before the end of the week (probably by matching the directory "examples", inside the app category) and I will also remove the trailing empty space. |
12775a6
to
0c0dbe8
Compare
This pull request adds an app category in cozy. The app category is for any files that are inside the directory of the RIOT application. This allows to have a color for all the code that is in the application folder.
Another addition is that application that are not in a subdirectory of the RIOT folder are now correctly regrouped (the files were put in the unspecified directory).
Without the modification:
With the modification:
More on the modification:
r"((?P<path>.+)/)?"
→ This make the path optional. Without the pull request, files that are in the appdir(ectory) are not detected as being in the appdir, because the line of code required the files to be in a subfolder of the appdir.