novelrt / Fabulist

A terse, flexible language and runtime for creating and executing visual novels.
6 stars 1 forks source link

Figure out dependency management solution #1

Open FiniteReality opened 2 years ago

FiniteReality commented 2 years ago

Right now, the build script requires that Lua be installed somewhere accessible to CMake; it does not use any sort of package manager like Conan.

We probably should do that.

We should probably figure out a long-term dependency management solution.

FiniteReality commented 2 years ago

N.B. I'm currently vendoring Sol in case I need to apply patches, but I'm currently undecided whether I want to continue using Sol or just write the bindings myself.

RubyNova commented 2 years ago

My 2c is that if we do it ourselves it might be easier to shape the API and its one less dependency to go wrong. We can also tailor it to work with ref-returning methods, unlike Sol2.

FiniteReality commented 2 years ago

Yeah. It's just a lot of code, and Sol affords us some level of "rapid" development and prototyping. Plus, it's intentionally designed as a somewhat leaky abstraction, so it should be fairly easy to "break out" and use the raw Lua API if we need anything fancy.

FiniteReality commented 2 years ago

Update: Due to issues with how Conan distributes Lua and Sol, I've decided for now to vendor both of these.

However, I have designed it such that we can disable the vendoring of Lua and Sol at a later point, using the following options:

Currently, the behaviour is roughly as such: FABULIST_THIRDPARTY_SOL FABULIST_THIRDPARTY_LUA Behaviour
OFF OFF No third party libraries used. Build system will assume presence of sol2 target.
OFF ON Known to be broken: Build system will assume presence of sol2 target and then throw an error.
ON ON Build system will use vendored third-party libraries. sol2 target depends on lua target.
FiniteReality commented 2 years ago

I've yeeted Sol and now we always vendor Lua. You can specify FABULIST_LUA_VERSION to switch between 5.1, 5.2, 5.3 and 5.4.

Pheubel commented 2 years ago

With the removal of conan from NovelRT, is the title of this issue still accurate?

RubyNova commented 2 years ago

Conan is dead across all our projects. We should probably update this ticket to reflect the new approach, once we have trialled it in NovelRT fully and worked out the issues with it.