summaryrefslogtreecommitdiff
path: root/Biz/Test.hs
AgeCommit message (Collapse)Author
2024-05-09Switch to nixpkgs-23.11, ghc 9.6.3Ben Sima
This brings a bunch of improvements. I got rid of some custom packages, I can now build exllama without using a non-default cuda version. Oh yeah and I get to use GHC 9.6.2 now, a huge upgrade from 9.4. Unfortunately I also updated ormolu and some unrelated formatting changed, but that's life I guess.
2024-04-09Skip tests that require networkBen Sima
This started failing recently, I think because my key expired or something. Anyway I shouldn't be doing network requests in unit tests. So until I figure out how to design a test suite that can handle network requests in a sensible way, just skip these tests.
2023-07-31Prototype nix expression generationBen Sima
There are some limitations to this implementation: 1. Using `runCommand` means this will re-run any time anything changes in the repo. The solution is to use the existing import detection to make a list of source files, and put that into a `stdenv.mkDerivation`, which I'll do next. 2. The `NeatInterpolation` usage is ugly. The templated nix code should be extracted into its own file, such as `Biz/Bild/Builder.nix`. 3. I'm not actually calling it yet. The ideal thing would be to call `nix-instantiate`, get the output drv path, and then call `nix-store --realise` on that. To do that I need to refactor my `proc` function to return stdout to the calling function, and I should probably just make helper functions like `nixInstatiate :: Target -> IO DrvPath` and `nixStoreRealise :: DrvPath -> NixStorePath`, or something like that.
2021-12-21Extract repl program from bildBen Sima
This is basically building on top of bild's analysis, which is great becuase it means that bild is becoming a useful tool rather than a monolithic do-everything job runner. The eventual goal is for the bild analysis to be much more useful, maybe even provide data to remote repls or language-server or whatever.
2021-11-26Reimplement Que with ServantBen Sima
Still todo: add authentication. But that can wait. In re-implementing this, I was able to figure out how to get the Go.mult working properly as well. The problem is that a tap from a mult channel does not remove the message from the original channel. I'm not sure if that should be a core feature or not; for now I'm just draining the channel when it's received in the Que HTTP handler. (Also, this would be a good place to put persistence: have a background job read from the original channel, and write the msg to disk via acid-state; this would obviate the need for a flush to nowhere.) Also, streaming is working now. The problem was that Scotty closes the connection after it sees a newline in the body, or something, so streaming over Scotty doesn't actually work. It's fine, Servant is better anyway.
2021-11-26Automatically detect Haskell dependenciesBen Sima
This parses the files contents for imports, then uses ghc-pkg to lookup the package that provides the module. Now I can do that analysis in Haskell instead of nix, which is much easier to code with.
2021-02-19Formatting, and add a warning to 'require'Ben Sima
2021-02-18Move runTests to Biz.Test.runBen Sima
2021-01-29Lint 'return' into 'pure', replace bind operatorBen Sima
2021-01-27Set subscription in user page, operator precedenceBen Sima
I'm still working on figuring out operator precedence with my custom operators. The normal precedences don't work well for writing code in a pipeline as I like, so I have to re-define the operators with my own fixity settings. This will take some fiddling to get right. The user subscription allows setting to "Free" only now. It's fine because I still need to do a design refresh on the pages I just made. One thing I noticed is that it's getting harder to make changes without breaking stuff, so I either need to make smaller incremental changes, or actually write some real tests. I'll probably write tests soon.
2021-01-26Create Biz.Log library, extracted from Biz.BildBen Sima
2021-01-26Add user subscription fieldBen Sima
Also improved the test situation, did some refactors, and now listing the user's past analyses on their account page.
2021-01-22Property tests for calculateScoreBen Sima
2021-01-16Remove unused importBen Sima
2021-01-15Implement Biz.Test with tastyBen Sima
Also changes the --test option to a 'test' command. This is because running the tests for a namespace/exe should never be combined with anything else: you either want to run the tests, or not.