Age | Commit message (Collapse) | Author |
|
I always want to push notes on a successful code push, so using the pre-push
hook to do so is perfect. This also expands the pre-push hook to handle
new/deleted branches, configures notes automatically, and finally checks that
commit messages are decent with gitlint, since `git amend` can bypass the git
commit-msg hook.
|
|
To properly run the tests, I need more than just `$CODEROOT`, unfortunately. For
example, I also need to be sure I'm using the `bild` version compiled in that
environment, and the `lint` from `_/bin/lint`. So anyway just use the full
direnv environment.
|
|
I realized that tidy was doing the same thing as git clean, but git clean can do
it more robust and exactly. So switch to that and add it to the git test config
aliases so I don't accidentally test with old artifacts.
|
|
Uses git test to run CI on every commit before push.
|
|
This is a command from git-branchless that will run and verify tests on all
commits in the revset. Now that the bild is stable and fast enough, I should be
able to use this to validate all commits before publishing, perhaps even running
the pre-push CI script.
|
|
As a followup to 6040b2ceae7e6f4a0d41052663bf7826d1e52b4a, maybe this will
improve the direnv loading time & frequency issue.
|
|
I think these were false-positives and causing unnecessary re-evals of my nix
code. So sometimes after a checkout I would end up just waiting a few seconds
for my environment to come back, and that's annoying.
|
|
I was already using .sh to refer to shell scripts. When I added .bash, I didn't
realize that the linter was set to act on .sh files and not .bash files, so all
of these bash scripts escaped the linter.
This commit renames them to .sh, removes the .bash extension support from
Biz.Namespace, and fixes all the reported shellcheck errors.
|
|
Previously, if there was a problem with the inputs and bild failed to
determine the namespace, 'fromPath' would return 'Nothing' and then
'catMaybes' would drop the error-causing input altogether. In the one
time that I had a bad input, this made debugging incredibly difficult.
It's always a bad idea to swallow errors silently, so instead lets just
kill the program if we have bad inputs.
|
|
BIZ_ROOT was too specific. CODEROOT allows for other (non-biz) projects to live
in the root of the repo. I didn't want to call it GIT_ROOT because maybe someday
I won't want to use git. But I'll never not use code.
|
|
I only just now learned about watch_file.
|
|
In order to write Guile code against C, I need to distiguish between libs and
bins, so I did that, then I got the flags that gcc needs from `guile-config` and
put them in the args for any C lib build. I tested this with Bessel.c and
Bessel.scm (not in this patch, because I don't really want that code in my
tree, I'll come up with another way to test it later).
|
|
The motivation for this was to prevent `lint` from rebuilding every time I ran
it. That was really annoying.
|
|
|
|
|
|
|
|
|
|
This makes it explicit that we are using GitHub vs some other OAuth args. The
idea is that we should be making a new type for every service, this allows us to
have type safety in the implementation but a common set or pattern of names for
the environment variables and record fields.
Also using 'notset' instead of 'mempty' is really helpful for debugging when
this breaks, as I found out.
|
|
|
|
|
|
|
|
|
|
|
|
Working toward https://github.com/bsima/biz/issues/5
|
|
There's also a lot of refactoring/renaming in here, so the diff is really messy.
The overall problem is that I've only ever added code, I've never gone back and
reorganized/rearchitected stuff. So adding even small features is becoming an
enormous effort.
Anyway, this adds the basics of user auth. Next I need to add the auth checks
for every route that needs it, and make sure everything is back to working
correctly.
|
|
|
|
I'm using vim lately for biz coding...
|
|
|
|
This is somewhat experimental, the idea is automatically set the sources
from my niv pinned deps. It seems to work, so I'll keep at it and see if
I can improve it as issues come up.
|
|
This works, I tested it.
|
|
|
|
|
|
Idk what I was thinking, I dodn't need any of that stuff.
|
|
I wanted to even further simplify the build tooling overhead. My general
goal is to not have to think about declaring packages, or dependencies,
or really anything that you might find in a cabal file. Not all of these
goals are possible, but we can get pretty close. With this commit all I
need for the 'buildGhc/buildGhcjs' functions is the path to the
entrypoint file; everything else is either inferred by the Nix code or
declared in the Haskell code comments.
The strategy is to map a Haskell module to an executable artifact, and
pass just that module to 'ghc --make'. Then we can rely on ghc to handle
walking the local filesystem for imports. The only thing ghc really
needs to know is a name for the output executable; it is hard to
automatically infer this, so we have a simple comment syntax to declare
this in the file. The comment syntax is inspired by existing Haskell
'LANGUAGE' pragmas; having this in the same file keeps the configuration
as close to the real code as possible. The Nix code then extracts this
info from the code comments, and sets the required ghc flags.
Second, we need to declare the set of 3rd-party packages that our
program relies on. For this we can re-use the same comment syntax and
just list the dependencies, then extract them in Nix and construct a
package set as we were before.
This reduces the amount of "package declaration" code we have to write
in default.nix, and reduces the amount of time we have to spend
switching between the Haskell code and the Nix code (I find such context
switching super annoying). I also think having the configuration in with
the Haskell code encourages us to write smaller, simpler modules and
only write code that we need.
Additionally, I refactored the bild and ghci (now called 'repl') scripts
to work in any directory. The .envrc uses direnv to set the path so that
you can run these scripts anywhere. That means the following works:
$ cd Run/Que
$ bild Website
$ repl Server
λ> :l Run.Que.Server
I find this to be a rather nice workflow.
|
|
|
|
|