Bug 30012 - Request for MIME types: Verilog and SystemVerilog languages.
Summary: Request for MIME types: Verilog and SystemVerilog languages.
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Shared Mime Info group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-04 04:59 UTC by something_for_the_pain
Modified: 2010-09-30 12:01 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Verilog MIME type (2.92 KB, text/plain)
2010-09-04 04:59 UTC, something_for_the_pain
Details
SystemVerilog header MIME type. (2.50 KB, text/plain)
2010-09-04 04:59 UTC, something_for_the_pain
Details
SystemVerilog source code MIME type. (3.19 KB, text/plain)
2010-09-04 05:00 UTC, something_for_the_pain
Details
Verilog MIME type. (2.92 KB, text/plain)
2010-09-04 05:03 UTC, something_for_the_pain
Details
SystemVerilog header MIME type. (2.51 KB, text/plain)
2010-09-04 05:04 UTC, something_for_the_pain
Details
SystemVerilog source code MIME type. (3.19 KB, text/plain)
2010-09-04 05:05 UTC, something_for_the_pain
Details
Git patch of updates. (2.28 KB, patch)
2010-09-04 07:55 UTC, something_for_the_pain
Details | Splinter Review
Patch to add SystemVerilog header/source MIME types. (2.16 KB, text/plain)
2010-09-04 09:28 UTC, something_for_the_pain
Details
SystemVerilog header/source MIME type. (2.56 KB, patch)
2010-09-04 09:42 UTC, something_for_the_pain
Details | Splinter Review

Description something_for_the_pain 2010-09-04 04:59:05 UTC
Created attachment 38430 [details]
Verilog MIME type

I use both Verilog and SystemVerilog languages on a day-to-day basis and have recently submitted language definition files for both (see https://bugzilla.gnome.org/show_bug.cgi?id=628246).

However, MIME types do not currently exist for either language, hence the language definition files are of only limited use.

As such I would like to submit MIME definitions for both languages (see attachments).

These MIME types are for three file types - Verilog source files (verilog has no concept of explicit header files) and SystemVerilog source/header files.

Please consider these additions for inclusion in the repository.
Comment 1 something_for_the_pain 2010-09-04 04:59:48 UTC
Created attachment 38431 [details]
SystemVerilog header MIME type.
Comment 2 something_for_the_pain 2010-09-04 05:00:22 UTC
Created attachment 38432 [details]
SystemVerilog source code MIME type.
Comment 3 something_for_the_pain 2010-09-04 05:03:29 UTC
Created attachment 38433 [details]
Verilog MIME type.

Fixed bug: mime-type=   ->   mime-type type=
Comment 4 something_for_the_pain 2010-09-04 05:04:11 UTC
Created attachment 38434 [details]
SystemVerilog header MIME type.

Fixed bug: mime-type=   ->   mime-type type=
Comment 5 something_for_the_pain 2010-09-04 05:05:22 UTC
Created attachment 38435 [details]
SystemVerilog source code MIME type.

Fixed bug: mime-type=   ->   mime-type type=
Comment 6 something_for_the_pain 2010-09-04 05:06:49 UTC
All files are based on freedesktop.org.xml on my local machine - specifically the C++ section.
Comment 7 Bastien Nocera 2010-09-04 05:26:30 UTC
See http://cgit.freedesktop.org/xdg/shared-mime-info/tree/HACKING#n31 for how the patches should be constructed.
Comment 8 something_for_the_pain 2010-09-04 06:25:52 UTC
I couldn't see any obvious instructions on that link for actually submitting new MIME types.

I checked out the head from git and read README and attempted to follow it, but it contains errors - for example, there is no configure script that the README tells the user to execute.

I attempted to run the autogen.sh script, but that also failed:

"./autogen.sh: 27: aclocal: not found"


Please let me know which file you'd like me to edit.
Comment 9 something_for_the_pain 2010-09-04 06:32:53 UTC
Not to worry - just spotted it.
Comment 10 something_for_the_pain 2010-09-04 06:36:59 UTC
Just to check, should I edit freedesktop.org.xml.in and send you a patch?
Comment 11 Bastien Nocera 2010-09-04 06:45:45 UTC
Yes, in a git formatted patch, and with test cases in the patch as well.
Comment 12 something_for_the_pain 2010-09-04 07:55:32 UTC
Created attachment 38437 [details] [review]
Git patch of updates.

Changes:

 * Added SystemVerilog example file: tests/test.sv
 * Changed Verilog and VHDL comments from "document" to "source code".
 * Added SystemVerilog header/source MIME types.

Hopefully this is in the correct format.
Comment 13 Bastien Nocera 2010-09-04 08:11:50 UTC
Review of attachment 38437 [details] [review]:

Split the subject line, it's 72 chars max.

You also didn't add the new file to the test suite.

::: freedesktop.org.xml.in
@@ +4406,3 @@
+  <mime-type type="text/x-svhdr">
+    <_comment>SystemVerilog header</_comment>
+    <sub-class-of type="text/plain"/>

why no sub-class-of text/x-verilog?

@@ +4411,3 @@
+  <mime-type type="text/x-svsrc">
+    <_comment>SystemVerilog source code</_comment>
+    <sub-class-of type="text/plain"/>

same here
Comment 14 something_for_the_pain 2010-09-04 08:25:09 UTC
> Split the subject line, it's 72 chars max.

Ok, I'll try again.


> You also didn't add the new file to the test suite.

How do I add files to the testsuite?  I couldn't see how to check out "xdgmime" that the "HACKING" file talks about - there is no repository URL or check-out instructions.


> why no sub-class-of text/x-verilog?

I'm not entirely sure of the purpose of sub-classes in this context.  It should be noted that SystemVerilog is a newer language than Verilog and is a strict superset - does this mean it should be a sub-class?


The changes I'm trying to make seem trivial to me, but the process of making the changes is far from painless and straight-forward.  Would it be acceptable for you to make these changes locally?  I appreciate that you are probably busy, but it might be easier for you to make the minor edits than to support me in doing so.
Comment 15 something_for_the_pain 2010-09-04 09:28:30 UTC
Created attachment 38438 [details]
Patch to add SystemVerilog header/source MIME types.

BCJ: I've made SystemVerilog a sub-class of x-verilog, shortened the comment, added test files and updated the test list.

Hopefully this should now meet your check-in criteria.  Please let me know.
Comment 16 something_for_the_pain 2010-09-04 09:33:28 UTC
Just noticed that the list file wasn't added to that patch.  Git is really starting to wind me up now.

I'll try again...
Comment 17 something_for_the_pain 2010-09-04 09:42:54 UTC
Created attachment 38441 [details] [review]
SystemVerilog header/source MIME type.

I think this patch should be ok now.  Please review for inclusion.

Many thanks.
Comment 18 something_for_the_pain 2010-09-09 17:14:35 UTC
Please let me know if there's anything else I need to do to get this patch accepted.
Comment 19 Bastien Nocera 2010-09-30 09:16:48 UTC
(In reply to comment #14)
> > Split the subject line, it's 72 chars max.
> 
> Ok, I'll try again.
> 
> 
> > You also didn't add the new file to the test suite.
> 
> How do I add files to the testsuite?  I couldn't see how to check out "xdgmime"
> that the "HACKING" file talks about - there is no repository URL or check-out
> instructions.

It's in the same repository as shared-mime-info. I added this to the HACKING file.

> > why no sub-class-of text/x-verilog?
> 
> I'm not entirely sure of the purpose of sub-classes in this context.  It should
> be noted that SystemVerilog is a newer language than Verilog and is a strict
> superset - does this mean it should be a sub-class?

Probably not then.

> The changes I'm trying to make seem trivial to me, but the process of making
> the changes is far from painless and straight-forward.  Would it be acceptable
> for you to make these changes locally?  I appreciate that you are probably
> busy, but it might be easier for you to make the minor edits than to support me
> in doing so.

No, sorry, I don't have time to massage patches into shape.
Comment 20 Bastien Nocera 2010-09-30 09:25:08 UTC
I fixed the typo in the test/list file that made it expect text/x-svscr instead of text/x-svsrc.

I also fixed the e-mail address in your patch. You might want to configure your git profile correctly if you're going to send more patches. See:
http://live.gnome.org/Git/Developers#Setting_up_Git

I also removed "BCJ" from the commit title, and made sure the subject stayed under 72 characters.

commit 4272b8a01ae513fc67833163507bd8b7e6f15362
Author: Ben James <something_for_the_pain@hotmail.com>
Date:   Sat Sep 4 17:38:32 2010 +0100

    Add SystemVerilog header/source mime and tests
    
    Also changed Verilog and VHDL from "document" to "source code"
    
    https://bugs.freedesktop.org/show_bug.cgi?id=30012
Comment 21 something_for_the_pain 2010-09-30 12:01:48 UTC
Many thanks for accepting the patch.  Apologies for the errors.

Now I just need to wait for this to filter down to my distro...


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.