risor-io / risor

Fast and flexible scripting for Go developers and DevOps.
https://risor.io
Apache License 2.0
581 stars 24 forks source link

risor-modgen improvements, and use it more #169

Closed applejag closed 6 months ago

applejag commented 6 months ago

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.

myzie commented 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.

applejag commented 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.

Yeah I get what you mean.

Should I revert the support for object.Object in risor-modgen too then?

myzie commented 6 months ago

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.