Changeset View
Standalone View
languages/clang/kdevclang.xml
- This file was added.
1 | <?xml version="1.0" encoding="utf-8"?> | ||||
---|---|---|---|---|---|
2 | <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> | ||||
3 | <!-- | ||||
4 | Will be part of shared-mime-info 1.9. Remove once 1.9 is the minimum dependency. | ||||
5 | The mimetype id used here is disputable: is the one currently used in shared-mime-info, | ||||
6 | though that one was created out-of-the-blue, without being backed by wider usage | ||||
7 | or greater input from the OpenCL community. So needs more work. | ||||
8 | --> | ||||
9 | <mime-type type="text/x-opencl-src"> | ||||
10 | <comment>OpenCL C source code</comment> | ||||
11 | <acronym>OpenCL</acronym> | ||||
12 | <expanded-acronym>Open Computing Language</expanded-acronym> | ||||
13 | <sub-class-of type="text/x-csrc"/> | ||||
kossebau: @aaronpuchert, given D5485 this indeed should be "OpenCL C source code", not "OpenCL source… | |||||
Yes, that is the official name of the language. I'd also argue that the mime type should be text/x-opencl-csrc. The reason being that there is also OpenCL C++ (since OpenCL 2.1), though that is not yet supported by Clang. aaronpuchert: Yes, that is the [official name](https://www.khronos.org/registry/OpenCL/specs/opencl-2.0… | |||||
@aaronpuchert Could you introduce us KDevelop developers to any people who are active in the OpenCL developer scene and who would have the knowledge and motivation to push for proper mimetype ids now? Just saw in the KDE software world already another mimetype has been in use: text/x-clsrc. as part of the syntax highlight definition for OpenCL: The alias noted here in the mimetype definition, text/x-opencl can seen in even more places. So it really needs someone from the active OpenCL scene to tell the IDEs and systems what to use as id. Can you make the difference? :) Any Khronos channels you are on where you could poke people to decide on one, and perhaps even register with IANA? kossebau: @aaronpuchert Could you introduce us KDevelop developers to any people who are active in the… | |||||
You're right, no one ever took the time to register a MIME type for OpenCL C. Even the file extension .cl doesn't seem to be “official”, at least I can't find any reference to it in the official documents. I will try to contact Khronos about this and ask them to register with IANA or do it myself, if they don't care. Obviously this is the right way. aaronpuchert: You're right, no one ever took the time to register a MIME type for OpenCL C. Even the file… | |||||
Note that none of those MIME types can be registered with IANA. Registered types don't have an x-. nalvarez: Note that //none// of those MIME types can be registered with IANA. Registered types don't have… | |||||
I'm a bit stunned: not even C or C++ source files are registered with IANA. Why would that be? After MIME types beginning with x- have been deprecated in RFC 6648, it is recommended in RFC 6838 that such types, if in wide use, should be registered with a standardized type. No one has apparently taken the time to do that. So for now, we should probably just update shared-mime-info, since registering with IANA requires an RFC. aaronpuchert: I'm a bit stunned: not even C or C++ source files are registered with [IANA](https://www.iana. | |||||
Question is, what should be used for updating shared-mime-info? And it still would be good to make OpenCL/Khronos people aware of the need to have something to identify/speficify files with OpenCL C/C++ content. And if only they come up with some recommended informal mimetype ids and file extensions :) Anything not made up ourselves would be good. I tried to catch some people via planet kde, but surely that might not have been the best audience: https://frinring.wordpress.com/2017/04/28/give-us-a-proper-mimetype-name-for-opencl-c-files/ kossebau: Question is, what should be used for updating shared-mime-info?
And it still would be good to… | |||||
14 | <glob pattern="*.cl"/> | ||||
15 | <alias type="text/x-opencl"/> | ||||
16 | </mime-type> | ||||
17 | </mime-info> |
@aaronpuchert, given D5485 this indeed should be "OpenCL C source code", not "OpenCL source code", right?
If so, someone with knowledge should write a patch to fix-up the entry in shared-mime-info, which is without the "C": https://cgit.freedesktop.org/xdg/shared-mime-info/commit/?id=4ab969c398671c519a10a601ad3eeb46f04361de