Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
Also improved the test situation, did some refactors, and now listing the user's
past analyses on their account page.
|
|
|
|
|
|
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.
|