Code Monkey home page Code Monkey logo

Comments (6)

rktjmp avatar rktjmp commented on May 27, 2024 2

I'll hold this open for now until I can make sure its fixed inside Hotpot too, have to review how we handle macro searching to make sure we are using the new code. I think it should be fine but it's been a few months. We run a bit of custom stuff to makes sure macro files are tracked as a dependency for cache invalidation which requires a one-line patch to fennel.lua to test.

from hotpot.nvim.

datwaft avatar datwaft commented on May 27, 2024 1

Interesting, I will do some more testing and open an issue on the Fennel repo.

Thanks for you help!

from hotpot.nvim.

datwaft avatar datwaft commented on May 27, 2024 1

I was looking to check another issue and I saw that this issue was still open. At the moment it has worked perfectly so I think this issue can be closed.

from hotpot.nvim.

rktjmp avatar rktjmp commented on May 27, 2024

That error is from Fennel directly, seems that it behaves the same outside of Hotpot.

--no-compiler-sandbox == compilerEnv = _G and --globals "*" == allowedGlobals = false from my interpretation of the docs.

~/pr/bu/hotpot-issue_48/co/fnl main ⚡
λ ./fennel --no-compiler-sandbox --globals "*" -c core/init.fnl
Compile error in core/init.fnl:7
  Compile error in ./core/macro-utils.fnl:9
  symbols may only be used at compile time

      (= `fn (. x 1))
          ^^
* Try moving this to inside a macro if you need to manipulate symbols/lists.
* Try using square brackets instead of parens to construct a table.
stack traceback:
	[C]: in function 'error'
	./fennel:3363: in function 'fennel.friend.assert-compile'
	./fennel:2211: in function 'fennel.compiler.assert'
	./fennel:3209: in function 'fennel.compiler.do-quote'
	(...tail calls...)
	./fennel:2681: in function <./fennel:2680>
	(...tail calls...)
	./fennel:1697: in function <./fennel:1692>
	(...tail calls...)
	./fennel:2681: in function <./fennel:2680>
	(...tail calls...)
	./fennel:1573: in function <./fennel:1568>
	(...tail calls...)
	./fennel:2681: in function <./fennel:2680>
	(...tail calls...)
	./fennel:1573: in function <./fennel:1568>
	(...tail calls...)
	...	(skipping 4 levels)
	[C]: in function 'require'
	./core/macro-module.fnl:1: in main chunk
	(...tail calls...)
	./fennel:2020: in field 'require-macros'
	src/fennel/macros.fnl:288: in function <src/fennel/macros.fnl:283>
	(...tail calls...)
	[C]: in function 'xpcall'
	./fennel:2657: in function 'fennel.compiler.macroexpand'
	./fennel:2837: in function 'fennel.compiler.compile1'
	./fennel:3068: in function 'fennel.compiler.compile-stream'
	(...tail calls...)
	[C]: in function 'xpcall'
	./fennel:5660: in function <./fennel:5646>
	(...tail calls...)
	[C]: in ?

(import-macros {: if-fn-hello-else-bye} :core.macro-module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* Try moving this to inside a macro if you need to manipulate symbols/lists.
* Try using square brackets instead of parens to construct a table.

~/pr/bu/hotpot-issue_48/co/fnl main ⚡
λ

from hotpot.nvim.

datwaft avatar datwaft commented on May 27, 2024

Opened the following issue on the Fennel repository: bakpakin/Fennel#406

from hotpot.nvim.

datwaft avatar datwaft commented on May 27, 2024

bakpakin/Fennel#406 is fixed now 🎉

from hotpot.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.