Intro to psc-package

Intro to psc-package

Cbed6f201f9a0e735e5660d118c6662d?s=128

Phil Freeman

June 28, 2017
Tweet

Transcript

  1. Intro to psc-package Phil Freeman

  2. What is psc-package? “psc-package is an executable which helps manage

    PureScript dependencies using Git.” Alternatively, it is: • A Bower replacement, and/or • A Pulp replacement • The default package manager for pure11/purerl (depending on your workflow)
  3. Quick Start Guide $ psc-package init Initializing new project in

    current directory Using the default package set for PureScript compiler version 0.10.7
  4. Quick Start Guide $ psc-package install free Updating 34 packages…

    Updating arrays … psc-package.json file was updated
  5. Quick Start Guide $ psc-package update Updating 52 packages… …

    Update complete
  6. Quick Start Guide $ psc-package build … Compiling Prelude

  7. Quick Start Guide $ psc-package install psci-support $ psc-package repl

    … PSCi, version 0.10.7 Type :? for help >
  8. Other Commands • available list all available packages • dependencies

    list all transitive dependencies • sources list all active source paths • uninstall uninstall a package
  9. Package Sets How does psc-package know which package versions to

    use? It depends on which package set you use. This is configured in your psc-package.json file.
  10. psc-package.json $ cat psc-package.json { "name": "my-package", "set": "psc-0.10.7", "source":

    "https://github.com/purescript/package-sets.git", "depends": [ "prelude" ] }
  11. Package Sets A package set is just a mapping from

    package names to • Git repository • Package version and • Dependencies
  12. Package Sets Package sets are stored in Git repositories. There

    is a default repository at purescript/package-sets. Tools for maintainers: • updates Check all packages for updates • verify-set Verify the entire set builds correctly
  13. Caveats • No constraint solving • Cannot customize package versions

  14. Contributing • Help maintain the package set • Add missing

    packages • Try it out and report bugs • Help write documentation • Contribute to psc-package development: ◦ Build with stack ◦ Uses the turtle shell scripting library ◦ Straightforward Haskell code
  15. Future Work • More integrations: ◦ purs publish ◦ purs

    docs ◦ purs bundle ◦ Pursuit / type search ◦ Try PureScript • Performance improvements ◦ Caching cloned repos
  16. Questions?