| 30 Nov 2024 |
Patrick Steele | I mean, this is working for me, somehow. (And was failing without it.)
Annoyingly I can't replicate what Github Actions are doing locally, so I can't even reproduce this locally | 20:25:28 |
Patrick Steele | test =
let
shell = self.devShells.${system}.default;
in
pkgs.writeShellApplication {
name = "test";
runtimeInputs = [ pkgs.cabal-install ] ++ shell.nativeBuildInputs;
text = ''
cabal --config-file /dev/null --active-repositories=:none test --test-show-details=always "$@"
'';
};
is how I'm coercing tests to run in CI
| 20:26:04 |
alexfmpe | Huh why do you want to build with nix but not run with nix? | 20:28:16 |
Patrick Steele | I do want to run with Nix, I'm not claiming this is idiomatic. My initial question is me trying to figure out how to get Nix to just run the tests directly | 20:28:46 |
alexfmpe | why not "nix-shell --run 'cabal test all' | 20:28:46 |
alexfmpe | * why not "nix-shell --run 'cabal test all'" | 20:28:56 |
alexfmpe | * why not "nix-shell --run 'cabal test all'" | 20:29:05 |
Patrick Steele | Would that have different behavior? In my mind those are awfully close | 20:29:21 |
alexfmpe | This is what I do if I want to CI the dev shell itself | 20:29:44 |
Patrick Steele | I'll give it a try | 20:30:05 |
alexfmpe | Otherwise I just let the nix derivation do everything | 20:30:15 |
alexfmpe | You seem to be using flakes though. I think that's 'nix develop' or something rather than nix-shell | 20:31:09 |
alexfmpe | In reply to @prsteele:matrix.org Would that have different behavior? In my mind those are awfully close This would build your project (not the deps) outside of nix | 20:32:23 |
Patrick Steele | I see | 20:42:38 |
Patrick Steele | thank you | 20:42:46 |
Patrick Steele | nix develop --command cabal test has the same issue as a naked cabal test; it tries to go to Hackage.
I'm still not sure why nix-shell --run 'cabal test' would not "build the project outside Nix"
| 21:33:37 |
Patrick Steele | I suppose I could literally just nix build .#thePackage and rely on Nix running the tests... | 21:34:55 |
alexfmpe | Well it builds the deps as nix derivations, and enters a nix-prepared shell environment | 22:12:30 |
alexfmpe | But then does a normal cabal build | 22:12:35 |
alexfmpe | In reply to @prsteele:matrix.org
nix develop --command cabal test has the same issue as a naked cabal test; it tries to go to Hackage.
I'm still not sure why nix-shell --run 'cabal test' would not "build the project outside Nix"
Disable hackage on cabal.project? | 22:13:00 |
| 1 Dec 2024 |
Patrick Steele | that seems like a better solution than what I had cobbled together, thanks | 01:56:25 |
| @aspendowntime:matrix.org changed their display name from Oktawia (it/they/she) to Nerissa (it/they/she). | 10:12:34 |
| @aspendowntime:matrix.org changed their display name from Nerissa (it/they/she) to Nerissa (it/she). | 18:51:11 |
| 3 Dec 2024 |
lazyLambda | In reply to @alexfmpe:matrix.org if one could have a TH pass or whatever typecheck the string literals, that'd be interesting https://github.com/augyg/ClasshSS this is it currently. Ergonomic-ness in progress and I need to make better documentation to begin with | 00:57:32 |
lazyLambda | In reply to @alexfmpe:matrix.org if one could have a TH pass or whatever typecheck the string literals, that'd be interesting * https://github.com/augyg/ClasshSS/tree/gs/modules this is it currently. Ergonomic-ness in progress and I need to make better documentation to begin with | 00:58:59 |
sterni (he/him) | gosh I really don't wanna do the GHA change for the merge workflow. doesn't seem like an enjoyable experiencing testing something by force pushing to a test repo | 20:18:20 |
sterni (he/him) | You would think they'd somehow add a way to sort of test actions offline at some point… | 20:19:03 |
maralorn | If we sync the timing of the jobs do we really knew to do the merge base thing? | 20:51:50 |
sterni (he/him) | yes. the merge from master to staging-next or from staging-next to staging might fail while the merge from master to haskell-updates succeeds | 21:32:18 |
maralorn | In reply to @sternenseemann:systemli.org yes. the merge from master to staging-next or from staging-next to staging might fail while the merge from master to haskell-updates succeeds Yeah, that's what I thought. | 22:35:42 |