Skip to content

Remove Ref instance #15

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

Merged
merged 1 commit into from
Dec 17, 2014
Merged

Remove Ref instance #15

merged 1 commit into from
Dec 17, 2014

Conversation

garyb
Copy link
Member

@garyb garyb commented Dec 17, 2014

For release as v0.2.0

@paf31
Copy link
Contributor

paf31 commented Dec 17, 2014

:shipit:

garyb added a commit that referenced this pull request Dec 17, 2014
@garyb garyb merged commit df0327e into master Dec 17, 2014
@garyb
Copy link
Member Author

garyb commented Dec 17, 2014

Now I have 21 dependants to update. Doh :)

@garyb garyb deleted the no-ref branch December 17, 2014 20:44
@paf31
Copy link
Contributor

paf31 commented Dec 17, 2014

Oh man...

@garyb
Copy link
Member Author

garyb commented Dec 17, 2014

I'm going to try and generate a dependency graph for purescript and purescript-contrib first, it's something that would be very useful to see anyway.

@garyb
Copy link
Member Author

garyb commented Dec 17, 2014

Oh dear
deps

@paf31
Copy link
Contributor

paf31 commented Dec 17, 2014

I like how @Fresheyeball is keeping his own sane connected component over there on the right.

@paf31
Copy link
Contributor

paf31 commented Dec 17, 2014

In fairness, I think this isn't the best layout. Something which represents the topological sort would probably work better IMO.

@garyb
Copy link
Member Author

garyb commented Dec 17, 2014

Yeah, that's just what GraphViz came up with for https://gist.github.com/garyb/8c662a5194775f7bf514

@paf31
Copy link
Contributor

paf31 commented Dec 17, 2014

A little less crowded after tred:

2 dot

@garyb
Copy link
Member Author

garyb commented Dec 18, 2014

Alright, It actually looks like bumping foldable-traversable is going to mean bumping:

purescript-angular
purescript-arb-instances
purescript-argonaut
purescript-bifunctors
purescript-coproducts
purescript-drawing
purescript-foreign
purescript-free
purescript-generics
purescript-jquery
purescript-lazy
purescript-lists
purescript-maps
purescript-mongodbf
purescript-node-fs
purescript-parsing
purescript-pattern-arrows
purescript-quickcheck
purescript-string-parsers
purescript-yaml

That includes transitive dependencies.

edit: This list is out of date, see #15 (comment)

@garyb
Copy link
Member Author

garyb commented Dec 18, 2014

Here's my extremely hacked together script for finding all the dependency relationships, etc:

https://gist.github.com/garyb/bd5aafcf6977fc8e4dde

I should have used a real language... but anyway, you can run that and pass an argument to get transitive dependencies (assuming my findDependencies is correct), so like node go.js purescript-foldable-traversable.

@Fresheyeball
Copy link

Is there a way you can send me the raw data? I've been using a tool to monitor this within my packages, it may be of intereset to you. https://www.versioneye.com/user/projects/54722c968101065aaf000981/visual

@Fresheyeball
Copy link

Also, just noting, the arrows are pointing in the opposite direction.

@garyb
Copy link
Member Author

garyb commented Dec 18, 2014

You could just run the script I linked, it takes all of 15 seconds to run ;)

But here's the graph.json it outputs: https://gist.github.com/garyb/d2d89cff90c649604ef1

@garyb
Copy link
Member Author

garyb commented Dec 20, 2014

Since we're about to make a bunch of releases for this, would it make sense to take this opportunity to move the instances out to the data types instead? So have the Either instances in purescript-either, etc.

@paf31
Copy link
Contributor

paf31 commented Dec 20, 2014

Is there any benefit to doing so?

@garyb
Copy link
Member Author

garyb commented Dec 20, 2014

Well at one point when we were talking about how package relationships should work, you favoured data types depending on classes where possible.

Also it might mean that people don't keep missing operations for Array that are already available via purescript-foldable-traversable, as you don't get them by default when adding the purescript-arrays dependency.

@paf31
Copy link
Contributor

paf31 commented Dec 20, 2014

Hmm, good point. It seems like a big change though. Also, you don't think it would lead to any cyclic dependencies? Would this package be standalone after the change?

@garyb
Copy link
Member Author

garyb commented Dec 20, 2014

It would just have a dependency on purescript-control which is standalone, as currently we do supply those instances in purescript-arrays, purescript-maybe, etc. So for that reason I don't think we'd have any cycles either?

@garyb
Copy link
Member Author

garyb commented Dec 20, 2014

Ok, if we make "some" changes to the dependency hierarchy, a tred-reduction can look like this:
deps1

