Comments (1)
Another interesting quirk, which has me completely stymied: if I add the 'resources' directory to package.path
, and then change require('resources/fenneltest')
to simply require('fenneltest')
, it fails as it tries to parse a lua script instead of a fennel script.
Here is the code I am using to change package.path
from C++:
auto package_path = lua["package"]["path"].get<std::string>();
auto resources_path = std::filesystem::current_path() / "resources";
lua["package"]["path"] = package_path
+ ";" + (resources_path / "?.lua").string()
+ ";" + (resources_path / "?.fnl").string();
I have no idea why simply changing the path would cause it to be interpreted as lua or as fennel, but it might be related to the above issue.
from sol2.
Related Issues (20)
- Crash during destruction when using meta_function::new_index and coroutines
- Accessing table field with the wrong user type causes a segmentation fault
- Cannot directly bind b2Vec2 to a table entry HOT 1
- SOL_BASE_CLASSES / SOL_DERIVED_CLASSES should be mentioned in the documentation
- Generating definition files
- Why sol3 is slower than Luabridge3 when both using LuaJIT, HOT 1
- add_package_loader without lua_CFunction HOT 1
- Handling opaque C pointers
- confusing behaviour of environments for lua > 5.2 HOT 1
- Error in emplace method
- const correctness of C++ object passed to sol::protected_function
- Preserving ordering in sol2 tables and converting to ordered JSON HOT 2
- Getting compilation error when registering type HOT 3
- compilation issue: no member named 'construct' HOT 4
- Add mirrors for downloading lua
- SOL_SAFE_FUNCTION_CALLS does not recognize derived classes HOT 5
- Clang 18 support HOT 1
- How to secure such a pointer?
- Impossible to create an inner usertype/enum in a usertype
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sol2.