Problem getting my language extension to work in Komodo IDE 9 like id does in 8

I am having trouble getting Komodo IDE 9 to use my language extension settings. I get various message (see below) that suggest it can’t import or find various files even though they exist.

Background

Using my “QPL6 Wrapper 6.3.42” Add on, which is available at…

https://www.respondemeum.com/komodo/qplkomodo.xpi

I started my language extension using the Komodo project language extension wizard,
and then updated the generated files to add my keywords, etc.

And then use koext to build my .xpi file…

koext build -i chrome.manifest --unjarred

Which is pointing to the Komodo9 version of koext (and which adds the ‘category udl-lexers kevin@respondemeum.com 1’ to the chrome.manifest as needed by 9).

It doesn’t look like the language extension wizard has changed what it creates so I have not made any changes to my language files since 8.5.

The log below is from Komodo 9 on Linux, but I was getting the same messages on Windows and the Mac.

Any thoughts about where I’m going wrong would be appreciated!

Kevin

Log Notes

Komodo IDE, version 9.0.1, build 87208, platform linux-x86_64.
Built on Thu Apr 16 12:42:33 2015.

Language color coding works, code completion does not work, preferences language configuration works

[2015-05-15 15:53:16,765] [ERROR] codeintel.citadel: unexpected error scanning `test.pg6'
Traceback (most recent call last):
  File "/home/dooleyk/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/citadel.py", line 264, in scan
    scan_tree = cile_driver.scan_purelang(self)
  File "/home/dooleyk/.komodoide/9.0/XRE/extensions/kevin@respondemeum.com/pylib/codeintel_qpl.py", line 1032, in scan_purelang
    import cile_qpl
ImportError: No module named cile_qpl

[2015-05-15 15:53:16,800] [ERROR] codeintel.langintel: error getting langinfo for 'QPL'
Traceback (most recent call last):
  File "/home/dooleyk/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/langintel.py", line 61, in langinfo
    self._langinfo_cache = self.mgr.lidb.langinfo_from_komodo_lang(self.lang)
  File "/home/dooleyk/Komodo-IDE-9/lib/mozilla/python/komodo/langinfo.py", line 311, in langinfo_from_komodo_lang
    raise LangInfoError("no info on %r komodo lang" % komodo_lang)
LangInfoError: no info on 'QPL' komodo lang

Your problem seems to be similar to this one, see if his solution works for you:

If not, please provide a link to the source code (eg. github).

I copied the contents of the cile_qpl.py file to the end of the codeintel_qpl.py file, and changed the call to…

codeintel_qpl.py

    ...
    class QPLCILEDriver(UDLCILEDriver):
        lang = lang
    
        def scan_purelang(self, buf):
    #        import cile_qpl
    #        return cile_qpl.scan_buf(buf)
            return scan_buf(buf)

...

Line 1055: copied contents of cile_qpl.py ...

This change seems to work so that I don’t get the “ImportError” error in the log anymore.

But I still get the LangInfoError below.

[2015-05-18 15:26:53,504] [ERROR] codeintel.langintel: error getting langinfo for 'QPL'
Traceback (most recent call last):

  File "/home/dooleyk/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/langintel.py", line 61, in langinfo
    self._langinfo_cache = self.mgr.lidb.langinfo_from_komodo_lang(self.lang)
    
  File "/home/dooleyk/Komodo-IDE-9/lib/mozilla/python/komodo/langinfo.py", line 311, in langinfo_from_komodo_lang
    raise LangInfoError("no info on %r komodo lang" % komodo_lang)
    
LangInfoError: no info on 'QPL' komodo lang

Syntax color-coding and QPL language preferences are working, but code-completion doesn’t work.

I’ve added my code to GitHub at…

Kevin
B-)x

You seem to be missing a langinfo class, eg.

The golang language extension seems to be taking a pretty different approach to what is described in the 8.0 and 9.0 manuals: “The easiest way to create a new Komodo language is to use the Project -> New Project from Template and select the Create Komodo Language project.”

The wizard-generated koFuzzy_UDL_Language.py, is getting used and shows up in the Preference settings. I’m not trying to do more than basic stuff at the moment (color coding and code completion), and tweaking what the wizard generated seems to be otherwise working.

I did create two more language extensions using only the ‘Create Komodo Language’ wizard (with and without the code intelligence option) and get the same errors both on 8.5 and 9.0, though they are more visible on 9.0 because a new popup box keeps popping up to tell me about them.

Fuzzy - no code intellegence

Wuzzy - with code intellegence

Can the wizard could be updated so that it generates code that runs without these errors?

If not, is there a workaround I could use? I’m not a Python guy and would need a few more clues to see how I could use koGoAppInfo.py fix the langinfo problem.

Thanks dooleyk, I’ve opened a bug report here: https://github.com/Komodo/KomodoEdit/issues/286

I’ll ask one of the other devs more familiar with this stuff to explain the LangInfo class.