James Shubin
2561dba8f5
lang: Increase debugging timeout
2024-12-15 10:39:46 -05:00
James Shubin
f5806e0617
lang: funcs: structs: Add Call and CallStruct methods for composite
...
It might turn out the CallStruct is the API we want. This will depend on
the future iterations of the function engine.
2024-12-08 17:43:41 -05:00
James Shubin
e9dbb7b86c
lang: funcs: structs: Add Call method for const
2024-12-08 16:48:04 -05:00
James Shubin
28f5b8331a
lang: funcs: structs: Improve naming
...
These could print nicer for debugging.
2024-12-08 16:24:42 -05:00
James Shubin
5ff4f0456a
lang: Add mode to overwrite tests
...
This is useful if we need to reformat a bunch of previously passing
tests.
2024-12-08 15:34:28 -05:00
James Shubin
097efdd66a
engine: graph: autoedge: Clean up redundant logs
...
They repeat themselves, this is cleaner.
2024-12-03 00:56:22 -05:00
James Shubin
4d30772b3b
lang: Add test for unused include statements
...
Even if they have no side effect, they aren't legal, since it would be
surprising if suddenly something new got added in one which then broke
the imports.
2024-11-28 19:17:33 -05:00
James Shubin
8472b1ebf2
lang: gapi: Convenience the user by allowing relative dirs in cli
2024-11-28 19:17:17 -05:00
James Shubin
e1070d3e13
lang: ast, download: Improve error messages
2024-11-28 19:17:17 -05:00
James Shubin
98d7f294eb
lang: download: Improve git reliability
...
Fix a small panic that could happen if we had a bad clone, and make
visibility into this operation better. We also make room for future
context cancellation since the library now supports this.
2024-11-28 16:38:33 -05:00
James Shubin
517fc1e05b
lang: gapi: Remap the module path correctly
...
If we've set the --module-path arg, then we expect to rebase that path
out of the deploy, and instead it should show up as /modules/ which is
the standard. Handle this scenario.
2024-11-28 16:29:33 -05:00
James Shubin
a600e11100
cli, docs: Add a docs command for doc generation
...
This took a lot longer than it looks to get right. It's not perfect, but
it now reliably generates documentation which we can put into gohugo.
2024-11-22 14:20:16 -05:00
James Shubin
7b45f94bb0
lang: core: Remove the unnecessary func suffix
...
We don't really need these, it's clear what things are.
2024-11-22 01:18:19 -05:00
James Shubin
018d3efc90
lang: funcs: Move standalone functions into core
...
Everything should be all together.
2024-11-21 22:56:17 -05:00
James Shubin
c642b5eeae
lang: core: net: Add new function to get cidr prefix
2024-11-06 21:10:04 -05:00
James Shubin
59a20f53eb
lang: core: sys, engine: resource: Update hostname functionality
...
We didn't have a solid resource and sys.hostname() didn't have events!
2024-11-06 21:09:50 -05:00
James Shubin
098ab20ec9
lang: gapi: Duplicates are possible if we have a diamond dag
...
Allow this, just remove them...
2024-11-06 20:02:10 -05:00
James Shubin
a2ce9e890d
lang: core: net: Add a way to get the machine mac addresses
2024-11-05 14:55:58 -05:00
James Shubin
be7a5399e3
lang: core: util: Add hostname mapper function
...
This adds a new util package with some useful functionality which could
be implemented as pure mcl, but instead we add it here as a good place
to help with code reuse.
2024-11-05 14:55:58 -05:00
James Shubin
422719c345
lang: core: map: Add functions to extract keys and values
...
Simple stuff, but now it's done!
2024-10-30 00:58:10 -04:00
James Shubin
ed84c5460c
lang: core: embedded: provisioner: Workaround bad mirrors
...
With the release of Fedora 41, I was getting lots of mirror errors.
Hopefully this helps make it more robust. It was failing repeatedly
while trying to download packages, and I kept having to restart things,
but once I added this option things worked. Hopefully they're related.
2024-10-29 18:53:58 -04:00
James Shubin
0222a682fc
lang: core: embedded: provisioner: Not sure we need this package
...
Seems to cause some issues. Remove it for now.
2024-10-29 18:53:36 -04:00
James Shubin
1cd4af5838
lang: core: embedded: provisioner: Keep this message separate
...
Don't autogroup it with others.
2024-10-29 16:58:06 -04:00
James Shubin
d1aaf6e82b
lang: core: embedded: provisioner: Handle spurious failures
...
Not sure why this happen, I think it's just random network blips. Simple
retry should be used for now.
2024-10-29 16:58:06 -04:00
James Shubin
52a71f9515
lang: core: embedded: provisioner: Add unused repo generation
...
I was playing around with generating repo's, but they didn't turn out to
be needed at this time. Committing this anyways for future reference.
2024-10-29 16:58:06 -04:00
James Shubin
3c665174cc
lang: core: embedded: provisioner: Implement handoff
...
Here's a good first way to implement handoff. What's particularly
elegant about handoff here, is that this is the first form of it I know,
where handoff happens between a provisioning tool and a configuration
management tool and those are the same tool! As a result, this can allow
for some really elegant integration, and the end-user never has to deal
with the combinatorial explosion of the N * M scenario of gluing each
provisioning tool to each different configuration management tool.
We'll have other forms of handoff in the future, but this simple
approach is useful already.
2024-10-29 16:58:06 -04:00
James Shubin
93eb8b2b76
lang: core: embedded: provisioner: Host an available deploy
...
This makes the current deploy available. This is likely not useful when
this is used from the embedded provisioner cli tool, since it would
contain cli functions that won't run, but it is useful when it's used as
a library.
2024-10-29 16:42:15 -04:00
James Shubin
1692235498
lang: core: embedded: provisioner: Log output of post
...
This is useful for debugging and for knowing what we really did to the
machine.
2024-10-29 16:42:15 -04:00
James Shubin
a6bcd4b92b
lang: core: embedded: provisioner: Reduce amount of log noise
...
We don't need to refresh the leases so often.
2024-10-29 16:42:15 -04:00
James Shubin
d065cddf5e
lang: core: embedded: provisioner: Remove old package
...
Doesn't seem to be used for anything at the moment.
2024-10-29 16:42:15 -04:00
James Shubin
b140b2dfeb
util: Move executable path finding into a helper function
2024-10-29 16:41:37 -04:00
James Shubin
583f90dc7b
util: distro: Rename functions to avoid golang stutter warning
2024-10-25 02:56:12 -04:00
James Shubin
10f82c6566
lang: core: list: Add a concat function
...
It works with arbitrary numbers of arguments too!
2024-10-18 10:02:29 -04:00
James Shubin
3d11b2caaf
lang: core: deploy: Add a function to help in obtaining bootstrap deps
...
This should make it easier to implement handoff.
2024-10-15 20:54:33 -04:00
James Shubin
f8037a1f99
lang: types: Add a small helper function for common type conversions
2024-10-15 20:53:39 -04:00
James Shubin
d24149518c
util: distro: Refactor family and distro code
...
I hate writing abstraction code like this, but I'm hoping it will be
useful.
2024-10-15 20:36:50 -04:00
James Shubin
a8c8f09aa3
gapi: Plumb through a URI mechanism
...
This is at least a stop-gap until we redo the whole filesystem API mess.
I think golang is partly to blame because they don't have proper API's
merged yet.
2024-10-13 16:40:50 -04:00
James Shubin
b03fdeccae
lang: interfaces: Nil input means no args
2024-10-07 00:00:19 -04:00
James Shubin
6c12e8a29b
lang: gapi: The module path needs separate rebasing
...
If we're using a module path which doesn't share the same root, rebase
it separately.
2024-10-07 00:00:19 -04:00
James Shubin
310452542b
lang: gapi: Rebase to the common path prefix
...
When the modules dir is not within the main base, we don't correctly
choose the common base path. As a result, we should choose something
common for our internal path representation.
2024-10-05 01:02:03 -04:00
James Shubin
c937280664
engine: local, lang: core: local: Add a pool function
...
This adds a new local API for pool allocation, and with it a
corresponding function in the "local" import.
2024-10-04 22:37:39 -04:00
James Shubin
898b58e3e7
lang: core: strings: Add a substring function named substr
2024-10-03 13:49:08 -04:00
James Shubin
74119a0a53
lang: core: strings, util: Add left and right padding functions
...
Golang didn't want these in the standard library, but they are useful.
2024-10-03 13:49:08 -04:00
James Shubin
d6914d3437
lang: core: net: Improve formatting of the mac functions
2024-10-03 13:49:08 -04:00
James Shubin
fdfa03685c
lang: core: net: Add is_mac function
2024-10-02 14:31:20 -04:00
James Shubin
65f26769ae
lang: core: net: Add a cidr to mask function
...
And tidy things up slightly to remove buggy tests.
2024-09-28 22:54:06 -04:00
James Shubin
6397c8f930
lang: Clean up import logs
...
We get a lot of useless noise here, make it neater.
2024-09-28 21:56:53 -04:00
James Shubin
562138cb74
lang: core: os: Add expand_home function
...
Simple helper that works with ~/foo/ or ~james/foo/ type patterns.
2024-09-25 20:31:18 -04:00
James Shubin
29eebd0d07
lang: core: Move template to golang namespace
...
I don't think this template function should be in any way authoritative,
so let's namespace it.
2024-09-13 15:51:24 -04:00
James Shubin
9a5f6a5bd3
lang: core, funcs: Use the correct zero type
...
I wasn't using the correct contained type here.
2024-09-10 23:23:00 -04:00