Modify

Ticket #281 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

changelog prepare -c crashes with "not a ctags line"

Reported by: murrayc@… Owned by: thomas
Priority: major Milestone: 0.2.6
Component: moap Version: TRUNK
Keywords: Cc:

Description

I find that "moap changelog prepare -c" fails quite often when I use it with Glom, with errors like this:

murrayc@murrayc-desktop:~/svn/gnome220/branches/glom-1-6$ svn diff
Index: glom/libglom/data_structure/field.cc
===================================================================
--- glom/libglom/data_structure/field.cc	(revision 1489)
+++ glom/libglom/data_structure/field.cc	(working copy)
@@ -586,8 +586,8 @@
     list_conversions.clear();
     list_conversions.push_back(Field::TYPE_BOOLEAN);
     list_conversions.push_back(Field::TYPE_TEXT);
-    list_conversions.push_back(Field::TYPE_DATE);
-    list_conversions.push_back(Field::TYPE_TIME);
+    //to_date(numeric) was supported in 8.2 but not in 8.3: list_conversions.push_back(Field::TYPE_DATE);
+    //to_timestamp(numeric) was supported in 8.2 but not in 8.3: list_conversions.push_back(Field::TYPE_TIME);
     m_map_conversions[Field::TYPE_NUMERIC] = list_conversions;
 
     //Text:
@@ -602,15 +602,15 @@
     list_conversions.clear();
     list_conversions.push_back(Field::TYPE_TEXT);
     list_conversions.push_back(Field::TYPE_NUMERIC);
-    list_conversions.push_back(Field::TYPE_DATE);
-    list_conversions.push_back(Field::TYPE_TIME);
+    //to_timestamp(numeric) was supported in 8.2 but not in 8.3: list_conversions.push_back(Field::TYPE_DATE);
+    //to_timestamp(numeric) was supported in 8.2 but not in 8.3: list_conversions.push_back(Field::TYPE_TIME);
     m_map_conversions[Field::TYPE_BOOLEAN] = list_conversions;
 
     //Date:
     list_conversions.clear();
     list_conversions.push_back(Field::TYPE_TEXT);
-    list_conversions.push_back(Field::TYPE_NUMERIC);
-    list_conversions.push_back(Field::TYPE_BOOLEAN);
+    //to_number(textcat()) was supported in 8.2 but not in 8.3: list_conversions.push_back(Field::TYPE_NUMERIC);
+    //to_number(textcat()) was supported in 8.2 but not in 8.3: list_conversions.push_back(Field::TYPE_BOOLEAN);
     m_map_conversions[Field::TYPE_DATE] = list_conversions;
 
     //Time:
murrayc@murrayc-desktop:~/svn/gnome220/branches/glom-1-6$ 
murrayc@murrayc-desktop:~/svn/gnome220/branches/glom-1-6$ 
murrayc@murrayc-desktop:~/svn/gnome220/branches/glom-1-6$ 
murrayc@murrayc-desktop:~/svn/gnome220/branches/glom-1-6$ moap changelog prepare -c
Updating ChangeLog from Subversion repository.
Finding changes.
Extracting affected tags from source.
Traceback (most recent call last):
  File "/opt/gnome220/bin/moap", line 28, in ?
    sys.exit(main(sys.argv[1:]))
  File "/opt/gnome220/lib/python2.4/site-packages/moap/main.py", line 13, in main
    ret = c.parse(argv)
  File "/opt/gnome220/lib/python2.4/site-packages/moap/extern/command/command.py", line 231, in parse
    return self.subCommands[command].parse(args[1:])
  File "/opt/gnome220/lib/python2.4/site-packages/moap/extern/command/command.py", line 231, in parse
    return self.subCommands[command].parse(args[1:])
  File "/opt/gnome220/lib/python2.4/site-packages/moap/extern/command/command.py", line 213, in parse
    ret = self.do(args)
  File "/opt/gnome220/lib/python2.4/site-packages/moap/command/cl.py", line 498, in do
    ct.addString(output)
  File "/opt/gnome220/lib/python2.4/site-packages/moap/util/ctags.py", line 72, in addString
    self._parse(string.split('\n'))
  File "/opt/gnome220/lib/python2.4/site-packages/moap/util/ctags.py", line 79, in _parse
    t.parse(line)
  File "/opt/gnome220/lib/python2.4/site-packages/moap/util/ctags.py", line 38, in parse
    raise KeyError, "line %s not a ctags line" % line
