nikita-volkov/stm-containers

stm-containers-0.2.15 build failures with primitive-0.6.2

Opened this issue · 6 comments

It seems there are some conflicts with new exports from Data.Primitive.Array. I recommend qualified imports to avoid issues like this.

[ 2 of 11] Compiling STMContainers.SizedArray ( library/STMContainers/SizedArray.hs, dist/
build/STMContainers/SizedArray.o )

library/STMContainers/SizedArray.hs:27:10: error:
    Ambiguous occurrence <E2><80><98>newArray<E2><80><99>
    It could refer to either <E2><80><98>Prelude.newArray<E2><80><99>,
                             imported from <E2><80><98>STMContainers.Prelude<E2><80><99> at library/STMContainers/SizedArray.hs:3:1-59
                             (and originally defined in <E2><80><98>Foreign.Marshal.Array
<E2><80><99>)
                          or <E2><80><98>Data.Primitive.Array.newArray<E2><80><99>,
                             imported from <E2><80><98>Data.Primitive.Array<E2><80><99> at library/STMContainers/SizedArray.hs:4:1-27

library/STMContainers/SizedArray.hs:59:11: error:
    Ambiguous occurrence <E2><80><98>newArray<E2><80><99>
    It could refer to either <E2><80><98>Prelude.newArray<E2><80><99>,
                             imported from <E2><80><98>STMContainers.Prelude<E2><80><99> at library/STMContainers/SizedArray.hs:3:1-59
                             (and originally defined in <E2><80><98>Foreign.Marshal.Array
<E2><80><99>)
                          or <E2><80><98>Data.Primitive.Array.newArray<E2><80><99>,
                             imported from <E2><80><98>Data.Primitive.Array<E2><80><99> at library/STMContainers/SizedArray.hs:4:1-27

library/STMContainers/SizedArray.hs:68:11: error:
    Ambiguous occurrence <E2><80><98>newArray<E2><80><99>
    It could refer to either <E2><80><98>Prelude.newArray<E2><80><99>,
                             imported from <E2><80><98>STMContainers.Prelude<E2><80><99> at library/STMContainers/SizedArray.hs:3:1-59
                             (and originally defined in <E2><80><98>Foreign.Marshal.Array
<E2><80><99>)
                          or <E2><80><98>Data.Primitive.Array.newArray<E2><80><99>,
                             imported from <E2><80><98>Data.Primitive.Array<E2><80><99> at library/STMContainers/SizedArray.hs:4:1-27

library/STMContainers/SizedArray.hs:77:11: error:
    Ambiguous occurrence <E2><80><98>newArray<E2><80><99>
    It could refer to either <E2><80><98>Prelude.newArray<E2><80><99>,
                             imported from <E2><80><98>STMContainers.Prelude<E2><80><99> at library/STMContainers/SizedArray.hs:3:1-59
                             (and originally defined in <E2><80><98>Foreign.Marshal.Array
<E2><80><99>)
                          or <E2><80><98>Data.Primitive.Array.newArray<E2><80><99>,
                             imported from <E2><80><98>Data.Primitive.Array<E2><80><99> at library/STMContainers/SizedArray.hs:4:1-27

It seems I was wrong about the cause; primitive-0.6.1.0 exports newArray as well. I don't quite understand how this build was passing previously.

I suspect, this is due to a conflicting release of "base-prelude", which is already deprecated. Just update the the Hackage index and everything should go fine.

Well, I'm still seeing this failure after giving it a shot today. Any other hints @nikita-volkov?

Since this is LTS the new major base-prelude won't be picked up, @lwm you should add a base-prelude < 1.0.2 constraint to the lts build.

Better base-prelude >= 1.2

LTS 8 already contains base-prelude 1.0.*