Skip to content
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

Source code with links (copy Hackage) #137

Open
hdgarrood opened this issue Aug 1, 2015 · 6 comments
Open

Source code with links (copy Hackage) #137

hdgarrood opened this issue Aug 1, 2015 · 6 comments

Comments

@hdgarrood
Copy link
Collaborator

For example: http://hackage.haskell.org/package/base-4.8.1.0/docs/src/Data.List.html

@adius
Copy link

adius commented Jan 14, 2018

But please not like Hackage were I get redirect to another page. => #363 (comment)

@hdgarrood
Copy link
Collaborator Author

Sounds good. I think having just the function definition in the source displayable inline as well as a separate page with the whole file would be ideal; sometimes a little more context is needed to make sense of a function definition.

@chexxor
Copy link

chexxor commented Jan 14, 2018

Curious why you want to host source code. I've never understood why hackage does that. I like GitHub UI for browsing source code. It only works for GitHub hosted source, but we could find an alternative to hosting it ourselves that still delegates hosting to the package author, I would guess. A package author has to have publicly accessible code, so it might be safe to presume they also have an HTML rendering service along with their Git hosting service.

@adius
Copy link

adius commented Jan 14, 2018

  1. Keyword linking - It's really awesome that every variable / type /... is linked in Hackage. This will difficult to achieve on an external service.
  2. Offline availability - I could host Pursuit offline on my laptop and could still look up all code
  3. Extra PureScript smarts - GitHub is generic. We know it's only PureScript ... I think there will be a lot of things possible we just haven't thought of yet

@hdgarrood
Copy link
Collaborator Author

That's one part of it: I don't want to presume the existence of a code hosting site. I particularly don't want to have to build in knowledge of the URL structure of every code hosting site which package authors might use in order to have working source links; currently we just have knowledge of GitHub built in but I would prefer to remove that so that people can host code elsewhere. Additionally, I don't want to have source links which can break (if the user deletes their account or renames the repo, or something like that).

I also think we can do a better job of hosting source than GitHub does. For example, we could generate links like @adius mentioned; see e.g. https://hackage.haskell.org/package/containers-0.5.10.2/docs/src/Data.Sequence.Internal.html for an example of what I mean.

@adius
Copy link

adius commented Jan 14, 2018

Point in case - Bonsai source links are broken: https://pursuit.purescript.org/packages/purescript-bonsai/0.5.0/docs/Bonsai

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

No branches or pull requests

3 participants