Closed applejag closed 6 months ago
I'm not feeling great about the filepath, json, and yaml updates here. I'm worried the half-generated state of things is going to make it more confusing for someone new coming into the project. The "old" filepath source in comparison seems easier to follow.
How about, for this PR, you update risor-modgen and gha
only, leaving the other modules as-is for now? Would that work for you? I'm not ruling out updating the others in the future but I don't think it's a useful switch yet.
I'm not feeling great about the filepath, json, and yaml updates here. I'm worried the half-generated state of things is going to make it more confusing for someone new coming into the project. The "old" filepath source in comparison seems easier to follow.
How about, for this PR, you update risor-modgen and
gha
only, leaving the other modules as-is for now? Would that work for you? I'm not ruling out updating the others in the future but I don't think it's a useful switch yet.
Yeah I get what you mean.
Should I revert the support for object.Object in risor-modgen too then?
Should I revert the support for object.Object in risor-modgen too then?
I don't have a preference on this right now. That's up to you.
Added features to modgen:
context.Context
as first parameterobject.Object
parameter & return as-is[]byte
parameter & returnerror
return asobject.NewError
Added modgen to modules:
filepath(reverted, skipped until future PR)json(reverted, skipped until future PR)yaml(reverted, skipped until future PR)Added validation on name collisions (to prevent issues like #174)
The risor-modgen does not (yet) support optional and variadic parameters. As I was converting some of the modules, I noticed that risor-modgen does not need to support variadic parameters. However, optional parameters could still be nice to have support for, as it's a quite common use case.