Skip to content

Conversation

@alexfmpe
Copy link

No description provided.

case map T.unpack $ T.splitOn "/" input of
[owner, repo, subdir] -> return $ GitHub owner repo (Just subdir)
[owner, repo] -> return $ GitHub owner repo Nothing
(owner: _) | owner `elem` ["http:", "https:"] -> fail $ "expected owner/repo or owner/repo/subdir, but encountered url instead: " ++ show input
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to add some hacky url detection because otherwise urls were being matched as

owner: "https:"
repo: ""
subdir: "github.com/sol/hpack/issues/365"

Not sure how to handle this robustly

Copy link
Owner

@sol sol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexfmpe Hey! Thanks for working on Hpack + sorry for the late response!

Instead of trying to shoehorn this into github:, how about we add more complete support for source-repository? At this point, I'm not eager to support everything from Cabal, but we can start with type, location and subdir (and possibly extend it in the future).

source-repository:
  type: git
  location: https://github.com/sol/hpack
  subdir: some/lengthy/path

source-repository: ... should take precedence over github: ..., that is if both github: ... and source-repository: ... are specified, then homepage, bug-reports should be derived from github: ... while the .cabal source-repository head should derived from source-repository: ...

Base automatically changed from master to main January 19, 2021 21:43
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

Successfully merging this pull request may close these issues.

2 participants