allow for using local package sets by using a path instead of url#158
allow for using local package sets by using a path instead of url#158justinwoo merged 2 commits intopurescript:masterfrom
Conversation
|
Is anyone interested in reviewing this code? @hdgarrood @paf31 |
| else Local txt | ||
|
|
||
| instance Aeson.FromJSON UrlOrLocal where | ||
| parseJSON value = mkUrlOrLocal <$> Aeson.parseJSON value |
There was a problem hiding this comment.
This will interpret http:// as a local path. It should probably fail and tell the user to use https:// instead.
There was a problem hiding this comment.
the url check is quite lazy, so i'm willing to change it with almost anything else. just need to know where to pull a better definition from
There was a problem hiding this comment.
in reality another lazy solution i guess would be to check if :// is an infix, which accurately reflects the faces of pedants reading this comment
There was a problem hiding this comment.
third, i guess mots people will use git@github.com:purescript/package-sets.git as a git url, so the prefix is wrong in any case
There was a problem hiding this comment.
Alternatively you could require that local paths begin with file://. E.g. file://../foo.
There was a problem hiding this comment.
i hate file urls, especially considering that this should work with relative paths easily
There was a problem hiding this comment.
when i glance over docs i see that anything ending in .git is basically fair game for git https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols
|
Going to merge this now after going through this with some others |
This introduces allowing for local package sets to be used by path.
This is a breaking change for users who have been creating
.psc-package/{setname}/.set/packages.jsonfiles manually, of which there are a small number who do use this in their actual work projects. However, getting these users to upgrade should not prove to be a big problem, and they can simply change"source"in their psc-package.json to the full path where they have been writing package sets.