-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build flag to disable Lua and/or all C bits #5164
Comments
See #4535 - there's a list there of all the cbits in our transitive dependencies. It's hopeless to disable them all. |
Perhaps it's worth considering a flag to disable lua support. However, I believe it's considered bad practice to have your API change depending on the settings of cabal flags. Maybe it could be possible to keep the same API but raise an exception if lua support is not compiled in? |
I've played with this for a bit. The only way to make this work is to move all occurrences of the If the goal is to keep exposing "raw" pandoc Lua functionality, then one solution could be to leverage finer-grained library packages. E.g., having a pandoc-core package would make it possible to write a pandoc-core-lua and pandoc-core-nolua packages, which would then be used by pandoc proper. Cabal 2 supports having multiple libraries in the same cabal file, and finer grained modularity could solve a lot of portability issues. But there are obvious and undeniable costs in complexity and maintenance to this approach. The issue seems to be of low priority now that the hslua cross-compilation issue has been resolved. Should we close this for now in favor of #4535? |
I'm in favor of closing this if there isn't an urgent need for it. |
Prompted by hslua/hslua#73. Platform-independent support for hslua is sometimes tricky, and it can become an issue for porting efforts, e.g. hslua/hslua#67. Naturally, I'd rather see the underlying issues resolved, so this is only a stop-gap measure.
A flag to disable all C bits might, on the other hand, be helpful also to people trying to compile pandoc with GHCJS. That's much more involved, so disabling Lua would only be a first step.
The text was updated successfully, but these errors were encountered: