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

SourceRepo #218

Merged
merged 1 commit into from
Feb 11, 2019
Merged

SourceRepo #218

merged 1 commit into from
Feb 11, 2019

Conversation

phadej
Copy link
Collaborator

@phadej phadej commented Feb 11, 2019

ping @RyanGlScott, resolves #184

this isn't perfect, but you don't need to copy source-package-repository manually. Tests are run, but this is cabal bug, I guess?

I can reliably work-around haskell/cabal#5586 because script cannot know the names of packages referenced.

@phadej phadej merged commit 7b72301 into master Feb 11, 2019
@phadej phadej deleted the source-repo branch February 11, 2019 23:13
@RyanGlScott
Copy link
Contributor

Sorry, I didn't see this until just now! This looks quite promising, and I'm eager to give it a try.

Tests are run, but this is cabal bug, I guess?

I assume you're referring to the tests in the source-repository-packages themselves? If so, does this workaround help?

I can reliably work-around haskell/cabal#5586 because script cannot know the names of packages referenced.

I'm not sure what you mean here. Can you be more specific?

@phadej
Copy link
Collaborator Author

phadej commented Feb 11, 2019

@RyanGlScott if I have

source-repository-package
  type: git
  location: https://example.com/repo.git
  tag: deadc0de

then just from that text information, I cannot infer what packages are there, I cannot generate

package example-package
  tests: false
  benchmarks: false

We need some extra bit of information. So for now, I'd wait until cabal bug is fixed or I get to implement some variant of #129

@RyanGlScott
Copy link
Contributor

RyanGlScott commented Feb 11, 2019

Ah, I see what you mean now. I encountered that exact same issue when trying to implement my hack for this in travis-maintenance. I think I settled for only making it work for locations that end in .../repo-name.git (where the .git part is optional). It works OK for my needs, since every source-repository-package I use happens to look like that, but I could understand if you wish to aspire to a higher standard than that :)

I wish that cabal.project files gave you a way of setting options for each source-repository-package (similarly to how you can set options for every package with package *). If we had that, we could avoid the need to specify the names of each source-repository-package in the first place.

@phadej
Copy link
Collaborator Author

phadej commented Feb 11, 2019

Latter is difficult, given e.g. subdirs and someone wishing to differentiate between different packages in the source-repo-package... It's a swamp.

@phadej
Copy link
Collaborator Author

phadej commented Feb 11, 2019

(for the record, my only use case right now also has well-named package-name.git tail, so maybe i'll make a HACK anyway)

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.

haskell-ci breaks with source-repository-packages
2 participants