-
Notifications
You must be signed in to change notification settings - Fork 45
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
allow for using local package sets by using a path instead of url #158
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively you could require that local paths begin with file://. E.g. file://../foo
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i hate file urls, especially considering that this should work with relative paths easily
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.json
files 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.