Olical / aniseed

Neovim configuration and plugins in Fennel (Lisp compiled to Lua)
https://discord.gg/wXAMr8F
The Unlicense
606 stars 28 forks source link

Add force option to aniseed.env.init that forces compile #27

Closed BerkeleyTrue closed 3 years ago

BerkeleyTrue commented 3 years ago

I've had this issue several times now were I'm making changes to macros and I'm trying to re-compile my whole project so I can see the result.

There is a check to see if the last modified timestamp has changed which prevents compilation of files when no changes have happened, which means I either need to blow away the lua file, or add useless comments to change timestamps.

I've got a branch of aniseed that allows me to pass force to compile the code while I'm editing for those cases where REPL won't due. Is this something you'd be ok with in the this project?

i.e.

lua require("aniseed.env").init({ force = true })
Olical commented 3 years ago

Ah this is already an option! Did I not document it :thinking: or did it not work for you? The options you pass flow through until they reach compile.file: https://github.com/Olical/aniseed/blob/b9cb8a2451623f6455e6e029259f37c8952c5bce/fnl/aniseed/compile.fnl#L30

Which takes a force key already which skips those modified checks.

BerkeleyTrue commented 3 years ago

The options don't get pass through env.init don't get passed to compile.glob

https://github.com/Olical/aniseed/blob/b9cb8a2451/fnl/aniseed/env.fnl#L16

Olical commented 3 years ago

Oh no! That should be the case, my bad. So yeah, I'm totally open to passing the opt through these layers into compile.file.

BerkeleyTrue commented 3 years ago

closed with #28