Which seems pretty sensible. That involves changing to the following:

  "purescript-arrays" -> "purescript-foldable-traversable"
  "purescript-either" -> "purescript-foldable-traversable"
  "purescript-maybe" -> "purescript-foldable-traversable"
  "purescript-tuples" -> "purescript-foldable-traversable"
  "purescript-foldable-traversable" -> "purescript-control"
  "purescript-monoid" -> "purescript-foldable-traversable"
  "purescript-maybe" -> "purescript-monoid"
  "purescript-arrays" -> "purescript-monoid"
  "purescript-maybe" -> "purescript-enums"
  "purescript-tuples" -> "purescript-enums"
  "purescript-either" -> "purescript-enums"
  "purescript-strings" -> "purescript-enums"
  "purescript-tuples" -> "purescript-bifunctors"
  "purescript-either" -> "purescript-bifunctors"
  "purescript-const" -> "purescript-bifunctors"
  "purescript-arrays" -> "purescript-generics"
  "purescript-either" -> "purescript-generics"
  "purescript-maybe" -> "purescript-generics"
  "purescript-strings" -> "purescript-generics"
  "purescript-tuples" -> "purescript-generics"
  "purescript-arrays" -> "purescript-unfoldable"
  "purescript-tuples" -> "purescript-unfoldable"
  "purescript-maybe" -> "purescript-unfoldable"

Which as you can see is purely reversing the relationships between data types and classes. There are still plenty of modules where this is impossible, but at least it removes the tangle between "low level" typeclasses and data types.

@paf31
Copy link
Contributor

paf31 commented Dec 20, 2014

Looks good to me 👍

@garyb
Copy link
Member Author

garyb commented Jan 10, 2015

We talked about this on IRC at the time, but for future reference if we look back at this post - changing the dependencies to what I proposed above was abandoned as it doesn't really work out.

@garyb
Copy link
Member Author

garyb commented Jan 10, 2015

Alright, it turns out my last script was only pulling back the first page of repos for the orgs, so it was a little incomplete. Here's the revised list:

  • purescript-angular
  • purescript-arb-instances
  • purescript-argonaut
  • purescript-bifunctors
  • purescript-channels
  • purescript-const
  • purescript-coproducts
  • purescript-distributive
  • purescript-drawing
  • purescript-foreign
  • purescript-free
  • purescript-generics
  • purescript-graphs
  • purescript-handlebars
  • purescript-identity
  • purescript-inject
  • purescript-jquery
  • purescript-lazy
  • purescript-lens
  • purescript-lists
  • purescript-machines
  • purescript-maps
  • purescript-mongodbf
  • purescript-node-fs
  • purescript-parsing
  • purescript-pattern-arrows
  • purescript-quickcheck
  • purescript-sammy
  • purescript-sets
  • purescript-streams
  • purescript-string-parsers
  • purescript-strongcheck
  • purescript-task
  • purescript-transformers
  • purescript-yaml
  • purescript-yargs
  • purescript-yoneda

@garyb
Copy link
Member Author

garyb commented Jan 10, 2015

A slightly more helpful formulation:

purescript-angular
    purescript-transformers
purescript-arb-instances
    purescript-quickcheck
purescript-argonaut
    purescript-lens
    purescript-maps
    purescript-sets
purescript-bifunctors
    purescript-const
purescript-channels
    purescript-lazy
    purescript-transformers
purescript-const
purescript-coproducts
purescript-distributive
    purescript-identity
purescript-drawing
    purescript-generics
purescript-foreign
purescript-free
    purescript-coproducts
    purescript-inject
    purescript-lazy
    purescript-transformers
purescript-generics
purescript-graphs
    purescript-maps
    purescript-sets
purescript-handlebars
    purescript-jquery
purescript-identity
purescript-inject
    purescript-coproducts
purescript-jquery
    purescript-foreign
purescript-lazy
purescript-lens
    purescript-const
    purescript-distributive
    purescript-identity
purescript-lists
    purescript-lazy
    purescript-transformers
purescript-machines
purescript-maps
purescript-mongodbf
    purescript-foreign
    purescript-free
purescript-node-fs
    purescript-foreign
purescript-parsing
    purescript-identity
    purescript-transformers
purescript-pattern-arrows
    purescript-transformers
purescript-quickcheck
purescript-sammy
    purescript-jquery
purescript-sets
    purescript-maps
purescript-streams
    purescript-task
purescript-string-parsers
purescript-strongcheck
    purescript-free
    purescript-lazy
    purescript-lists
    purescript-machines
    purescript-transformers
purescript-task
    purescript-transformers
purescript-transformers
    purescript-identity
purescript-yaml
    purescript-foreign
purescript-yargs
    purescript-foreign
purescript-yoneda
    purescript-transformers

The indented stuff are the things that each module depends on that also appear in the list, so for example, we can see that purescript-parsing shouldn't be released/bumped until purescript-identity and purescript-transformers have also been done.

@garyb
Copy link
Member Author

garyb commented Jan 10, 2015

Alright, I've re-released or submitted PRs for almost everything now aside from:

  • purescript-argonaut, as this needs a new release of purescript-lens which I did as PR
  • purescript-strongcheck, as this needs a new release of purescript-machines, PR again
  • purescript-streams and purescript-task, as these things are hanging around in contrib unfinished (I think?) and nobody apart from @puffnfresh seems to know anything about them!
  • purescript-yaml not sure what the deal with this one is it seems we have a fork in contrib as well as @Fresheyeball's own version still being out there.

@puffnfresh
Copy link

@garyb purescript-streams and purescript-task are not complete. Someone has hopefully come up with a sensible trampolining solution since, so that task is made redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants