Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Fix #29: new input cabal-update: false to skip 'cabal update' #146

Merged
merged 10 commits into from
Jan 10, 2023

Conversation

andreasabel
Copy link
Member

@andreasabel andreasabel commented Dec 28, 2022

Fix #29: don't run 'cabal update'. New input cabal-update (default true) that can be set to false to turn off running cabal update.

This breaking behavior requires a major version bump (e.g. to v3.0.0).

@andreasabel andreasabel added this to the 3.0.0 milestone Dec 28, 2022
@andreasabel
Copy link
Member Author

I am not so sure about this change anymore. I think of this setup action as a "batteries included", maybe for the price of some redundancy.

@jneira
Copy link
Member

jneira commented Jan 3, 2023

what about a config switch to disable it?

@andreasabel
Copy link
Member Author

what about a config switch to disable it?

Yes, that's an option, see #29 (comment).

@andreasabel andreasabel changed the title Fix #29: don't run 'cabal update' Fix #29: new input cabal-update: false to not run 'cabal update' Jan 3, 2023
@andreasabel andreasabel modified the milestones: 3.0.0, 2.2.1 Jan 3, 2023
@andreasabel
Copy link
Member Author

CI: the "test project" seems to build even without cabal update: https://github.com/haskell/actions/actions/runs/3832554762/jobs/6522998203#step:5:5

Run cabal build
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.

@andreasabel andreasabel added the re: cabal On setting up cabal label Jan 3, 2023
@andreasabel andreasabel self-assigned this Jan 3, 2023
setup/src/opts.ts Outdated Show resolved Hide resolved
@jneira
Copy link
Member

jneira commented Jan 4, 2023

Thanks for making update optional, it would need change https://github.com/haskell/actions/blob/main/setup/README.md adding the new option

@andreasabel
Copy link
Member Author

Thanks for making update optional, it would need change main/setup/README.md adding the new option

Ah, thanks for the alert!

@andreasabel
Copy link
Member Author

I now added the description of cabal-update to the README.

This PR is ready again.

@andreasabel andreasabel removed this from the 2.2.1 milestone Jan 10, 2023
@andreasabel andreasabel added this to the 2.3.0 milestone Jan 10, 2023
@andreasabel
Copy link
Member Author

Planning to release this as 2.3.0. Minor version bump because of new feature.

@andreasabel andreasabel changed the title Fix #29: new input cabal-update: false to not run 'cabal update' Fix #29: new input cabal-update: false to skip 'cabal update' Jan 10, 2023
@andreasabel andreasabel merged commit 2742846 into main Jan 10, 2023
@andreasabel andreasabel deleted the issue-29 branch January 10, 2023 17:39
@andreasabel
Copy link
Member Author

Final description of this PR:

This commit introduces a new boolean input cabal-update that defaults to true.
If set to false, the cabal update step will be skipped.

The new flag cabal-update is proper boolean, it only accepts the YAML 1.2 truth values true and false (also in captial and uppercase).
This is contrast to other "boolean" flags that are "unset" by default and can be "set" with any non-empty string.

To test that cabal update happens, this commit also introduces a new Haskell test project into CI that depends on a common Hackage package (base-orphans).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
re: cabal On setting up cabal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove cabal update from setup upon request
3 participants