kuribas / cubicbezier

Haskell library for manipulating cubic bezier curves
BSD 3-Clause "New" or "Revised" License
18 stars 2 forks source link

Build failure with matrices 0.5.0 #9

Closed DanBurton closed 5 years ago

DanBurton commented 5 years ago

Build failure as seen on the Stackage build server:

Geom2D/CubicBezier/Numeric.hs:218:20: error:
    Not in scope: ‘G.unsafeTakeRow’
    Perhaps you meant ‘V.unsafeTake’ (imported from Data.Vector.Unboxed)
    Module ‘Data.Matrix.Generic’ does not export ‘unsafeTakeRow’.
    |
218 |                   (G.unsafeTakeRow m i)
    |                    ^^^^^^^^^^^^^^^

I was able to reproduce this locally like so:

stack unpack cubicbezier-0.6.0.5 && cd cubicbezier-0.6.0.5
edit stack.yaml # add the following stack.yaml
stack build --test --bench --no-run-benchmarks --fast
# stack.yaml
resolver: nightly-2018-12-20
extra-deps:
- fast-math-1.0.2
- matrices-0.5.0
tkvogt commented 5 years ago

Can you upload this to hackage or add another maintainer to hackage?

zac-garby commented 5 years ago

As far as I can tell this fix is as easy as changing to matrices 0.4.1. IMHO, this issue is quite important as the popular "diagrams" library relies on this.

kuribas commented 5 years ago

I'll look at it this evening

byorgey commented 5 years ago

@kuribas you already merged a fix for this issue (#10). All that is needed is to upload to Hackage.

zac-garby commented 5 years ago

Unless I'm missing something (and I very well could be), this doesn't fix the problem and in fact is the very commit which introduces it. The docs for version 0.4.1 (the version before that commit) is here, and as you can see it exports the unsafeTakeRow function, whereas version 0.5.0 only exports the safe counterpart takeRow.

kuribas commented 5 years ago

In fact this code isn't used, so I could remove the dependency.

kuribas commented 5 years ago

closing it since the package builds with matrices 0.5.0

byorgey commented 5 years ago

@zac-garby No, that commit changed the import from Data.Matrix.Generic to Data.Matrix.Class, which does export unsafeTakeRow. That commit certainly did not introduce the problem, the problem was just that the old code didn't work with version 0.5.0 of matrices due to the changes in exports. After that commit, cubicbezier now only works with version 0.5.0 of matrices (which seems fine).

@kuribas Thanks for uploading!