idris-hackers / idris-mode

Idris syntax highlighting, compiler-supported editing, interactive REPL and more things for Emacs.
GNU General Public License v3.0
269 stars 71 forks source link

Idris mode is again uninstallable from MELPA #76

Closed fhars closed 10 years ago

fhars commented 10 years ago

On GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.4):

Done (Total of 16 files compiled, 1 failed, 1 skipped)
Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140130.2349/idris-warnings-tree.el at Tue Feb  4 17:19:48 2014
idris-warnings-tree.el:134:1:Warning: Unused lexical variable `conc-name'

In with-struct:
idris-warnings-tree.el:134:64:Warning: `(reader (slot) (intern (concat
    (symbol-name conc-name) (symbol-name slot))))' is a malformed function
idris-warnings-tree.el:196:1:Error: Invalid function: (reader (slot) (intern (concat (symbol-name conc-name) (symbol-name slot))))
```
hannesm commented 10 years ago

it would be great if you can try the fix from #78

david-christiansen commented 10 years ago

I suppose it's difficult to check. Melpa builds from master. How about we just merge and see what happens?

david-christiansen commented 10 years ago

I've been unable to reproduce the problem - I just installed from MELA - but I'll merge, and then perhaps @fhars can let us know if it's fixed on his machine after MELA updates again.

fhars commented 10 years ago

It compiles now, with lots of warnings about functions not known to be defined and accesses to gloabl variables and stuff. And it doesn't work. I'll open a new ticket with more information later.

david-christiansen commented 10 years ago

Could you please paste the compile log into the issue? That will make it much easier to figure out what's going on.

Thanks!

2014-02-10 9:59 GMT+01:00 fhars notifications@github.com:

It compiles now, with lots of warnings about functions not known to be defined and accesses to undefined variables and stuff. And it doesn't work.

— Reply to this email directly or view it on GitHubhttps://github.com/idris-hackers/idris-mode/issues/76#issuecomment-34610749 .

fhars commented 10 years ago
Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-commands.el at Mon Feb 10 10:37:50 2014
Entering directory `/home/hars/.emacs.d/elpa/idris-mode-20140209.2240/'

In idris-load-file:
idris-commands.el:82:58:Warning: reference to free variable
    `idris-warnings-printing'

In idris-insert-or-expand:
idris-commands.el:188:42:Warning: reference to free variable
    `idris-use-yasnippet-expansions'

In idris-metavar-to-snippet:
idris-commands.el:194:34:Warning: `(to-snippet-param (metavar) (incf n) (if
    (string= metavar "(_)") (format "(${%s:_})" n) (format "${%s:%s}" n
    metavar)))' is a malformed function

In end of data:
idris-commands.el:266:1:Warning: the function `cl-flet' is not known to be
    defined.

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-common-utils.el at Mon Feb 10 10:37:50 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-compat.el at Mon Feb 10 10:37:50 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-completion.el at Mon Feb 10 10:37:50 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-core.el at Mon Feb 10 10:37:50 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-events.el at Mon Feb 10 10:37:50 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-indentation.el at Mon Feb 10 10:37:50 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-info.el at Mon Feb 10 10:37:51 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-log.el at Mon Feb 10 10:37:51 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-mode-pkg.el at Mon Feb 10 10:37:51 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-mode.el at Mon Feb 10 10:37:51 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-prover.el at Mon Feb 10 10:37:51 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-repl.el at Mon Feb 10 10:37:51 2014

In idris-repl-event-hook-function:
idris-repl.el:201:35:Warning: reference to free variable
    `idris-warnings-printing'

In idris-repl-semantic-text-props:
idris-repl.el:315:40:Warning: `(get-props (props) (let* ((name (assoc :name
    props)) (implicit (assoc :implicit props)) (decor (assoc :decor props))
    (implicit-face (if (and implicit (equal (cadr implicit) :True)) (quote
    (idris-semantic-implicit-face)) nil)) (decor-face (if decor (cdr (assoc
    (cadr decor) (quote ((:type idris-semantic-type-face) (:data
    idris-semantic-data-face) (:function idris-semantic-function-face) (:bound
    idris-semantic-bound-face))))) nil))) (list (quote help-echo) (if name
    (cadr name) "") (quote face) (append implicit-face decor-face))))' is a
    malformed function

