New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Formatters Fail #2368

Closed
mitchell-as opened this Issue Feb 23, 2017 · 3 comments

Comments

@mitchell-as
Member

mitchell-as commented Feb 23, 2017

Per http://community.komodoide.com/t/perltidy-formatter-doesnt-work-in-komod-ide-10-2/3392

Short Summary

Running a custom formatter (e.g. Perltidy) results in a Komodo error.

Steps to Reproduce

Create a custom formatter like

Name: perltidy
Language: Perl
Formatter: Generic command-line formatter
Executable: /home/me/perl5/perlbrew/perls/perl-5.20.1/bin/perltidy
Command-line arguments: -pro=~/.perltidyrc

Then try to format a Perl document.

Expected results

Formatted Perl

Actual results

ERROR:xpcom:Unhandled exception calling 'int8 * format(in nsISomething);'
Traceback (most recent call last):
File "/home/me/Komodo-IDE-10/lib/mozilla/python/xpcom/server/policy.py", line 303, in CallMethod
return 0, func(*params)
File "/home/me/Komodo-IDE-10/lib/mozilla/components/koGenericFormatter.py", line 85, in format
context.prefset)
TypeError: Interpolate1() takes exactly 10 arguments (9 given)

Platform Information

Komodo Edit or IDE? Any
Komodo Version? 10.2
Operating System (and version)? Any

Additional Information

This commit causes the issue:

88bff51

Specifically, the new argument:

88bff51#diff-6aa28facfff2c4ba613d0ce9c79a5df5R637

Any calls to Interpolate1 with the old argument list will fail. Either make that argument optional (append =None), or update all Interpolate1 calls.

@simbabque

This comment has been minimized.

simbabque commented Feb 23, 2017

Built-in formatters like XML Tidy also fail with the same exception.

@Naatan

This comment has been minimized.

Member

Naatan commented Feb 23, 2017

@cgchoffman please check for other uses of this method. More things could be broken due to this.

cgchoffman added a commit that referenced this issue Feb 23, 2017

Interpolate: Fix Interpolate interface. Fixes #2368
rn=

(integrated from the KomodoIDE 10.2.x branch change 98c7b19 by Carey Hoffman <cgchoffman@gmail.com>)

Komodo/KomodoIDE@98c7b19
@cgchoffman

This comment has been minimized.

Member

cgchoffman commented Feb 24, 2017

Patched nightly build available: http://downloads.activestate.com/Komodo/nightly/komodoide/
Also includes patch for #2360.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment