summaryrefslogtreecommitdiff
path: root/Biz/Ide
AgeCommit message (Collapse)Author
2024-05-21Set pre-push hook to fail if subcommand failsBen Sima
I think gitlint violations were sneaking through without this.
2024-05-20Minor Ide changes & fixesBen Sima
- ns.sh was broken because I never updated the commands to include the .sh extensions - changed a few other UI things in ns.sh to support my workflow - run.sh was broken when the exe name had a hyphen in it, so just use bild --plan instead of regex - changed the noqa to include the English name of the ignored rule because lets be real I'll never remember what A003 means
2024-05-20Fix push.sh, act as $USER instead of rootBen Sima
At some point I guess the activation script changed to no longer include the domain, so I have to get it form the 'domainname' systemd service. Also I switched to sshing as $USER instead of root, which just seems like better security practice. I originally used root because I thought you had to be root to do nix system stuff, but it turns out that's not the case.
2024-05-20Switch to universal-ctagsBen Sima
It's supposedly faster and actually maintained. Also make preview window in ftags.sh a bit more robust.
2024-04-11Don't reload direnv every checkoutBen Sima
I guess this was the real cause of the constant reloads, it was getting annoying.
2024-04-11Don't run the pre-push script when pushing git notesBen Sima
I didn't even realize this would happen, but obviously it would. So my CI system was trying to run tests on all note commits, and throwing weird errors obviously, and probably recursing into an endless void of git pushes.
2024-04-11Fix syntax error in pre-push hookBen Sima
This was silly, maybe I should add a special case to Lint.hs to check these...
2024-04-10Save commit message if gitlint failsBen Sima
I got annoyed losing my well-crafted commit message one too many times.
2024-04-10Reorganize and update nixpkgs upstreamsBen Sima
This patch does a few things: 1. Switches from nixpkgs-unstable to nixos-unstable{,-small}, simply because nixpkgs-unstable is not in cache.nixos.org, but nixos-unstable is, and -small is the same but requires all tests to pass. So we should prefer nixos-unstable-small, whenever possible. 2. Reorganizes the nixpkgs import code such that Nixpkgs.nix returns an attrset of all the nixpkgs that I want to use, rather than putting other nixpkgs branches into the main one as an overlay. This is much simpler and explicit, but it meant I had to change a lot of usages throughtout the nix codebase. 3. As a consequence of 2, moves the overlays into separate files so they can be re-used across nixpkgs branches.
2024-04-10Add mypy to Python REPLBen Sima
I tried to add it to Lint.hs but I can't because mypy needs the target's external libraries in its environment to load and check the types for that dependency. So instead, I just added a function to the REPL environment that runs the type checker. I already had mypy in the REPL environment so I must have started down this path before and just didn't add the REPL tooling. The automatic typechecking on load feels like Haskell. A previous version of this patch had just provided a `typecheck()` function to the REPL, but it felt awkward to type all that out just to check my code after loading it. I would like to bind a key like ctrl-r or alt-r to the `reload()` function, but I'm not sure how to do that. I think Python uses GNU readline so there should be some docs, but a first pass search didn't find what I needed.
2024-04-10Switch from black to ruff formatBen Sima
Ruff is faster and if it supports everything that black supports than why not? I did have to pull in a more recent version from unstable, but that's easy to do now. And I decided to just go ahead and configure ruff by turning on almost all checks, which meant I had to fix a whole bunch of things, but I did that and everything is okay now.
2024-04-10Push ci notes automaticallyBen Sima
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.
2024-04-09Replace tidy.sh with git clean, add it to ciBen Sima
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.
2024-04-03Enable CI for every commitBen Sima
Uses git test to run CI on every commit before push.
2024-04-03Update comment to CI scriptBen Sima
It got out of sync with the code even within commit 7597d51ed4c866f596fb690d4d53d70bc01181b4, I dunno how I let that happen.
2024-04-01Make bild exception for git hooksBen Sima
Apparently git hooks don't get called if they have a file extention, so these weren't getting called at all since commit 904de577261e7024373e7a42fd763184764238f9. So this renames them back to the extension-less versions, and adds an exception in bild for files in the core.hooksPath directory. Unfortunately this means Lint.hs will silently ignore these files, but I guess that's okay for now.
2024-04-01Set border and window placement in ftags/hoog scriptsBen Sima
I just like these UI settings better is all.
2024-04-01Rename .bash files to .shBen Sima
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.
2024-04-01Add --jobs and --cpus to bildBen Sima
By default, nix will use the maximum amount of cores available to the machine. On my machine it was maxxing out the CPUs and then actually running out of RAM when compiling JavaScriptCore and literally shutting down my machine. So, I need to be able to control the concurrency and parallelism. The default settings I chose should reserve 4 cores for the user. I also changed --json to --plan because -j makes more sense for --jobs, as its used this way in other tools like make and nix-build.
2023-10-27CI script improvementsBen Sima
Added BILD_ARGS and removed the unused 'while read' so you can just call it directly without having to supply arguments.
2023-10-27Rename BIZ_ROOT to CODEROOTBen Sima
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.
2023-10-10Add git-branchlessBen Sima
After using this for a while, I've decided that git-branchless will be the default tool for doing trunk-based development in the omnirepo.
2023-10-10Environment fixes on berylliumBen Sima
Getting beryllium setup with the omnirepo showed that a few things needed fixed.
2023-10-10Don't swallow namespace-parsing errorsBen Sima
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.
2023-10-03Add rundeps feature to bildBen Sima
This allows me to specify runtime dependencies, not just system or language deps.
2023-10-03Rename BIZ_ROOT to CODEROOTBen Sima
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.
2023-09-20Prototype MynionBen Sima
This implements a prototype Mynion, my chatbot which will eventually help me write code here. In fact he's already helping me, and works pretty well over xmpp. The prompt is currently not checked in because I'm experimenting with it a lot, and it should probably be a runtime parameter anyways. In the course of writing this I added some helper libraries to get me going, configured black (didn't even know that was possible), and added 'outlines' and its dependencies even though I didn't end up using it. I'll keep outlines around for now, but I'm not sure how useful it really is because afaict its just pre-defining some stop conditions. But it took a while to get it working so I'll just keep it in for now.
2023-09-19Fix checking of grep exitcodeBen Sima
This is one of those things that's hard to get right because it depends on the state of the git repo to exercise all code paths.
2023-09-19Lint faster by grouping files by extensionBen Sima
Previously I would lint every file individually, in serial. This took forever. Now I group the files by extension (by first getting the Namespace) and run each linter on all relevant files at once. This is so much faster its stupid. Also I added formatters back into the dev env because my editor needs them to autoformat.
2023-08-22Replace pylint with ruffBen Sima
Ruff is like a million times faster, and I mostly ignored pylint's suggestions anyway. I also took this opportunity to move lint tools into a runtime dependency on Lint.hs, which meant adding a wrapper to the Haskell builder, which was easy enough. This paves the way for proper rundeps in bild.
2023-08-22Add a commit-msg hook lint and various other cleanupsBen Sima
Turns out that gitlint by default enforces the exact commit-msg format that I like to use. I'm enabling this because even I write poor commit messages sometimes, and looking back on my commits from even a few days ago is sometimes not very helpful. I also made some minor comment and nix changes that I noticed while reviewing my work from the last few days.
2023-08-21Don't run ci on notes refsBen Sima
2023-08-21Only run pre-push if there hasn't been a successful runBen Sima
2023-08-17Reload dev environment after git checkoutBen Sima
2023-08-16Fix variable substitution and indenting in ci scriptBen Sima
2023-08-16Condense note message in pre-push hookBen Sima
2023-08-16Get python targets buildingBen Sima
I added 'black' to Biz/Lint.hs, but not the others because they rely on dependencies being in the PYTHONPATH to work, so they are only relevant in nix builds and repls. I also made some other tweaks to the python checkPhase and linted all the files. Everything should be building and linting correctly now.
2023-08-16Turn pre-push into a record-keeping ciBen Sima
This is necessary because otherwise I have no record of when I had a successful build.
2023-08-07Working nixified python buildBen Sima
This represents quite a few evenings of hacking. It doesn't build all of my Python code, because my Python code is not up to snuff, but it builds the examples and pulls in third party dependencies. Some design points: - I'm using buildPythonApplication in Builder.nix because it was getting way too annoying to wrap the Python script and set PYTHONPATH myself. Easier and more robust to just use the upstream nix builder - Because of this, I had to generate a setup.py. Maybe switch to pyproject.toml in the future, whatever. - Also because of this, Target.wrapper is becoming redundant. I'll just remove it when I get Guile built in nix. - Biz/Bild.nix is getting messy and could use a refactor. - In Builder.nix, I worked around the empty directories bug by just finding and deleting empty directories after unpacking. If its stupid but works it ain't stupid! - I had to touch __init__.py files in all directories before building. Annoying! - `repl` just works, which is awesome - To ensure good Python code, I moved lints and added type checking to the build. So I can't build anything unless it passes those checks. This seems restrictive, but if I want to run some non-passing code, I can still use `repl`, so it's actually not inhibitory.
2023-08-03Add packageSet argumentBen Sima
2023-07-28Fix tags generation in git hookBen Sima
2023-04-28Default to Guile 3.0 everywhereBen Sima
Without this, Guile libraries like SDL2 will use Guile 2.0 instead.
2023-01-03Add nl to push logging outputBen Sima
2022-11-02Select built nix targets with shipBen Sima
2022-08-10Fix path to git hookBen Sima
2022-08-08Ensure BIZ_ROOT is set in shell scriptsBen Sima
2022-08-08Remove some TODOsBen Sima
I don't like TODOs in my codebase, I'd rather keep them in org files. Eventually I need a linter that prevents all TODOs from getting into code.
2022-08-03Fix globbing in pre-push hookBen Sima
2022-08-03Print bild JSON analysis as a dictionary instead of a streamBen Sima
2022-08-01Lint only changed filesBen Sima