James Shubin
81b102ed7f
lang: ast: Allow multiple star imports
...
If more than one star import is present in the same scope, allow it. If
one star import could overwrite something, ordering is not guaranteed.
We allow this for now, but we might create a compiler fix to stop it.
This adds a test to notice both of these behaviours.
2025-01-17 14:03:48 -05:00
James Shubin
c8f911ec5d
lang: core: embedded: provisioner: Fix panic
...
The conditions changed for this one, make it stricter.
2025-01-17 12:35:30 -05:00
James Shubin
7694da4241
lang: core: embedded: provisioner: Skip bmc if empty
2025-01-17 12:34:27 -05:00
James Shubin
a0d500a602
lang: interfaces: Remove dangerous init method
...
This can cause the source to get overwritten and changed and is usually
unnecessary.
2025-01-04 20:56:11 -05:00
James Shubin
553172992f
lang: parser: Typo fix
2025-01-04 20:55:41 -05:00
James Shubin
e6d614f4dd
engine: resources: Add a bmc resource
...
This resource manages bmc devices in servers or elsewhere. This also
integrates with the provisioner code.
2025-01-03 18:19:31 -05:00
James Shubin
3107dfbd08
modules: shorewall: Small fixups to improve the module
...
These are some common fixes and improvements for normal shorewall usage.
As we shake out more uses of this, we find small issues. This lets us
have long rules, and a better default config.
2025-01-02 15:43:27 -05:00
James Shubin
802823dcb0
modules: misc: Support VIP's in network config
2025-01-02 15:42:40 -05:00
James Shubin
5858c8b501
pgraph: Panic if vertex is nil
...
These should be caught early.
2024-12-18 13:49:13 -05:00
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
82c614f2d9
engine: resources: Workaround broken debian package when building images
2024-12-06 15:59:39 -05:00
James Shubin
50265d2303
engine: resources: Pull out a distro function for guest
2024-12-06 15:58:51 -05:00
James Shubin
ecee84aa28
docs: New blog post about modules and imports
2024-12-03 03:00:21 -05:00
James Shubin
2e146e8c8e
engine: resources: Fix up some issues with cron
...
This really needs looking at again, since it's so old and buggy or
broken.
2024-12-03 01:52:23 -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
5764c977f1
modules: misc: Don't ignore the router setting
...
This mistake caused us to ignore the router setting when we wanted it!
Woops =D
2024-12-03 00:43:32 -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
c2f75d64a6
util: arch: The Any value should be the same everywhere
...
In 80e8c9cadc when this was ported, the
"Any" value diverged accidentally. This would cause some packages to not
be found, since they didn't match any arch.
Thanks to karpfen to digging into the issue.
2024-11-28 14:55:30 -05:00
James Shubin
380004b1dc
readme, docs: New docs available
2024-11-23 01:25:40 -05:00
James Shubin
28a443d11d
docs: Add a hack for golang functions
2024-11-22 14:20:24 -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
acdd6476f2
test: Remove empty variable
...
Copy-pasta bug!
2024-11-21 23:49:32 -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
b40d10a366
util: Add a generic map key and value swapping function
...
Fun little utility function which is useful.
2024-11-21 02:54:10 -05:00
James Shubin
a88034ab06
modules: misc: Add standard header
2024-11-20 23:47:17 -05:00
James Shubin
907d2ad1a1
modules: dhcp: Add an mgmt module for managing dhcpd
...
This is not perfect, but it's a good start, and it shows how a module
might be structured.
2024-11-18 15:12:01 -05:00
James Shubin
3bd6986fde
modules: shorewall: Add an mgmt module for managing shorewall
...
This is not perfect, but it's a good start, and it shows how a module
might be structured.
2024-11-18 15:11:31 -05:00
James Shubin
43bd847bad
modules: misc: Improvements on ip address setting
2024-11-08 14:12:02 -05:00
James Shubin
0c0583adc8
modules: misc: Add network manipulation helpers
...
This is common functionality which we might want to use on new machines.
2024-11-06 22:13:31 -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
69e84fbbed
engine: resources: cron: Add ctx where possible.
...
Lots of the API's here now support this. Here's an example, work on the
others too.
2024-11-06 21:09:50 -05:00
James Shubin
f8b06f32ec
engine: resources: Remove unused wait group
2024-11-06 21:09:50 -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
83fd8b7e54
engine: util: Add more cmp utility functions
2024-11-06 20:02:10 -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
3fb492f6aa
util: Add a TLS helper
...
Make it easier to build TLS stuff in pure golang.
2024-11-01 19:41:35 -04:00
James Shubin
e4f062b006
engine: resources: Parse distro properly
...
I regressed here when patching this. Here's the fix. Would be beautiful
to have hardware to run end-to-end testing on. If you want to sponsor
this, please let me know!
2024-10-30 16:04:01 -04: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
71a1efde99
examples: tls: Add a simple TLS example
...
Was useful for testing things...
2024-10-30 00:41:26 -04:00