pelotom / purescript-d3

PureScript bindings for D3
MIT License
87 stars 19 forks source link

Unable to use purescript-d3 on current purescript #20

Open arafangion opened 8 years ago

arafangion commented 8 years ago

When I do the following:

pulp --version
Pulp version 9.0.1 psc version 0.9.1 using /usr/local/bin/psc

pulp init # For a new project bower install purescript-d3 --save

I get conflicting dependencies as follows:

Unable to find a suitable version for purescript-eff, please choose one by typing one of the >numbers below: 1) purescript-eff#^0.1.0 which resolved to 0.1.2 and is required by purescript-st#0.1.1 2) purescript-eff#^1.0.0 which resolved to 1.0.0 and is required by purescript-console#1.0.0

And neither of these options work.

I suspect that using the master branch will work, however bower currently seems to use v0.7.0, which still exhibits this issue.

Update: Yes, using the master build does work, although it builds with 17 warnings, all of which are much the same:

Warning 1 of 17:

in module Graphics.D3.Interpolate at /Users/arahael/dev/tmp/bower_components/purescript-d3/src/Interpolate.purs line 8, column 1 - line 8, column 28

No type declaration was provided for the top-level declaration of ffi. It is good practice to provide type declarations as a form of documentation. The inferred type of ffi was:

 forall a. Array String -> String -> a

in value declaration ffi

See https://github.com/purescript/purescript/wiki/Error-Code-MissingTypeDeclaration for more information, or to contribute content related to this warning.

arafangion commented 8 years ago

I am too new to purescript, javascript, or d3 in general to fix this myself, however I'm happy to consider writing a patch if someone is willing to critically review it and fix the inevitable mistakes.

The actual fixes seem to involve mainly a simple matter of adding types to all the 17 functions.

This also probably depend the status of #17 however I wouldn't know what the impact of those changes would be here. Some guidance would be appreciated.

nwolverson commented 7 years ago

Other than the warnings, think this just needs tagged as release, seems to be working fine for me on 0.9.x - @pelotom would you mind tagging? Maybe also worth pushing to pursuit.

pelotom commented 7 years ago

Tagged the latest. I'm happy to take a PR which addresses the warnings.

pelotom commented 7 years ago

Also published to Pursuit

BebeSparkelSparkel commented 4 years ago

can this be added to https://github.com/purescript/package-sets

dustin commented 3 years ago

I think they may have broken it again. I was hoping to learn purescript this evening with d3 as the first library I wanted to use, but once I got it loaded as a package set, it failed with:

  at .spago/d3/v0.9.0/src/Time.purs:2:1 - 2:2 (line 2, column 1 - line 2, column 2)

    Unable to parse module:
    Illegal whitespace character U+0009