In end of data:
idris-repl.el:518:1:Warning: the following functions are not known to be defined: cl-flet,
    get-props

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-syntax.el at Mon Feb 10 10:37:51 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-warnings-tree.el at Mon Feb 10 10:37:51 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/idris-warnings.el at Mon Feb 10 10:37:51 2014

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140209.2240/inferior-idris.el at Mon Feb 10 10:37:51 2014

In idris-run:
inferior-idris.el:88:18:Warning: reference to free variable
    `idris-interpreter-path'
inferior-idris.el:91:26:Warning: reference to free variable
    `idris-interpreter-flags'

In idris-eval:
inferior-idris.el:284:40:Warning: reference to free variable
    `idris-warnings-printing'

In end of data:
inferior-idris.el:297:1:Warning: the function `idris-quit' is not known to be
    defined.
david-christiansen commented 10 years ago

@fhars Now that MELPA has updated, can you install idris-mode successfully?

fhars commented 10 years ago

I still get some warnings:

Entering directory `/home/hars/.emacs.d/elpa/idris-mode-20140219.730/'
idris-commands.el:218:1:Warning: Unused lexical variable `n'

In idris-metavar-to-snippet:
idris-commands.el:218:34:Warning: `(to-snippet-param (metavar) (cl-incf n) (if
    (string= metavar "(_)") (format "(${%s:_})" n) (format "${%s:%s}" n
    metavar)))' is a malformed function
idris-commands.el:307:1:Warning: Unused lexical argument `name'

In end of data:
idris-commands.el:330:1:Warning: the function `cl-flet' is not known to be
    defined.

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140219.730/idris-common-utils.el at Fri Feb 21 19:09:07 2014

In idris-repl-semantic-text-props:
idris-common-utils.el:82:40:Warning: `(get-props (props) (let* ((name (assoc :name props)) (implicit (assoc :implicit props)) (decor (assoc :decor props)) (unique-val (cl-gensym)) (implicit-face (if (and implicit (equal (cadr implicit) :True)) (quote (idris-semantic-implicit-face)) nil)) (decor-face (if decor (cdr (assoc (cadr decor) (quote ((:type idris-semantic-type-face) (:data idris-semantic-data-face) (:function idris-semantic-function-face) (:bound idris-semantic-bound-face))))) nil)) (mousable-face (if (and (not (equal (cadr decor) :bound)) name) (\` ((:inherit (\, decor-face) :box t :hack (\, unique-val)))) nil)) (mouse-help (if (and (not (equal (cadr decor) :bound)) name) "
<mouse-3> context menu" ""))) (\` ((\,@ (if name (append (\` (help-echo (concat (\, (cadr name)) (\, mouse-help)))) (if (and (not (equal (cadr decor) :bound)) name) (\` (idris-ref (\, (cadr name)) keymap (\, (idris-make-ref-menu-keymap (cadr name))))) nil)) nil)) (\,@ (if mousable-face (list (quote mouse-face) mousable-face) nil)) face (\, (append implicit-face decor-face))))))' is a malformed function

In end of data:
idris-common-utils.el:150:1:Warning: the following functions are not known to be defined: cl-flet,
    get-props

The mode then loads, I get syntax highlighting, but almost everything else I try runs into a variant of #83

fhars commented 10 years ago

I performed a few more experiments with the current version from MELPA, this seems to be different from #83.

I started emacs, opened a new, empty .idr file and typed C-c C-l This resulted in an *idris-repl* buffer with an active prompt. Then I typed 1 + 1 at the prompt, and got the answer expected answer 2 : Integer in the buffer together with the message

error in process filter: idris-repl-semantic-text-props: Invalid function: (get-props (props) (let* ((name (assoc :name props)) (implicit (assoc :implicit props)) (decor (assoc :decor props)) (unique-val (cl-gensym)) (implicit-face (if (and implicit (equal (cadr implicit) :True)) (quote (idris-semantic-implicit-face)) nil)) (decor-face (if decor (cdr (assoc (cadr decor) (quote ((:type idris-semantic-type-face) (:data idris-semantic-data-face) (:function idris-semantic-function-face) (:bound idris-semantic-bound-face))))) nil)) (mousable-face (if (and (not (equal (cadr decor) :bound)) name) (\` ((:inherit (\, decor-face) :box t :hack (\, unique-val)))) nil)) (mouse-help (if (and (not (equal (cadr decor) :bound)) name) "
<mouse-3> context menu" ""))) (\` ((\,@ (if name (append (\` (help-echo (concat (\, (cadr name)) (\, mouse-help)))) (if (and (not (equal (cadr decor) :bound)) name) (\` (idris-ref (\, (cadr name)) keymap (\, (idris-make-ref-menu-keymap (cadr name))))) nil)) nil)) (\,@ (if mousable-face (list (quote mouse-face) mousable-face) nil)) face (\, (append implicit-face decor-face))))))
error in process filter: Invalid function: (get-props (props) (let* ((name (assoc :name props)) (implicit (assoc :implicit props)) (decor (assoc :decor props)) (unique-val (cl-gensym)) (implicit-face (if (and implicit (equal (cadr implicit) :True)) (quote (idris-semantic-implicit-face)) nil)) (decor-face (if decor (cdr (assoc (cadr decor) (quote ((:type idris-semantic-type-face) (:data idris-semantic-data-face) (:function idris-semantic-function-face) (:bound idris-semantic-bound-face))))) nil)) (mousable-face (if (and (not (equal (cadr decor) :bound)) name) (\` ((:inherit (\, decor-face) :box t :hack (\, unique-val)))) nil)) (mouse-help (if (and (not (equal (cadr decor) :bound)) name) "
<mouse-3> context menu" ""))) (\` ((\,@ (if name (append (\` (help-echo (concat (\, (cadr name)) (\, mouse-help)))) (if (and (not (equal (cadr decor) :bound)) name) (\` (idris-ref (\, (cadr name)) keymap (\, (idris-make-ref-menu-keymap (cadr name))))) nil)) nil)) (\,@ (if mousable-face (list (quote mouse-face) mousable-face) nil)) face (\, (append implicit-face decor-face))))))

The buffer still acceps input, but it repeats the message every time, and the display is weird:

Welcome to Idris REPL!
Idris> 
*bug83> 1 + 1
2 : Integer1
1 : Integer3 * 3
9 : Integer

I get the same behaviour if I put the 1 + 1 in the file, open it, and type C-c C-l.

hannesm commented 10 years ago

@fhars could you please update and check whether it works better (once melpa updated its package); and report here?

fhars commented 10 years ago

Warnings are down to

Entering directory `/home/hars/.emacs.d/elpa/idris-mode-20140223.1330/'
idris-commands.el:308:1:Warning: Unused lexical argument `name'

Compiling file /home/hars/.emacs.d/elpa/idris-mode-20140223.1330/idris-common-utils.el at Mon Feb 24 08:19:30 2014

In end of data:
idris-common-utils.el:149:1:Warning: the function `idris-make-ref-menu-keymap'
    is not known to be defined.

and the *idris-repl* buffer seems to work as expected. Thanks everyone, now on to trying to understand idris itself before it goes too mainstream :-).

hannesm commented 10 years ago

@fhars can we close this issue now, since the installation via melpa works fine for you?

fhars commented 10 years ago

Oh, sorry, yes, of course.