Skip to content

Conversation

@BebeSparkelSparkel
Copy link
Contributor

@BebeSparkelSparkel BebeSparkelSparkel commented Aug 11, 2018

Updated getting started for psc-package instead of bower

Caused me lots of frustration so hope this makes it easier for others.

Related issue #187

#### Setting up the Development Environment

PureScript's core libraries are configured to use the [Pulp](https://github.com/purescript-contrib/pulp) build tool, and packages are available in the [Bower registry](http://bower.io/search/?q=purescript-).
PureScript's core libraries are configured to use the [Pulp](https://github.com/purescript-contrib/pulp) build tool, and packages are installed with [psc-package](https://psc-package.readthedocs.io/). You can find the packages curated packages on [Pursuit](https://pursuit.purescript.org/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can find the packages curated packages on [Pursuit (https://pursuit.purescript.org/)

This seems confusing, that it would make people think that all Pursuit packages are in package sets. Also that package sets aren't actually curated, just community contributed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbrownson Please advise what would be a more accurate statement

@hdgarrood
Copy link
Collaborator

I’m not sure we should position psc-package as the default option, because many packages aren’t available in package sets, and because it’s a relatively uncommon model (whereas people are more likely to have come across something vaguely resembling bower before).

@BebeSparkelSparkel
Copy link
Contributor Author

I guess my problem with bower was that I couldn't even install purescript-config and the default prelude for version 0.12.0 without having to manually/randomly pick the package versions

Unable to find a suitable version for purescript-prelude, please choose one by typing one of the numbers below:
    1) purescript-prelude#^3.0.0 which resolved to 3.3.0 and is required by purescript-config#0.0.6, purescript-control#3.3.1, purescript-eff#3.2.1, purescript-either#3.2.0, purescript-functions#3.0.0, purescript-invariant#3.0.0, purescript-leibniz#4.1.0, purescript-maybe#3.1.0, purescript-newtype#2.0.0, purescript-node-streams#3.3.0, purescript-nonempty#4.3.0, purescript-posix-types#3.0.0, purescript-proxy#2.1.0, purescript-tuples#4.1.0
    2) purescript-prelude#^4.0.0 which resolved to 4.1.0 and is required by purescript-argonaut-core#4.0.1, purescript-arrays#5.0.0, purescript-bifunctors#4.0.0, purescript-console#4.1.0, purescript-const#4.0.0, purescript-contravariant#4.0.0, purescript-control#4.1.0, purescript-datetime#4.0.0, purescript-distributive#4.0.0, purescript-effect#2.0.0, purescript-either#4.0.0, purescript-enums#4.0.0, purescript-exceptions#4.0.0, purescript-foldable-traversable#4.0.0, purescript-foreign#5.0.0, purescript-foreign-object#1.0.0, purescript-form-urlencoded#4.0.1, purescript-functions#4.0.0, purescript-functors#3.0.1, purescript-gen#2.1.0, purescript-http-methods#4.0.2, purescript-identity#4.0.0, purescript-integers#4.0.0, purescript-invariant#4.1.0, purescript-lazy#4.0.0, purescript-lists#5.0.0, purescript-maybe#4.0.0, purescript-media-types#4.0.1, purescript-newtype#3.0.0, purescript-nonempty#5.0.0, purescript-ordered-collections#1.0.0, purescript-orders#4.0.0, purescript-parallel#4.0.0, purescript-psci-support#4.0.0, purescript-refs#4.1.0, purescript-st#4.0.0, purescript-strings#4.0.0, purescript-tailrec#4.0.0, purescript-transformers#4.1.0, purescript-tuples#5.0.0, purescript-unfoldable#4.0.0
    3) purescript-prelude#^4.1.0 which resolved to 4.1.0 and is required by rm2qb

Prefix the choice with ! to persist it to bower.json

? Answer 3

@hdgarrood
Copy link
Collaborator

I accept that the UI could be a lot better in that case, but that is it working as expected; there does not appear to be a version of purescript-config which can work alongside version 4.1.0 of the prelude. Therefore switching to psc-package wouldn't help you there: purescript-config most likely wouldn't even make it into any 0.12.x package set at all in its current state.

@BebeSparkelSparkel
Copy link
Contributor Author

So there is no way to access env vars right now without downgrading to 0.11.7

@hdgarrood
Copy link
Collaborator

@BebeSparkelSparkel
Copy link
Contributor Author

Thanks

Is https://purescript-users.ml/t/working-with-0-11-7-in-a-0-12-world/180 still valid or is it out of date at this point?

@hdgarrood
Copy link
Collaborator

A lot more of the ecosystem has caught up by this point in comparison to when that was written. I think I’d probably recommend 0.12 unless you have a specific reason to use 0.11.7.

@hdgarrood
Copy link
Collaborator

I think switching the getting started guide to use psc-package rather than bower is potentially worth considering but needs more discussion first -- for instance, I'd argue we'd also need to a) explain the differences between the psc-package model vs the more standard centralised package repo + dependency solving approach which bower (and most other package managers take) and b) decide on and commit to a standard way of shipping the psc-package binary. Suggest closing this (and potentially also opening a new issue for this discussion)?

@JordanMartinez
Copy link
Contributor

JordanMartinez commented Nov 27, 2018

I'd argue we'd also need to a) explain the differences between the psc-package model vs the more standard centralised package repo + dependency solving approach which bower (and most other package managers take)

@hdgarrood I've already done most of this (aside from the dependency solving approach Bower uses) in the related page in my learning repo

@hdgarrood
Copy link
Collaborator

@JordanMartinez That page looks good but on reflection I'm not sure it's appropriate to expose all that to someone who is just trying to get something working during their first experience with the language. I'm going to close this PR for now, but feel free to open issues if you want to revive this discussion.

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