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

Make cabal update accept a freeze file #8572

Open
TomMD opened this issue Nov 4, 2022 · 2 comments
Open

Make cabal update accept a freeze file #8572

TomMD opened this issue Nov 4, 2022 · 2 comments
Labels
attention: pr-welcome re: project-file Concerning cabal.project files

Comments

@TomMD
Copy link
Contributor

TomMD commented Nov 4, 2022

Describe the bug

I want CI to build. To build we want 1) a new enough index, but we also want 2) to avoid unnecessary updates. cabal update fits the bill for the first requirement but not the second. To get both we could use a script:

timestamp=$(cat ./cabal.project.freeze | grep index-state | cut -f 3 -d ' ')
repohost=$(cat ./cabal.project.freeze | grep index-state | cut -f 2 -d ' ')
cabal v2-update ${repohost},${timestamp}

but it would be way better to call:

cabal update --project-file cabal.project.freeze

(EDITED to remove new flag and re-use an existing flag)

Would the feature be acceptable or would modifications to the design be requested?

@gbaz
Copy link
Collaborator

gbaz commented Nov 4, 2022

Looks like cabal update --project-file cabal.project.freeze doesn't do the trick. However, I think that fixing that interaction would make the most sense rather than adding a new flag.

@TomMD
Copy link
Contributor Author

TomMD commented Nov 4, 2022

I didn't even know about that flag (yes, I see it in the help now). That sounds good, I'm going to edit the above ticket to say your suggestion and strike out the original text.

@Mikolaj Mikolaj added re: project-file Concerning cabal.project files attention: pr-welcome labels Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attention: pr-welcome re: project-file Concerning cabal.project files
Projects
None yet
Development

No branches or pull requests

3 participants