-
Notifications
You must be signed in to change notification settings - Fork 101
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
Pandoc haskell filter #375
Conversation
convert-current-package previously did not work if the user had opened a project, then was visiting some file outside the project.
4cc4d62
to
3290444
Compare
f8500e6
to
8ed57f7
Compare
8ed57f7
to
1f05d3d
Compare
59cb687
to
54884aa
Compare
@@ -0,0 +1,50 @@ | |||
name: rustdoc-to-org | |||
version: 0.1.0.0 | |||
github: "githubuser/rustdoc-to-org" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we should fix the various things in the file...
Is it a static binary ? I'm concerned if it will work on all distributions. |
It should be, except for glibc, which I painfully realized last night before going to bed. It seems possible to statically link musl instead though, I will look into it as that part is essential. |
One option is to use this project to build musl based executable: https://github.com/fpco/alpine-haskell-stack But it seems it still doesn't support GHC 8.10.7 (since you are using Stackage LTS 18.23), but supports 8.10.6. But I believe adding support for 8.10.7 shouldn't be hard.
Yeah, I think distributing it via github releases would be probably better. :-) |
We can use different versions of GHC, so no worries there. I'll try tonight/in the coming days. |
As I was looking at this I found rust-lang/rust#76578 |
I gave it a try this week and kind of ran into issues, listed here: https://www.reddit.com/r/haskell/comments/siktmp/building_a_standalone_haskell_binary_with/ |
I haven't looked the error message in detail, but if you are looking for an example - here is a Dockerfile I create to create static binary of Haskell's tldr program: https://github.com/psibi/tldr-hs/blob/master/Dockerfile Do you face the same issue if you try the same method ? |
That seems like a much more robust solution, thank you! How do you run it? When I clone the repo and write
|
@samhedin You can see that the CI script builds the image: https://github.com/psibi/tldr-hs/blob/master/.azure/azure-linux-musl.yml#L16 And finally it produces a musl based binary here: https://github.com/psibi/tldr-hs/releases/tag/v0.9.2 The idea is that you build the source code inside the docker image. You can even do it in a much better than I have done by using a multi stage docker build and making it much faster. |
As you may have noticed, my energy and time for this come sporadically. The reason is that I don't use Rust anymore, and haven't for a very long time. |
Pandoc filters are primarily written in Haskell or Lua. The first version of the rustic-doc filter was written in Haskell. The first comments I received were that I should port the filter to lua, to make it easier for contributors as lua was seen as an easier language than Haskell. I listened to the advice and ported it to lua, but in hindsight, it was a mistake.
The lua filter is way messier and harder to interpret, and it has made working in the filter rather painful. This PR is restoring the old Haskell filter, and making some related changes along the way.