Skip to content
This repository has been archived by the owner on Sep 3, 2023. It is now read-only.

Error when autoloading .tim file: Key not present in Dictionary: chunk_first #12

Open
sjl opened this issue Apr 5, 2014 · 5 comments
Open

Comments

@sjl
Copy link

sjl commented Apr 5, 2014

So after #11 I moved my .tim code into autoload/ and added a .vim stub in plugin/, and now I get the following error when I run the stubbed command (which calls the TimL code):

Error detected while processing function <SNR>72_autoload..timl#loader#source..timl#compiler#build..<SNR>130_emit..timl#call..326..timl#type#apply..timl#lazy_seq#seq..<SNR>132_val..t
iml#call..468..<SNR>107_predicate..timl#coll#chunked_seqp:
line    1:
E716: Key not present in Dictionary: chunk_first)
E116: Invalid arguments for function timl#type#canp(a:coll, g:timl#core.chunk_first)
E15: Invalid expression: timl#type#canp(a:coll, g:timl#core.chunk_first)
Error detected while processing function <SNR>72_autoload:
line   10:
E170: Missing :endfor
Press ENTER or type command to continue

I probably fucked something up, but it'd be nice to have a friendlier error.

@sjl
Copy link
Author

sjl commented Apr 5, 2014

Also, this .tim file works fine if I put it in a buffer and :source % it, so there's probably some weird autoload ordering issues here.

@tpope
Copy link
Owner

tpope commented Apr 5, 2014

Definitely some sort of load order issue. chunked-seq? can't find chunk-first. Someone else reported the exact same error that went away after clearing their cache.

I don't have time to dig in right now, but you should share your :scriptnames, which might give me some clues later.

@tpope tpope closed this as completed Apr 5, 2014
@tpope tpope reopened this Apr 5, 2014
@sjl
Copy link
Author

sjl commented Apr 5, 2014

@tpope
Copy link
Owner

tpope commented Apr 5, 2014

I don't understand why that is missing all the timl autoload files, even the ones in the error message.

@justinj
Copy link
Contributor

justinj commented Apr 10, 2014

I noticed if I ran something in a TLrepl before trying to run one of my commands I wouldn't get this error, and I eventually found that if I put:

let code = timl#cons#create(timl#symbol#intern('do'), timl#reader#read_string_all("1"))
call timl#loader#eval(code)

at the top of my foo.vim file everything would run OK. From what I can tell if I remove any of the elements of this it stops fixing the problem. The code is at justinj/vim-relax if that helps you debug at all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants