Giter Club home page Giter Club logo

Comments (17)

pilattebe avatar pilattebe commented on July 20, 2024 1

👌 Perfect 👌
That will happen less when GitHub Actions are enabled. I want to do it but I really have to focus on my exams right now.

Looks like GitHub Actions environment come with everything necessary:
GHC 8.10.2
Cabal 3.2.0.0
Stack 2.5.1

This issue should be closed in favor of a new one when the versioning is fixed to avoid spamming Robert

from pandoc-unicode-math.

marhop avatar marhop commented on July 20, 2024 1

Hi there, I'm still busy updating the dependency versions which requires more changes in the source code than I anticipated, so I will probably need one (or maybe two) more evenings to do it properly ... I'll get back to you as soon as possible!

from pandoc-unicode-math.

pilattebe avatar pilattebe commented on July 20, 2024 1

I've massaged the versions until it worked for me:

-- Calling this pandoc-unicode-math-to-latex would neither be pretty nor
-- backwards compatible.
executable pandoc-unicode-math
  hs-source-dirs:    src
  main-is:           UnicodeToLatex.hs
  ghc-options:       -main-is UnicodeToLatex
  build-depends:     base >= 4.13
                   , containers >= 0.6.2 
                   , pandoc-types == 1.20
                   , text
  other-modules:     MathFilter
                   , Symbols
  default-language:  Haskell2010

executable pandoc-unicode-math-from-latex
  hs-source-dirs:    src
  main-is:           LatexToUnicode.hs
  ghc-options:       -main-is LatexToUnicode
  build-depends:     base >= 4.13
                   , containers >= 0.6.2
                   , pandoc-types == 1.20
                   , pcre-heavy >= 1.0.0
                   , text
  other-modules:     MathFilter
                   , Symbols
  default-language:  Haskell2010

(I had no idea what I was doing, but hey, it works)

So here are the macOS binaries (I wasn't able to make it work with any other version of pandoc-types == 1.20):
pandoc-unicode-math-3.0-macos64.zip

from pandoc-unicode-math.

marhop avatar marhop commented on July 20, 2024

I don't have access to a MacOS computer, so I asked a friend to build binaries for me. He will see what he can do. But if you don't want to wait and decide to build from source yourself, I would gladly add your binaries to my GitHub release page. ;-)

from pandoc-unicode-math.

RobertGoulding avatar RobertGoulding commented on July 20, 2024

from pandoc-unicode-math.

pilattebe avatar pilattebe commented on July 20, 2024

Binaries for 1.2.0
pandoc-unicode-math-1.2.0-macos64.zip

But you should not trust me, I am just an otter 🦦. I suggest using GitHub Actions for automagically building binaries for Windows/Linux/Mac. I can set that up for you if you want. (Currently I've got some exams but at the end of January, I can do that)

from pandoc-unicode-math.

marhop avatar marhop commented on July 20, 2024

Great, thank you! I added the binaries to the release.

Setting up GitHub actions would definitely be nice. I haven't yet had an opportunity to figure out how to do this, so I'd be grateful for a pull request if you find the time.

from pandoc-unicode-math.

RobertGoulding avatar RobertGoulding commented on July 20, 2024

from pandoc-unicode-math.

pilattebe avatar pilattebe commented on July 20, 2024

@marhop

I may have spoken too soon, the binaries are built according to the doc (stack setup, build, install), but I was unable to use them in a project.

pandoc-unicode-math: Error in $: Incompatible API versions: encoded with [1,20] but attempted to decode with [1,17,6,1].
CallStack (from HasCallStack):
  error, called at ./Text/Pandoc/JSON.hs:106:64 in pandoc-types-1.17.6.1-6OqhlmOaK7t1wFyRc1dc2J:Text.Pandoc.JSON
Error running filter /Users/user/.local/bin/pandoc-unicode-math:
Filter returned error status 1

from pandoc-unicode-math.

pilattebe avatar pilattebe commented on July 20, 2024

I may have missed compiling flags or something, the binaries are unexpectedly small.
Screen Shot 2021-01-05 at 22 42 07

from pandoc-unicode-math.

marhop avatar marhop commented on July 20, 2024

Don't worry, that looks more like my fault. The resolver version in stack.yaml is pretty old, that probably leads to incompatible library versions. I will try to fix this tomorrow.

from pandoc-unicode-math.

pilattebe avatar pilattebe commented on July 20, 2024

Can compiling to LLVM make the binaries more portable ? https://downloads.haskell.org/~ghc/7.8.3/docs/html/users_guide/code-generators.html
That would mean a program compiled on linux would run on macOS (and vice versa) which would bypass this issue entirely
(still got to see how llvm works with pandoc but it should run fine)

from pandoc-unicode-math.

pilattebe avatar pilattebe commented on July 20, 2024

Urg ! I'm sorry, my brain bugged, I thought the last commit in December 2019 was last month and this repo was in active development.

Anyway, I'm interested in this project but I'm not sure I can do much with GitHub Actions unless I have the "collaborator" role.

from pandoc-unicode-math.

marhop avatar marhop commented on July 20, 2024

OK, so I published two new releases, one for compatibility with Pandoc 2.8 and 2.9 (release 2.0.0, this should work with your setup), and one for Pandoc 2.10 (release 3.0.0).

Please note that I also changed the build process - Stack is not necessary anymore, just Cabal (which you should have installed already if Stack works for you).

PS: Now that I think of it, you might run into problems during the build because I possibly set the version bounds in the *.cabal file too tight. It worked for me with GHC 8.8.4 but YMMV ... I'll check with GHC 8.10 in the next days. You should be able to work around this by removing all version constraints (in the build-depends field) except the one for pandoc-types though.

from pandoc-unicode-math.

pilattebe avatar pilattebe commented on July 20, 2024

like you said...

Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: pandoc-unicode-math-3.0.0 (user goal)
[__1] next goal: base (dependency of pandoc-unicode-math)
[__1] rejecting: base-4.14.0.0/installed-4.14.0.0 (conflict:
pandoc-unicode-math => base>=4.13 && <4.14)
[__1] skipping: base-4.14.1.0, base-4.14.0.0 (has the same characteristics
that caused the previous version to fail: excluded by constraint '>=4.13 &&
<4.14' from 'pandoc-unicode-math')
[__1] rejecting: base-4.13.0.0, base-4.12.0.0, base-4.11.1.0, base-4.11.0.0,
base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
(constraint from non-upgradeable package requires installed instance)
[__1] fail (backjumping, conflict set: base, pandoc-unicode-math)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, pandoc-unicode-math

from pandoc-unicode-math.

marhop avatar marhop commented on July 20, 2024

Again, two new releases, one for compatibility with Pandoc 2.8 and 2.9 (release 2.0.1), and one for Pandoc 2.10 (release 3.0.1). In both releases I relaxed the dependency version bounds, particularly the version constraints on the base library which is more or less tied to GHC versions - this was probably the main reason your build failed yesterday. So it should work now even without your changes, sorry for the mess so far!

PS: And thanks for the binary! Though I think it should be for release 2.0.0 (which depends on pandoc-types 1.20), not 3.0.0 (depends on pandoc-types 1.21). The distinction is important because the pandoc-types version determines compatibility with specific Pandoc versions:

  • pandoc-types 1.20 → Pandoc 2.8 and 2.9
  • pandoc-types 1.21 → Pandoc 2.10

If Pandoc and pandoc-types versions don't match this leads to the error you encountered above.

from pandoc-unicode-math.

pilattebe avatar pilattebe commented on July 20, 2024

Ok, I can confirm the binary were for 2.0.0. I will recompile and double check everything tomorrow.

from pandoc-unicode-math.

Related Issues (10)

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.