After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680450 - Stale Gedit syntax file for golang
Stale Gedit syntax file for golang
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-23 14:01 UTC by Jim Teeuwen
Modified: 2012-07-27 17:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Correct GtkSourceView syntax file for golang. (8.55 KB, application/octet-stream)
2012-07-23 14:01 UTC, Jim Teeuwen
  Details
0001-Fixes-Golang-s-language-specs-file.patch (776 bytes, patch)
2012-07-25 15:21 UTC, Jim Teeuwen
none Details | Review
Remove the 'float' keyword and the 'error' keyword. (982 bytes, patch)
2012-07-25 16:29 UTC, Jim Teeuwen
none Details | Review
Removes 'float' keyword, adds 'error' keyword and fixes the regex for decimal numbers. (1.60 KB, patch)
2012-07-25 19:38 UTC, Jim Teeuwen
none Details | Review
Fix matching 0 as a decimal in C and Go (1.12 KB, patch)
2012-07-26 16:28 UTC, Garrett Regier
none Details | Review
Remove complex and float from Go (938 bytes, patch)
2012-07-26 16:28 UTC, Garrett Regier
none Details | Review
Add additional types to Go (1.14 KB, patch)
2012-07-26 16:28 UTC, Garrett Regier
none Details | Review
Add link to Go language spec for which it is based off of (833 bytes, patch)
2012-07-26 16:29 UTC, Garrett Regier
none Details | Review

Description Jim Teeuwen 2012-07-23 14:01:48 UTC
Created attachment 219497 [details]
Correct GtkSourceView syntax file for golang.

This is a cross-posted report from https://bugs.launchpad.net/ubuntu/+source/gtksourceview3/+bug/1027618 by their request.

The Golang syntax file that comes with Gedit 3.4.1 is meant for a pre-release version of Go.

Go has reached version 1.0 in the meantime. This brought some language changes along with it. These changes are reflected in the latest syntax file, but this one is not included in the standard Gedit package.

The correct version of this file has been attached to this report.

    $ uname -a
    Linux ubuntu 3.2.0-26-generic-pae #41-Ubuntu SMP Thu Jun 14 16:45:14 UTC 2012 i686 i686 i386 GNU/Linux

    $ gedit --version
    gedit - Version 3.4.1

    $ ls -l /usr/share/gtksourceview-3.0/language-specs | grep go.lang
    -rw-r--r-- 1 root root 7261 May 16 23:06 go.lang
Comment 1 Ignacio Casal Quinteiro (nacho) 2012-07-23 14:21:30 UTC
The lang file should be have done on top of the current file in the repository. Feel free to update it.
Comment 2 Ignacio Casal Quinteiro (nacho) 2012-07-24 18:57:59 UTC
For the record the go language was already update by garret, see:
http://git.gnome.org/browse/gtksourceview/commit/?id=2eeb9c01ce04dd02305012faf3e46abb7d01083c

please double check that nothing is missing there.
Comment 3 Jim Teeuwen 2012-07-25 15:21:39 UTC
Created attachment 219634 [details] [review]
0001-Fixes-Golang-s-language-specs-file.patch
Comment 4 Jim Teeuwen 2012-07-25 15:23:43 UTC
The patch I just submitted fixes a mistake in the patch listed by Ignacio.
It removes the keyword for the 'float' type which no longer exists in Go.
Comment 5 Jim Teeuwen 2012-07-25 16:29:37 UTC
Created attachment 219637 [details] [review]
Remove the 'float' keyword and the 'error' keyword.

This patch removes the 'float' keyword and adds the 'error' keyword.
The latter was missing from the patch Ignacio linked.

This patch overrides my previous attachments.
Comment 6 Jim Teeuwen 2012-07-25 19:38:33 UTC
Created attachment 219655 [details] [review]
Removes 'float' keyword, adds 'error' keyword and fixes the regex for decimal numbers.

Once more, a new bug fix. Let's hope three times is the charm.

Removes 'float' keyword, adds 'error' keyword and fixes the regex for decimal numbers.
    
- The float keyword is removed because the float type no longer exists in Go.
- The error keyword is for a builtin type which was added a while ago.
- The regex pattern used to match decimal numbers is incorrect.
  `[1-9][0-9]*` does not match a stadalone '0'. There is no other
  numeric recognition pattern which catches this either. The fix
  I employed also matches octal numbers, but it will have to do.
Comment 7 Garrett Regier 2012-07-26 16:28:07 UTC
Created attachment 219701 [details] [review]
Fix matching 0 as a decimal in C and Go
Comment 8 Garrett Regier 2012-07-26 16:28:27 UTC
Created attachment 219702 [details] [review]
Remove complex and float from Go
Comment 9 Garrett Regier 2012-07-26 16:28:45 UTC
Created attachment 219703 [details] [review]
Add additional types to Go
Comment 10 Garrett Regier 2012-07-26 16:29:07 UTC
Created attachment 219704 [details] [review]
Add link to Go language spec for which it is based off of