Package does not exist in package set


#1

psc-package install gametree

gives

Package gametree does not exist in package set

What should I do?


#2

You should either make a PR to add it to an existing set, or you should fork and make your own. The psc-package readme covers the necessary steps to make a fork.


#3

I made a fork and updated as per instructions (https://github.com/pdavidow/package-sets), and pointed my psc-package.json to the fork, and also deleted the .psc-package directory for good measure. I then did a psc-package install which worked, but alas psc-package install gametree still gives original error Package gametree does not exist in package set.

Admittedly,
psc-package verify gametree
gives
Unable to parse psc-package.json: Error in $: Failed reading: not a valid json value

But the file looks fine according to
https://www.freeformatter.com/json-validator.html
and

Kindly advise


#4

What does your psc-package.json file look like?


#5
{
  "name": "pure",
  "set": "psc-0.11.7",
  "source": "https://github.com/pdavidow/package-sets.git",
  "depends": [
    "halogen-css",
    "dom",
    "dom-classy",
    "halogen",
    "maybe",
    "enums",
    "transformers",
    "tuples",
    "integers",
    "arrays",
    "partial",
    "either",
    "test-unit",
    "foldable-traversable",
    "lists",
    "record",
    "psci-support",
    "console",
    "eff",
    "prelude"
  ]
}

#6

Note that
"set": "psc-0.11.7-20180524",
does not help either.

And
rm -rf .psc-package
fails with

Remove-Item : A parameter cannot be found that matches parameter name 'rf'.
At line:1 char:4
+ rm -rf .psc-package
+    ~~~
    + CategoryInfo          : InvalidArgument: (:) [Remove-Item], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand

I’m on Windows10, so that last command works correctly as
rm -r -Force .psc-package

(Using Chocolatey did not help either.)


#7

nwolverson on Slack solved the problem:

looks like you’ve not tagged your package set and referenced the tag in psc-package.json, you’re referencing existing tags from the original fork

(See https://help.github.com/articles/creating-releases/)


#8

The psc-package instructions for forking should include a walk-thru of all the steps after the fork:

  1. Clone to local repo
  2. Create branch off of tag (e.g., tag psc-0.11.7-20180524)
  3. Make updates to packages.json
  4. Commit
  5. Tag
  6. Push to remote with tag
  7. Update psc-package.json "set": with tag from step 5
  8. Delete folder .psc-package
  9. Run psc-package install
  10. Install newly-added external package x: psc-package install x
  11. Run pulp build