KeyError: 'line operator =\t/home/murrayc/svn/gnome220/branches/glom-1-6/glom/libglom/data_structure/field.cc\t/^Field& Field::operator=(const Field& src)$/;"\tf\tline:58\tlanguage:C++\tclass:Glom::Field\tsignature:(const Field& src) not a ctags line'
murrayc@murrayc-desktop:~/svn/gnome220/branches/glom-1-6$ 

Attachments

Change History

comment:1 Changed 5 years ago by thomas

  • Status changed from new to closed
  • Resolution set to fixed

(In [336]) * moap/test/test_util_ctags.py:

  • moap/util/ctags.py: Allow spaces in the first column of a ctags file. Fixes #281.

comment:2 Changed 5 years ago by anonymous

Thanks.

comment:3 Changed 5 years ago by thomas

Can you also confirm that it now extracts correctly ? For example, by pasting the changelog entry it generated for you with this fix ?

comment:4 Changed 5 years ago by murrayc@…

Well, it hasn't crashed since that fix, and I'll tell you if it does.

But I've already committed that change. Here is an example of what it does for another set of changes:

2008-04-01 Murray Cumming, <murrayc@…>

reviewed by: <delete if not using a buddy> patch by: <delete if not someone else's patch>

  • glom/mode_data/dialog_layout_export.cc (Glom.on_cell_data_name):
  • glom/mode_data/notebook_data.cc (Glom.init_db_details, Glom.on_switch_page_handler):
  • glom/notebook_glom.cc (Glom.Notebook_Glom, Glom.on_show):
  • glom/notebook_glom.h (Notebook_Glom, Glom.m_connection_switch_page):
  • glom/utility_widgets/db_adddel/db_adddel.cc (Glom.DbAddDel?, Glom.on_cell_button_clicked, Glom.on_self_style_changed):
  • glom/utility_widgets/db_adddel/db_adddel.h (Glom.type_list_indexes):

By the way, the syntax is rather odd for C++. We would use, for instance, Namespace::function (rather than Namespace.function) and Namespace::Class::function (rather than Namespace.Class.Function

And I never liked the use of (function) instead of function(), but I am used to that now.

comment:5 Changed 5 years ago by murrayc@…

It also parses the namespace and class strangely. For instance, this: (Glom.Notebook_Glom, Glom.on_show) Should really be Glom::Notebook_Glom::on_show() because Glom is a namespace, Notebook_Glom is a class in that namespace, and on_show is a method in that class.

This is on Ubuntu Hardy, by the way.

comment:6 Changed 5 years ago by thomas

We should probably create a different ticket for this. It would be good to get a ctags file from you just like the one moap generates - you could look with MOAP_DEBUG=5 and check the ctags invocation, then run that by hand and pass me the file. This would allow me to figure out if I can show the tags like you want. I recall having some problems with ctags figuring out its scope though, but we'll see.

comment:7 Changed 4 years ago by anonymous

Can you also confirm that it now extracts correctly ? For example, by pasting the changelog entry it generated for you with this fix ? Changed 17 months ago by murrayc@… ¶

Well, it hasn't crashed since that fix, and I'll tell you if it does.

But I've already committed that change. Here is an example of what it does for another set of changes:

2008-04-01 Murray Cumming, <murrayc@…>

reviewed by: <delete if not using a buddy> patch by: <delete if not someone else's patch>

  • glom/mode_data/dialog_layout_export.cc (Glom.on_cell_data_name):
  • glom/mode_data/notebook_data.cc (Glom.init_db_details, Glom.on_switch_page_handler):
  • glom/notebook_glom.cc (Glom.Notebook_Glom, Glom.on_show):
  • glom/notebook_glom.h (Notebook_Glom, Glom.m_connection_switch_page):
  • glom/utility_widgets/db_adddel/db_adddel.cc (Glom.DbAddDel??, Glom.on_cell_button_clicked, Glom.on_self_style_changed):
  • glom/utility_widgets/db_adddel/db_adddel.h (Glom.type_list_indexes):

By the way, the syntax is rather odd for C++. We would use, for instance, Namespace::function (rather than Namespace.function) and Namespace::Class::function (rather than Namespace.Class.Function I'm closing it according to the last comment.
----------
 nike air yeezy

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.